Anonymous
read those ☝🏻
thooonk you not bros
Fuad
Then run "git push heroku master" it will update your web
Doragonsureiyā
thooonk you not bros
I'm not your bro, bro; we weren't hatched from the same egg 🐍🥚
Anonymous
Django for Beginners Build websites with Python & Django
Anonymous
how is that book
cj
how is that book
I've never read that, I can't tell you about that book 🤷🏻‍♂️
Anonymous
Hi everyone. I faced with problem while creating object from model. I have model one of its field should contain timestamp data. class Fixture(models.Model): event_date = models.DateTimeField(null=True) While i am trying to create object b = Fixture.objects.create(event_date = timestamp_contained_variable) I get an error django.core.exceptions.ValidationError: ["'event_date' value has an invalid format. It must be in YYYY-MM-DD HH:MM[:ss[.uuuuuu]][TZ] format."] if i understand here is a problem that i should properly format my timestamp_contained variable because field event_date accept only dateTimeField. Can anyone help. Also the second question. is if i want to store in table column timestamp data. I should create for this column model field with models.DateTimeField
Fuad
can u please suggest a book on django because the current one is a headache
See this checklist for deploying your django app on heroku, step by step https://github.com/attreyabhatt/Django2.1-Personal-Website/blob/master/checklist.txt
cj
what book did u read?? TITLE
I read official documentations, always 🤷🏻‍♂️
Anonymous
I read official documentations, always 🤷🏻‍♂️
the problem is, i barely get connection so i have to read offline, can the site be mirrored?
cj
the problem is, i barely get connection so i have to read offline, can the site be mirrored?
most of documentations have an option to download them as a PDF file
cj
most of documentation that are on Read the Docs can be downloaded for offline reading
Anonymous
where is this link?
cj
bottom right part
Anonymous
i can't find the download
Anonymous
bottom right part
i am in the site
Anonymous
thank you again
Fuad
i can't find the download
Just add "download" at the beginning of the documentation title on google, it will show the pdf file
Anonymous
bottom right part
the book i am reading is shit compared to that doc
cj
the book i am reading is shit compared to that doc
at least you were reading a book, imagine people watching youtube videos, I guess they cry blood 🤷🏻‍♂️
cj
nahhh, i really can't understand why people watch videos
me neither, looks like they like to suffer
cj
I'm wondering if that guy who told to mess up the settings.py learnt using a video 🤷🏻‍♂️ (5 beers he did)
cj
When you post date then you have to add timezone as well, there is one library name momentjs which converts datetime with timezones
wait... WHAT?! how is using a JS library related to a —low level in this scope— task directly on saving data to a model?
S
My point of view as from both the ends
cj
My point of view as from both the ends
OP didn't mentions he has problems with forms, neither remotelly with frontend 🙄 he has an issue trying to store a wrong typed variable to a field in his model
cj
SMH those kind of guys who doesn't know what they are talking about
cj
oh wait... you're the same guy who told to mess up the settings.py to the heroku guy 🙀
坂田銀時
Yes it is string
You need to pass datetime object
cj
@hyunlee1o mister admin, what do we do on these cases?
cj
yep
you have to do what I told you there too 🙂
cj
oh wait... you're the same guy who told to mess up the settings.py to the heroku guy 🙀
lol, also that's the same guy who told you can't use more than one DB using Django 🙄
Anonymous
you have to do what I told you there too 🙂
Convert my timestamp to datetime than store it ?
cj
Convert my timestamp to datetime than store it ?
yes, because DateTimeField doesn't accept bare string values type
坂田銀時
When you post date then you have to add timezone as well, there is one library name momentjs which converts datetime with timezones
That has nothing to do with timezone. Btw there is a python module for timezone related stuff.
cj
@c0x6A Answer this ?
I don't want 🤷🏻‍♂️ what are you gonna do about it? point my head with a gun to answer you?
S
But more painful way
cj
That is exactly I was thinking about
go read Django documentation about multidatabases, and do the world a favor, change career paths, there are plants/animals that need to be taken care of, and maybe you can earn money doing that too 🤷🏻‍♂️ because you has nothing to do in the IT field as you've showed up 🤷🏻‍♂️
cj
also roof-tiling is a good business, or selling chicken in KFC, who know, maybe you're good at it and you still don't know
S
Do a favor on IT industry
cj
You read as well
I've already told I have several projects doing exactly that thing using 3 databases at the same time 🤷🏻‍♂️ they are running perfectly for 2 years now
cj
well... you won't see it 🤷🏻‍♂️
坂田銀時
Lol
Anonymous
Hi, How can I create or manage a Django subdomain?
cj
Hi, How can I create or manage a Django subdomain?
I use nginx to manage them, but can you give more context to your problem? what do you want to do, what have you tried to do?
cj
also iirc there's a package for that task too
Anonymous
I use nginx to manage them, but can you give more context to your problem? what do you want to do, what have you tried to do?
I want to for example when someone entered an address: http://blog.site.com Plug in to one of my views
Anonymous
Maybe I want to create a lot of subdomains
cj
Maybe I want to create a lot of subdomains
no, you can use wildcards and rewrites
Anonymous
Can anyone help me?
cj
How to do this?
https://stackoverflow.com/questions/31892911/django-uwsgi-nginx-subdomain-for-apps#31892976 https://www.digitalocean.com/community/questions/how-to-deploy-multiple-django-apps-as-subdomains-using-nginx-and-gunicorn and other google results
Anonymous
How to view Django's implementation log with Gunicorn?
cj
How to view Django's implementation log with Gunicorn?
S M. Here you have a useful link: https://duckduckgo.com/?q=How+to+view+Django%27s+implementation+log+with+Gunicorn%3F
Anonymous
I've run Django with nginx and Gunicorn in Ubuntu But I don't know how I can see the Django implementation log
cj
no, wait... do you wanna se the logs that Django generates while you're running it with Gunicorn (or any other server)? if that's the case, you have to set a logger in your application, read more here: https://docs.djangoproject.com/en/2.2/topics/logging/
cj
🙂