Re: Help with Django base template and CSS

2006-03-05 Thread layik


thebubblejungle wrote:
> You might be able to fix that by using myapp/BaseOrAnotherTemplate. I
> managed to get that part working! Also, if you have a setup like
> /templates/myapp/ this is why it maybe can't find the file.

my directory structure is exactly that way. But it still doesnt accept
it!

> My urls.py file is:
>
> from django.conf.urls.defaults import *
>
> urlpatterns = patterns('ourproject.leaguemanager.views',
> (r'^admin/', include('django.contrib.admin.urls.admin')),
> (r'^$', 'index'),
>
> (r'^results/(?P\d+)/(?P\d+)/(?P\d+)/$',
> 'results'), #by league, season, division
> (r'^media/(?P.*)$', 'django.views.static.serve',
> {'document_root': "J:/University of
> Leeds/se12/project/ourproject/media", 'show_indexes': True}),
> )


I am studying at the university of Leeds, TOO. But I am FAR LESS
skilled in all this. and Django is my first Web Development experience.

> I've decoupled the URLs as mentioned in the documentation. But, is that
> pattern being appended to django.views.static.serve also?
> 
> m

I wish I could help you!


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Help with Django base template and CSS

2006-03-04 Thread BrandonC

(r'^media/(?P.*)$', 'django.views.static.serve',
{'document_root': 'path/to/document/root/media', 'show_indexes':
True}),

As a temporary measure you can add a line like this to your urls.py in
order to serve media when developing, replacing the path line with an
absolute path to your media.  Ideally is should be done through your
web server though.

See: http://www.djangoproject.com/documentation/static_files/


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Help with Django base template and CSS

2006-03-04 Thread xi Stan

error when run manager.py init

log show below

C:\djangosite>python mytest01\manage.py init
Error: Your action, 'init', was invalid.
Run "mytest01\manage.py --help" for help.

then i try manager.py --help

in action list really have no init option! I use the remove magic version.

Does anyone know how? thank you.


2006/3/5, thebubblejungle <[EMAIL PROTECTED]>:
>
> Cheers,
>
> So if I upload my files to a directory (media) on my Linux server,
> www.foo.com say, I need to add:
>
> /public_html/media/www.foo.com/ to the MEDIA_ROOT
> and http://www.foo.com/ to MEDIA_URL to settings.py
>
> In my base template, can I just use style.css or do I need to point to
> the absolute reference of the file?
>
> m
>
>
>
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Help with Django base template and CSS

2006-03-04 Thread Wilson Miner

I meant to say "that's just for development, NOT production".

On 3/4/06, Wilson Miner <[EMAIL PROTECTED]> wrote:
> Django doesn't serve media (images, css, etc.). The development server
> handles the media necessary for the admin interface, but that's just
> for production. You'll need a regular web server (Apache, lighttpd,
> etc.) to serve your media. Once you've got that going, you'll need to
> update the MEDIA_ROOT and MEDIA_URL settings in your Django settings
> file (see http://www.djangoproject.com/documentation/settings/#media-root
> ).
>
> Hope this helps!
>
> Wilson
>
> On 3/4/06, thebubblejungle <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I'm fairly new to Django and have a project at University where I am
> > creating a league table manager with a web interface. I'm having
> > problems viewing CSS in my templates online i.e.
> > http://localhost:8000/leaguemanager/ shows an index page which links to
> > style.css, but in the server window I'm seeing a 404 2189 error.
> >
> > My directory setup is:
> >
> > /templates
> > ../leaguemanager
> > style.css
> > base.html
> > index.html
> > /ourproject
> > ../leaguemanager
> > /models
> >
> > index.html inherits from base.html, which has references to style.css.
> > Everything else seems to be working OK, just not being able to locate
> > the style.css file.
> >
> > Any help would be appreciated,
> >
> > Mark Hawker
> >
> >
> >
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Help with Django base template and CSS

2006-03-04 Thread Wilson Miner

Django doesn't serve media (images, css, etc.). The development server
handles the media necessary for the admin interface, but that's just
for production. You'll need a regular web server (Apache, lighttpd,
etc.) to serve your media. Once you've got that going, you'll need to
update the MEDIA_ROOT and MEDIA_URL settings in your Django settings
file (see http://www.djangoproject.com/documentation/settings/#media-root
).

Hope this helps!

Wilson

On 3/4/06, thebubblejungle <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I'm fairly new to Django and have a project at University where I am
> creating a league table manager with a web interface. I'm having
> problems viewing CSS in my templates online i.e.
> http://localhost:8000/leaguemanager/ shows an index page which links to
> style.css, but in the server window I'm seeing a 404 2189 error.
>
> My directory setup is:
>
> /templates
> ../leaguemanager
> style.css
> base.html
> index.html
> /ourproject
> ../leaguemanager
> /models
>
> index.html inherits from base.html, which has references to style.css.
> Everything else seems to be working OK, just not being able to locate
> the style.css file.
>
> Any help would be appreciated,
>
> Mark Hawker
>
>
>
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---