These are chat archives for django/django

17th
Jun 2018
Ace Of Spades
@codenoid
Jun 17 2018 04:29
morning
Curtis Maloney
@funkybob
Jun 17 2018 04:39
o/
John
@flyboy1565
Jun 17 2018 06:49
Hello @c-goes
Curtis Maloney
@funkybob
Jun 17 2018 07:09
never realised we had a gitter community
Peter Bittner
@bittner
Jun 17 2018 21:43

how can it convert datetime.datetime.now() to TIME_ZONE if it's a naive datetime?

@cs-cordero The answers on StackOverflow will help.

Curtis Maloney
@funkybob
Jun 17 2018 21:44
The answer in the docs will, too...
Abdelkader Belcaid
@p4p1lio_twitter
Jun 17 2018 23:20
hello guys
im creating web plateform by using django
i need ur help because i met a problem
python error
thanks!
this is traceback:
Traceback (most recent call last): File "manage.py", line 2, in <module> from django.core.management import execute_manager File "/home/abdelkader/miniconda3/lib/python3.6/site-packages/django/core/management/__init__.py", line 52 except ImportError,e: ^ SyntaxError: invalid syntax
Curtis Maloney
@funkybob
Jun 17 2018 23:30
@p4p1lio_twitter well, first we'd need to see the full traceback... and formatted as it was originally so we can see where the SyntaxError is pointing
Abdelkader Belcaid
@p4p1lio_twitter
Jun 17 2018 23:43
@funkybob plz can you talk privately
i really need your help!
Abdelkader Belcaid
@p4p1lio_twitter
Jun 17 2018 23:55
ok ok
manager.py
#!/usr/bin/env python
from django.core.management import execute_manager
try:
    import settings # Assumed to be in the same directory.
except ImportError:
    import sys
    sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
    sys.exit(1)

if __name__ == "__main__":
    execute_manager(settings)
image.png
root@ubuntu:~/Desktop/GGVote/gpgvote# python manage.py runserver
Traceback (most recent call last):
  File "manage.py", line 2, in <module>
    from django.core.management import execute_manager
  File "/home/abdelkader/miniconda3/lib/python3.6/site-packages/django/core/management/__init__.py", line 52
    except ImportError,e:
                      ^
SyntaxError: invalid syntax
hey guys, can you help plz!!!
??
:)