Comments (5)
NOTE: This is just another way to access your static files and NOT A FIX for the above problem.
- Method : What you can try is put the static folder inside your app(/s) folders where they are needed, instead of the root(/project) folder, with namespacing (just a good practice that helps Django differentiate between static files with same names across different apps), and then reference them accordingly.
- The reason of the error I think is some error in routing (/urls) in path joining of BASE_DIR and STATIC files , which we have avoided by in the above method by shifting the static folder's location inside each app
Refer the following Django documentation for better understanding of method:
https://docs.djangoproject.com/en/3.2/intro/tutorial06/
from patrowldocs.
Hi s3c,
Do you run the manager in the development or production mode ? If you run in the production mode (variable DEBUG
set to False
in the app/settings.py file), you must deploy a web server/proxy like NGinx.
If you want to start to have a quick look, try to set the DEBUG parameter to True and restart it.
Let me know if it works :)
--Nicolas
from patrowldocs.
Hi MakyOtOx,
Thanks for the rapid response! ;)
Well I tried in development mode and then in production mode.
I have a web server (apache2 on debian based system) (so I have to configure it), but what do you sugest? Better to have Nginx?
Later on I'll try what you suggest and try to see if I can get any information that can help solve the issue.
Then I'll let you know.
Thank you.
Best regards.
from patrowldocs.
"GET /static/css/bootstrap.css HTTP/1.1" 404 1810 this is my problem
from patrowldocs.
WARNINGS:
shop.Category: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.
HINT: Configure the DEFAULT_AUTO_FIELD setting or the ShopConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
shop.Customer: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.
HINT: Configure the DEFAULT_AUTO_FIELD setting or the ShopConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
shop.Order: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.
HINT: Configure the DEFAULT_AUTO_FIELD setting or the ShopConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
shop.OrderItem: (models.W042) Auto-created primary key used when not defining a primary key type, by default
'django.db.models.AutoField'.
HINT: Configure the DEFAULT_AUTO_FIELD setting or the ShopConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
shop.Product: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.
HINT: Configure the DEFAULT_AUTO_FIELD setting or the ShopConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
shop.ShippingAddress: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.
HINT: Configure the DEFAULT_AUTO_FIELD setting or the ShopConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
System check identified 6 issues (0 silenced).
You have 19 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions, shop.
Run 'python manage.py migrate' to apply them.
May 27, 2021 - 14:09:43
Django version 3.2.2, using settings 'starletshop.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
[27/May/2021 14:09:48] "GET / HTTP/1.1" 200 7563
[27/May/2021 14:09:48] "GET /static/css/bootstrap.css HTTP/1.1" 404 1810
[27/May/2021 14:09:48] "GET /static/css/main.css HTTP/1.1" 404 1795
[27/May/2021 14:09:48] "GET /static/font-awesome-4.7.0/css/font-awesome.css HTTP/1.1" 404 1876
[27/May/2021 14:09:48] "GET /static/JS/main.js HTTP/1.1" 404 1789
[27/May/2021 14:09:48] "GET /static/JS/bootstrap.js HTTP/1.1" 404 1804
[27/May/2021 14:09:48] "GET /static/images/hero.webp HTTP/1.1" 404 1807
[27/May/2021 14:09:48] "GET /static/images/hero3.jpg HTTP/1.1" 404 1807
[27/May/2021 14:09:48] "GET /static/images/hero4.jpg HTTP/1.1" 404 1807
[27/May/2021 14:09:49] "GET /static/JS/main.js HTTP/1.1" 404 1789
[27/May/2021 14:09:55] "GET /cart/ HTTP/1.1" 200 6628
[27/May/2021 14:09:55] "GET /static/css/main.css HTTP/1.1" 404 1795
[27/May/2021 14:09:55] "GET /static/css/bootstrap.css HTTP/1.1" 404 1810
[27/May/2021 14:09:55] "GET /static/font-awesome-4.7.0/css/font-awesome.css HTTP/1.1" 404 1876
[27/May/2021 14:09:55] "GET /static/JS/main.js HTTP/1.1" 404 1789
[27/May/2021 14:09:56] "GET /static/JS/bootstrap.js HTTP/1.1" 404 1804
[27/May/2021 14:09:56] "GET /static/JS/main.js HTTP/1.1" 404 1789
[27/May/2021 14:10:03] "GET /checkout/ HTTP/1.1" 200 0
[27/May/2021 14:10:11] "GET /static/css/bootstrap.css HTTP/1.1" 404 1810
[27/May/2021 14:10:11] "GET /static/css/main.css HTTP/1.1" 404 1795
[27/May/2021 14:10:11] "GET /static/JS/main.js HTTP/1.1" 404 1789
[27/May/2021 14:10:12] "GET /static/font-awesome-4.7.0/css/font-awesome.css HTTP/1.1" 404 1876
[27/May/2021 14:10:12] "GET /static/JS/main.js HTTP/1.1" 404 1789
[27/May/2021 14:10:16] "GET / HTTP/1.1" 200 7563
[27/May/2021 14:10:16] "GET /static/css/main.css HTTP/1.1" 404 1795
[27/May/2021 14:10:16] "GET /static/css/bootstrap.css HTTP/1.1" 404 1810
[27/May/2021 14:10:16] "GET /static/JS/main.js HTTP/1.1" 404 1789
[27/May/2021 14:10:16] "GET /static/JS/bootstrap.js HTTP/1.1" 404 1804
[27/May/2021 14:10:16] "GET /static/font-awesome-4.7.0/css/font-awesome.css HTTP/1.1" 404 1876
[27/May/2021 14:10:16] "GET /static/images/hero.webp HTTP/1.1" 404 1807
[27/May/2021 14:10:17] "GET /static/images/hero3.jpg HTTP/1.1" 404 1807
[27/May/2021 14:10:17] "GET /static/images/hero4.jpg HTTP/1.1" 404 1807
[27/May/2021 14:10:17] "GET /static/JS/main.js HTTP/1.1" 404 1789
from patrowldocs.
Related Issues (20)
- Import finding => 413 Request Entity Too Large HOT 1
- Problem with Django staticfiles HOT 3
- Trouble installing Patrowl Manager w/ Docker HOT 1
- ERROR - The CSV Template HOT 5
- cant add findings HOT 2
- Default password is not working HOT 2
- Support to import scan results from Burp, Qualys Scanner
- Update instance HOT 1
- Install error HOT 2
- Update documentation HOT 1
- static files didn't load HOT 4
- Docker web failed to build HOT 2
- Access Refused at /scans/defs/add AMQPLAIN after running a scan HOT 1
- ERROR: Failed building wheel for psycopg2-binary HOT 2
- findings JSON format docs
- API for add asset missing
- gunicorn not found in $PATH when deploying Docker HOT 1
- Getting an error for python-magic-bin==0.4.14
- Python error makemigrations
- Probleme PatrOwlEngine OpenVAS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from patrowldocs.