These are chat archives for django/django

22nd
Apr 2018
Phong Bui
@loveunCG
Apr 22 2018 13:55
Hi there
I have add to Django-material to my project
but on apache server has error
mod_wsgi (pid=16812): Failed to exec Python script file 'I:/work_data/leagues/leagues/wsgi.py'. [Sun Apr 22 22:53:51.238839 2018] [wsgi:error] [pid 16812:tid 1300] [client 127.0.0.1:55064] mod_wsgi (pid=16812): Exception occurred processing WSGI script 'I:/work_data/leagues/leagues/wsgi.py'. [Sun Apr 22 22:53:51.241346 2018] [wsgi:error] [pid 16812:tid 1300] [client 127.0.0.1:55064] Traceback (most recent call last):\r [Sun Apr 22 22:53:51.241346 2018] [wsgi:error] [pid 16812:tid 1300] [client 127.0.0.1:55064] File "I:/work_data/leagues/leagues/wsgi.py", line 24, in <module>\r [Sun Apr 22 22:53:51.241346 2018] [wsgi:error] [pid 16812:tid 1300] [client 127.0.0.1:55064] application = get_wsgi_application()\r [Sun Apr 22 22:53:51.241346 2018] [wsgi:error] [pid 16812:tid 1300] [client 127.0.0.1:55064] File "C:\\Users\\loveu\\AppData\\Local\\Programs\\Python\\Python36\\lib\\site-packages\\django\\core\\wsgi.py", line 12, in get_wsgi_application\r [Sun Apr 22 22:53:51.241346 2018] [wsgi:error] [pid 16812:tid 1300] [client 127.0.0.1:55064] django.setup(set_prefix=False)\r [Sun Apr 22 22:53:51.241346 2018] [wsgi:error] [pid 16812:tid 1300] [client 127.0.0.1:55064] File "C:\\Users\\loveu\\AppData\\Local\\Programs\\Python\\Python36\\lib\\site-packages\\django\\__init__.py", line 24, in setup\r [Sun Apr 22 22:53:51.241346 2018] [wsgi:error] [pid 16812:tid 1300] [client 127.0.0.1:55064] apps.populate(settings.INSTALLED_APPS)\r [Sun Apr 22 22:53:51.241346 2018] [wsgi:error] [pid 16812:tid 1300] [client 127.0.0.1:55064] File "C:\\Users\\loveu\\AppData\\Local\\Programs\\Python\\Python36\\lib\\site-packages\\django\\apps\\registry.py", line 89, in populate\r [Sun Apr 22 22:53:51.241346 2018] [wsgi:error] [pid 16812:tid 1300] [client 127.0.0.1:55064] app_config = AppConfig.create(entry)\r [Sun Apr 22 22:53:51.241346 2018] [wsgi:error] [pid 16812:tid 1300] [client 127.0.0.1:55064] File "C:\\Users\\loveu\\AppData\\Local\\Programs\\Python\\Python36\\lib\\site-packages\\django\\apps\\config.py", line 90, in create\r [Sun Apr 22 22:53:51.241346 2018] [wsgi:error] [pid 16812:tid 1300] [client 127.0.0.1:55064] module = import_module(entry)\r [Sun Apr 22 22:53:51.241346 2018] [wsgi:error] [pid 16812:tid 1300] [client 127.0.0.1:55064] File "C:\\Users\\loveu\\AppData\\Local\\Programs\\Python\\Python36\\lib\\importlib\\__init__.py", line 126, in import_module\r [Sun Apr 22 22:53:51.241346 2018] [wsgi:error] [pid 16812:tid 1300] [client 127.0.0.1:55064] return _bootstrap._gcd_import(name[level:], package, level)\r [Sun Apr 22 22:53:51.241346 2018] [wsgi:error] [pid 16812:tid 1300] [client 127.0.0.1:55064] File "<frozen importlib._bootstrap>", line 994, in _gcd_import\r [Sun Apr 22 22:53:51.241346 2018] [wsgi:error] [pid 16812:tid 1300] [client 127.0.0.1:55064] File "<frozen importlib._bootstrap>", line 971, in _find_and_load\r [Sun Apr 22 22:53:51.241346 2018] [wsgi:error] [pid 16812:tid 1300] [client 127.0.0.1:55064] File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked\r [Sun Apr 22 22:53:51.241346 2018] [wsgi:error] [pid 16812:tid 1300] [client 127.0.0.1:55064] ModuleNotFoundError: No module named 'leaguematerial'\r
that is error
JZA
@Jzarecta
Apr 22 2018 13:56
you should use linux
Phong Bui
@loveunCG
Apr 22 2018 13:57
no I am no windows
JZA
@Jzarecta
Apr 22 2018 13:57
I know
you should get a free Linux server on pythonanywhere
Phong Bui
@loveunCG
Apr 22 2018 13:58
cannt i deploy Django to windows hosting server ?
JZA
@Jzarecta
Apr 22 2018 13:58
why? windows sucks
Rishikesh Agrawani
@hygull
Apr 22 2018 13:58
pythonanywhere does not cost, it is in the case, if you want more resources
http://rishikesh67.pythonanywhere.com a simple django app running on pythonanywhere
Phong Bui
@loveunCG
Apr 22 2018 13:59
now my deployment hosting is winodws hosting server
Rishikesh Agrawani
@hygull
Apr 22 2018 13:59
It is in development
Phong Bui
@loveunCG
Apr 22 2018 13:59
so..
JZA
@Jzarecta
Apr 22 2018 14:01
ok back to your error basically it cant find the module leaguematerial...
Phong Bui
@loveunCG
Apr 22 2018 14:01
thanks
but I can run this project using runserver
with Django-admin
JZA
@Jzarecta
Apr 22 2018 14:02
why it can't find it, well thats a more indepth problem that usually rely on the path of your code, probably you import it and is not there yet, so it fails.
Rishikesh Agrawani
@hygull
Apr 22 2018 14:06
@loveunCG If your app is working fine in local then you can host that easily on Pythonanywhere
Phong Bui
@loveunCG
Apr 22 2018 14:07
okay
ks
Phong Bui
@loveunCG
Apr 22 2018 14:50
thanks
JZA
@Jzarecta
Apr 22 2018 14:50
did you fix it?
Phong Bui
@loveunCG
Apr 22 2018 14:50
yes
but now
no working static
JZA
@Jzarecta
Apr 22 2018 14:51
there is a command to update the static
Phong Bui
@loveunCG
Apr 22 2018 14:51
how to do that
JZA
@Jzarecta
Apr 22 2018 14:51
also might be a good thing to use a pastebin page and put your file tree
Phong Bui
@loveunCG
Apr 22 2018 14:51
in httpd.conf
JZA
@Jzarecta
Apr 22 2018 14:51
unfortunately you dont have linux so u dont have a command like that, maybe windows has it but I dunno
you should use the embeded python server
dont rely on apache, it kinda complicate it meaningless... I recomend gunicorn for webserver
Phong Bui
@loveunCG
Apr 22 2018 14:53
gunicon?
what is that
JZA
@Jzarecta
Apr 22 2018 14:53
python webserver
Phong Bui
@loveunCG
Apr 22 2018 14:54
that is available on windows?
maybe not
now this is static url
<Not Found The requested URL /static/css was not found on this server.>
how about that
i have set httpd.conf

```<VirtualHost *:80>
ServerName localhost

#ServerAlias otherdomain.com
#ServerAdmin tuweizhong@163.com

Alias /media/ I:\wamp\apache2\htdocs\app\app




<Directory I:\work_data\leagues>
    Require all granted
</Directory>
WSGIScriptAlias / I:\work_data\leagues\leagues\wsgi.py
#WSGIScriptAlias / I:\wamp\apache2\htdocs\app\app\wsgi.py

WSGIDaemonProcess localhost processes=2 threads=15

# WSGIProcessGroup localhost

<Directory I:\work_data\leagues>
<Files wsgi.py>
    Require all granted
</Files>
</Directory>

Alias /static/ I:\work_data\leagues\static
<Directory I:\work_data\leagues\static>
Require all granted
</Directory>

<Location "/static/">
Options -Indexes
</Location>

</VirtualHost>```

this is but no working
Phong Bui
@loveunCG
Apr 22 2018 15:06
hello
in pythonanywhere
how to upload multifile
projecy
Phong Bui
@loveunCG
Apr 22 2018 16:09
Hi
Phong Bui
@loveunCG
Apr 22 2018 16:18
how to make python3 virtualenv on my project
now default is python version is 2.7
but my project is using 3.6
Django 2.04
and other lib has 3.6 version
Phong Bui
@loveunCG
Apr 22 2018 16:43
thanks you