Tom - thanks so much. I was able to resolve it.
On Thursday, November 29, 2012 10:00:26 AM UTC-8, Sammy wrote:
>
> Hello django experts
> I am unable to get my static files to work. Here are my settings:
>
> projectfiles
> |
> |-----myproject
> | |
> | |-----static
> | | |
> | | |-----css
> | | |-----js
> | |-----__init__.py
> | |-----settings.py
> | |-----urls.py
> | |-----wsgi.py
> |
> |-----myapp
> |
> |-----templates
>
>
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>
> settings.py
> import os
> SITE_ROOT = (os.path.realpath(os.path.dirname(__file__))).replace('\\','/')
> DEBUG = True
> MEDIA_ROOT = (os.path.join(SITE_ROOT, '/static')).replace('\\','/')
> MEDIA_URL = '/static/'
> STATIC_ROOT = ''
> STATIC_URL = ''
> STATICFILES_DIRS = ()
> STATICFILES_FINDERS = (
> 'django.contrib.staticfiles.finders.FileSystemFinder',
> 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
> 'django.contrib.staticfiles.finders.DefaultStorageFinder',
> )
>
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>
> urls.py
> urlpatterns = patterns('',
> (r'^myurl/$', myview),
> )
>
>
> from myproject.settings import DEBUG
> if DEBUG:
> urlpatterns += patterns('', (r'^static/(?P<path>.*)$',
> 'django.views.static.serve',
>
> {'document_root': 'static'}))
>
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> the app works fine but no connection to my css's or javascripts.
>
> I'm using pycharm if that makes a difference.
>
> Any help would be greatly appreciated.
>
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-users/-/u2SucG6Hd94J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.