softhauz Posted 18 hours ago Posted 18 hours ago Hello, in the DJANGO Deployment page, the instruction was to replace the "domain.helio.st" with the site address for the dispatch.wsgi. In the previous posts from the forum with discussions about the old panel, you have previously used the username instead of the site address. Both were tried but the DJANGO application did not deploy. The directory structure is consistent as shown in the DJANGO Deployment page, except the project name is softhauz and not djangotest. The content and directory of .htaccess and dispatch.wsgi files are also consistent with the DJANGO Deployment page; both files were only modified to replace the actual project name instead of djangotest, but the DJANGO application did not deploy. If someone can please take a double look and let me know what I'm missing, if it's from my side or yours, thank you. Quote
softhauz Posted 13 hours ago Author Posted 13 hours ago UPDATE: Advice from this thread was also attempted. The following line from .htaccess was commented out: Options +ExecCGI Quote
softhauz Posted 13 hours ago Author Posted 13 hours ago I purchased storage upgrade to 4000 MB (my entire project is roughly only 339MB on disk), it's not yet reflected on Plesk. Current list of softhauz modules: 20251107 Package Version ---------------------- ----------- appdirs 1.4.4 asgiref 3.8.1 beautifulsoup4 4.12.3 bs4 0.0.2 certifi 2024.7.4 charset-normalizer 3.3.2 colorama 0.4.6 contourpy 1.3.1 crispy 0.8.0 crispy-bootstrap4 2024.10 crispy-bootstrap5 2024.10 cssselect 1.2.0 cycler 0.12.1 Django 5.1.5 django-admin-interface 0.29.4 django-auto-logout 0.5.1 django-colorfield 0.12.0 django-countries 7.6.1 django-crispy-forms 2.3 django-environ 0.12.0 django-widget-tweaks 1.5.0 djangorestframework 3.15.2 environ 1.0 fabio 2024.9.0 fake-useragent 1.5.1 Faker 35.2.0 fonttools 4.55.3 greenlet 3.1.1 h5py 3.12.1 hdf5plugin 5.0.0 idna 3.7 importlib_metadata 8.2.0 kiwisolver 1.4.8 lxml 5.2.2 matplotlib 3.10.0 mysqlclient 2.2.4 numpy 1.26.2 packaging 24.2 parse 1.20.2 Pillow 10.0.1 pip 25.0 platformdirs 4.3.6 psycopg2 2.9.7 psycopg2-binary 2.9.10 pyee 11.1.0 pyparsing 3.2.1 pyppeteer 2.0.0 PyQt6 6.8.0 PyQt6-Qt6 6.8.1 PyQt6_sip 13.9.1 pyquery 2.0.0 python-dateutil 2.9.0.post0 python-dotenv 1.0.1 python-slugify 8.0.4 pytz 2025.2 requests 2.32.3 requests-html 0.10.0 ruamel.yaml 0.18.10 ruamel.yaml.clib 0.2.12 scipy 1.15.0 setuptools 65.5.0 silx 2.1.2 six 1.17.0 soupsieve 2.5 SQLAlchemy 2.0.36 sqlparse 0.4.4 text-unidecode 1.3 tqdm 4.66.4 typing_extensions 4.12.2 tzdata 2023.3 urllib3 1.26.19 views 0.3 w3lib 2.2.1 websockets 10.4 whitenoise 6.0.0 xraydb 4.5.6 zipp 3.19.2 Quote
softhauz Posted 13 hours ago Author Posted 13 hours ago (edited) 1 minute ago, softhauz said: I purchased storage upgrade to 4000 MB (my entire project is roughly only 339MB on disk), it's not yet reflected on Plesk. Current list of softhauz modules: 20251107 Package Version ---------------------- ----------- appdirs 1.4.4 asgiref 3.8.1 beautifulsoup4 4.12.3 bs4 0.0.2 certifi 2024.7.4 charset-normalizer 3.3.2 colorama 0.4.6 contourpy 1.3.1 crispy 0.8.0 crispy-bootstrap4 2024.10 crispy-bootstrap5 2024.10 cssselect 1.2.0 cycler 0.12.1 Django 5.1.5 django-admin-interface 0.29.4 django-auto-logout 0.5.1 django-colorfield 0.12.0 django-countries 7.6.1 django-crispy-forms 2.3 django-environ 0.12.0 django-widget-tweaks 1.5.0 djangorestframework 3.15.2 environ 1.0 fabio 2024.9.0 fake-useragent 1.5.1 Faker 35.2.0 fonttools 4.55.3 greenlet 3.1.1 h5py 3.12.1 hdf5plugin 5.0.0 idna 3.7 importlib_metadata 8.2.0 kiwisolver 1.4.8 lxml 5.2.2 matplotlib 3.10.0 mysqlclient 2.2.4 numpy 1.26.2 packaging 24.2 parse 1.20.2 Pillow 10.0.1 pip 25.0 platformdirs 4.3.6 psycopg2 2.9.7 psycopg2-binary 2.9.10 pyee 11.1.0 pyparsing 3.2.1 pyppeteer 2.0.0 PyQt6 6.8.0 PyQt6-Qt6 6.8.1 PyQt6_sip 13.9.1 pyquery 2.0.0 python-dateutil 2.9.0.post0 python-dotenv 1.0.1 python-slugify 8.0.4 pytz 2025.2 requests 2.32.3 requests-html 0.10.0 ruamel.yaml 0.18.10 ruamel.yaml.clib 0.2.12 scipy 1.15.0 setuptools 65.5.0 silx 2.1.2 six 1.17.0 soupsieve 2.5 SQLAlchemy 2.0.36 sqlparse 0.4.4 text-unidecode 1.3 tqdm 4.66.4 typing_extensions 4.12.2 tzdata 2023.3 urllib3 1.26.19 views 0.3 w3lib 2.2.1 websockets 10.4 whitenoise 6.0.0 xraydb 4.5.6 zipp 3.19.2 Some of these are not actually used or have been deprecated from the project. Edited 13 hours ago by softhauz Quote
softhauz Posted 12 hours ago Author Posted 12 hours ago (edited) I took a look at the logs and it appears that it's just quite a few general modules that do not exist from your server. I removed the environ module from my project. I'll request for this DJANGO module to please be installed: django_countries This module is essential to forms. Edited 12 hours ago by softhauz Quote
Krydos Posted 7 hours ago Posted 7 hours ago 5 hours ago, softhauz said: I purchased storage upgrade to 4000 MB (my entire project is roughly only 339MB on disk), it's not yet reflected on Plesk. Does it show as 4000 MB now? Quote
Krydos Posted 7 hours ago Posted 7 hours ago 4 hours ago, softhauz said: django_countries Installed. You can see the current list of installed modules and their versions for Morty's Python 3.12 at https://krydos3.heliohost.org/pyinfo/info3.12.py Quote
Krydos Posted 7 hours ago Posted 7 hours ago 10 hours ago, softhauz said: If someone can please take a double look and let me know what I'm missing After installing django_countries I tried loading your Django page, and it gave a 500 error. I checked the logs and it looks like you needed faker, and django_auto_logout as well. I installed those modules, and now the 500 error is gone. It looks like some images or CSS might be missing now, but you should be able to take it from here. Quote
softhauz Posted 6 hours ago Author Posted 6 hours ago 1 hour ago, Krydos said: After installing django_countries I tried loading your Django page, and it gave a 500 error. I checked the logs and it looks like you needed faker, and django_auto_logout as well. I installed those modules, and now the 500 error is gone. It looks like some images or CSS might be missing now, but you should be able to take it from here. wonderful, thank you! 1 hour ago, Krydos said: Does it show as 4000 MB now? indeed Quote
Krydos Posted 5 hours ago Posted 5 hours ago Glad to hear it's working so far. One other thing that tends to confuse people when they're working on a Django website is the server side caching https://wiki.helionet.org/Django_on_HelioHost#WSGI_Uses_Server_Side_Caching What this means is if you visit your site, and then change some code, and then visit your site again, it's possible the changes appear or it's possible the old code still shows up. If you make multiple changes it's possible for multiple older versions of your code to continue showing up in the browser for up to 2 hours. One way to deal with this is to make a change, and then wait 2 hours before you make another code change, and then wait another 2 hours to make the next change, etc. This is obviously a very slow process. The other way to deal with this server side caching is to request WSGI restart access. If WSGI restart access is enabled you can clear the cache whenever you want so your code changes appear instantly. The downside to this though is your memory usage will be 260 GB per day, or more which means a bill of $1.91 per month or more. Let us know if you'd like to enable WSGI restart access so you can clear your server side cache. Quote
softhauz Posted 4 hours ago Author Posted 4 hours ago (edited) 1 hour ago, Krydos said: Glad to hear it's working so far. One other thing that tends to confuse people when they're working on a Django website is the server side caching https://wiki.helionet.org/Django_on_HelioHost#WSGI_Uses_Server_Side_Caching What this means is if you visit your site, and then change some code, and then visit your site again, it's possible the changes appear or it's possible the old code still shows up. If you make multiple changes it's possible for multiple older versions of your code to continue showing up in the browser for up to 2 hours. One way to deal with this is to make a change, and then wait 2 hours before you make another code change, and then wait another 2 hours to make the next change, etc. This is obviously a very slow process. The other way to deal with this server side caching is to request WSGI restart access. If WSGI restart access is enabled you can clear the cache whenever you want so your code changes appear instantly. The downside to this though is your memory usage will be 260 GB per day, or more which means a bill of $1.91 per month or more. Let us know if you'd like to enable WSGI restart access so you can clear your server side cache. I noticed that. For the static files issue, I'm mainly working on dispatch.wsgi and settings.py. At some point, the target directories were hit and images rendered: Please enable WSGI restart access for 1 month only and disable it afterwards. Am I able to request enabling it again in the future, after it's disabled? Edited 4 hours ago by softhauz Quote
Krydos Posted 1 hour ago Posted 1 hour ago 2 hours ago, softhauz said: Please enable WSGI restart access WSGI control access has been enabled on the domain softhauz.ca. To restart your Django app and load new code changes in simply edit /home/softhauz.ca/httpdocs/softhauz/softhauz/dispatch.wsgi. Adding a blank line, removing a blank line, adding a space, or removing a space are examples of editing the file. As long as the last modified timestamp changes it will clear the server cache. Let us know if you run into any issues. 2 hours ago, softhauz said: 1 month only and disable it afterwards. Am I able to request enabling it again in the future, after it's disabled? Just let us know when you're ready to turn it off. We generally try to respond to support requests within 24 hours. Also keep in mind that most of your posts above were at 4:00am - 4:30am range my time, so I am basically never awake at that time, and support requests will take longer during those times of the day. Quote
softhauz Posted 1 hour ago Author Posted 1 hour ago (edited) 31 minutes ago, Krydos said: WSGI control access has been enabled on the domain softhauz.ca. To restart your Django app and load new code changes in simply edit /home/softhauz.ca/httpdocs/softhauz/softhauz/dispatch.wsgi. Adding a blank line, removing a blank line, adding a space, or removing a space are examples of editing the file. As long as the last modified timestamp changes it will clear the server cache. Let us know if you run into any issues. Just let us know when you're ready to turn it off. We generally try to respond to support requests within 24 hours. Also keep in mind that most of your posts above were at 4:00am - 4:30am range my time, so I am basically never awake at that time, and support requests will take longer during those times of the day. Worked like magic: however, it's serving the app at softhauz.ca/softhauz instead of softhauz.ca, it has something to do with .htaccess which is not my forte yet. If you can direct me towards some good reliable sources, I can look into it myself, unless it's a really easy fix so I'd figured to consult with you. - no worries on the timeline, I'm not expecting instant replies as I did post those at pre-dawn (I'm in mountain time), 1-2 business days would be great Edited 1 hour ago by softhauz Quote
softhauz Posted 59 minutes ago Author Posted 59 minutes ago @Krydos thank you, I moved the directory up and modified .htaccess accordingly as per your advice. For reference, this is a multi-app Django project, deployed with the following .htaccess: RewriteEngine On RewriteBase / RewriteRule ^(media/.*)$ - [L] RewriteRule ^(admin_media/.*)$ - [L] RewriteRule ^(project_name_here/dispatch\.wsgi/.*)$ - [L] RewriteRule ^(.*)$ project_name_here/dispatch.wsgi/$1 [QSA,PT,L] all is good, thank you! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.