Just set the static *STATIC_URL* copy your static files into you application root e.g. *MY_APP/core and nothing like * * * r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': os.path.join(PROJECT_ROOT, 'static')}
in *urls.py* **run server this should work, down below my you can see the piece of * settings.py* *STATIC_URL = '/static/'* * * *ADMIN_MEDIA_PREFIX = '/static/admin/'* * * *STATICFILES_FINDERS = (* * 'django.contrib.staticfiles.finders.FileSystemFinder',* * 'django.contrib.staticfiles.finders.AppDirectoriesFinder',* * 'django.contrib.staticfiles.finders.DefaultStorageFinder',* *)* * * *STATICFILES_DIRS = ()* On Sat, Mar 26, 2011 at 9:49 PM, Igor Nemilentsev <trez...@gmail.com> wrote: > On 26-03-2011, Sandro Dutra <hexo...@gmail.com> wrote: > >Hello everyone! > > >I'm using Python 2.7.x with Django 1.3 and I've some questions about > >the new way to set the static files for the dev server. > > >abspath = lambda *p: os.path.abspath(os.path.join(*p)) > >PROJECT_ROOT = abspath(os.path.dirname(__file__)) > >(...) > >MEDIA_ROOT = abspath(PROJECT_ROOT, 'media') > >MEDIA_URL = '/media/' > >ADMIN_MEDIA_PREFIX = '/media/admin/' > > >STATIC_ROOT = abspath(PROJECT_ROOT, 'static') > >STATIC_URL = '/static/' > >STATICFILES_DIRS = ( > > abspath(STATIC_ROOT, 'css'), > > abspath(STATIC_ROOT, 'javascript'), > > abspath(STATIC_ROOT, 'images'), > >) > I had a similar problem. > I do not remember, but what I have in my project now > it is commented out STATIC_ROOT. > > If I uncomment STATIC_ROOT it do not work. > > STATIC_ROOT_FILES = os.path.join(os.path.dirname(__file__), > 'static').replace('\\', '/') > #STATIC_ROOT = STATIC_ROOT_FILES > STATICFILES_DIRS = ( > STATIC_ROOT_FILES, > ) > STATIC_URL = "/static/" > > -- > Practical politics consists in ignoring facts. > -- Henry Adams > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- Kind regards, Sultan Imanhodjaev +996 779 230 968 -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.