Project

General

Profile

Bug #1302

HTTP 404 error code on static files

Added by Arnaud Maillet over 7 years ago. Updated over 7 years ago.

Status:
Fermé
Priority:
Bas
Assignee:
-
Category:
-
Target version:
Start date:
08 Mar 2012
Due date:
% Done:

0%

Patch proposed:
No
Planning:
No

Description

Hello,

I did some work arounds to install Authentic on my computer e.g :

http://dev.entrouvert.org/issues/1301
http://dev.entrouvert.org/issues/1177

For the bug 1177, I just did this command to remove the traceback error on the index page :

$ sudo cp ~/authentic/authentic2/vendor/registration /usr/local/lib/python2.7/dist-packages/.

But when I launch the server and go to the index page I have these errors :

[08/Mar/2012 10:40:43] "GET /static/authentic2/css/style.css HTTP/1.1" 404 1258
[08/Mar/2012 10:40:43] "GET /static/jquery/css/jquery-ui.custom.css HTTP/1.1" 404 1258
[08/Mar/2012 10:40:43] "GET /static/ulx/css/ulx.css HTTP/1.1" 404 1258
[08/Mar/2012 10:40:43] "GET /static/jquery/js/jquery.js HTTP/1.1" 404 1258
[08/Mar/2012 10:40:43] "GET /static/jquery/js/jquery.cookie.js HTTP/1.1" 404 1258
[08/Mar/2012 10:40:43] "GET /static/jquery/js/jquery-ui.js HTTP/1.1" 404 1258
[08/Mar/2012 10:40:43] "GET /static/jquery/js/jquery.simplemodal.js HTTP/1.1" 404 1258
[08/Mar/2012 10:40:43] "GET /static/openid/js/openid-jquery.js HTTP/1.1" 404 1258

And there is no css/scripts on the index page.

I installed authentic like this :

$ sudo python install setup
$ cd /usr/local/lib/python2.7/dist-packages/authentic2
$ sudo python manage.py syncdb --migrate
$ sudo python manage.py collectstatic
remove the django-registration module ( bug 1177 )
$ sudo rm -rf /usr/local/lib/python2.7/dist-packages/registration
set up the authentic's registration module
$ sudo cp ~/authentic/authentic2/vendor/registration /usr/local/lib/python2.7/dist-packages/.
$ sudo python manage.py runserver 192.168.0.45:8000

Did I miss something ? What do you think about that, do you know why there are some static files missing ?

Regards,

History

#1 Updated by Benjamin Dauvergne over 7 years ago

  • Status changed from Nouveau to Solution déployée

Serving of static files by the 'development' server (runserver is not made for production use, prefer WSGI or gunicorn for this) is only functionnal if DEBUG is activated in the setup.py file. Did you deactivate the debugging mode ?

For production use you should serve the static/ directory (it should be created at the root of the project) directly using a real webserver (nginx, apache, lighttpd, etc..).

#2 Updated by Mikaël Ates over 7 years ago

  • Status changed from Solution déployée to Fermé

Authentic é is now in Debug mode by default to avoid this bad first experience. See commit cb002e6f4f685cec8b0580c054d4327d4cb8281e for more details.

Also available in: Atom PDF