Or just use the templatetag approach mentioned earlier.
--
Derek
--~--~-~--~~~---~--~~
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 unsubscri
plungerman wrote:
> perfect, just what we needed. one thing i noticed, however, is that
> this manoeuvre does not work with 404.html and 500.html type pages.
This is because they use a simple Context, not RequestContext.
> we
> have custom templates for those two errors, and the variable is n
perfect, just what we needed. one thing i noticed, however, is that
this manoeuvre does not work with 404.html and 500.html type pages. we
have custom templates for those two errors, and the variable is not
available in those templates. anyone have a suggestion how one might
make the variable a
On 6/14/06, plungerman <[EMAIL PROTECTED]> wrote:
> that is precisely what i would like to do. how you access a
> variable defined in settings.py from a template tho? i have
> not been able to track this bit down.
>
James Bennett recently posted an excellent article on this very
subject which o
On 6/14/06, plungerman <[EMAIL PROTECTED]> wrote:
> that is precisely what i would like to do. how you access a
> variable defined in settings.py from a template tho? i have
> not been able to track this bit down.
Here's what I have.
in settings.py:
APP_BASE = "http://www.mysite.org/";
in tem
ChrisW wrote:
> I had thought of doing this, but after not seeing it in anyone elses
> code, I wasnt sure if:
> a) it was the "right thing to do". b) how to do it properly.
>
In all (both :-) ) my projects I use a context processor to have {{
style_url }} and {{ js_url }} in templates. This is
On 06/14/06 10:07, limodou wrote:
>> > One method:
>> >
>> > set a "base" tag in template, so this tag will point the root uri of
>> > this page, and other uris can be related with this uri.
>> >
>> > Two method:
>> >
>> > Define some template variables used for root uri, and using them in
>> > ur
> > One method:
> >
> > set a "base" tag in template, so this tag will point the root uri of
> > this page, and other uris can be related with this uri.
> >
> > Two method:
> >
> > Define some template variables used for root uri, and using them in
> > urls. So you can define them in settings.py o
hi, i just saw this documents, maybe it can help you.
from django.conf.settings import
the full url:
http://www.djangoproject.com/documentation/settings/
On 6/14/06, plungerman <[EMAIL PROTECTED]> wrote:
>
>
> limodou wrote:
> > On 6/14/06, ChrisW <[EMAIL PROTECTED]> wrote:
> > >
> > > Let me r
limodou wrote:
> On 6/14/06, ChrisW <[EMAIL PROTECTED]> wrote:
> >
> > Let me rephrase this. I don't disagree with absolute URL's per se, but
> > there should be someway of abstracting them further than is currently
> > available.
> >
> > Lets say that your media server's address changes, doesnt
On Tue, 2006-06-13 at 18:59 -0500, James Bennett wrote:
> On 6/13/06, ChrisW <[EMAIL PROTECTED]> wrote:
> It's not that "media" and "structure" are separated, it's that with
> Apache/mod_python it's better for performance reasons to use a
> separate web server for media files, stylesheets and Java
On 6/14/06, ChrisW <[EMAIL PROTECTED]> wrote:
>
> Let me rephrase this. I don't disagree with absolute URL's per se, but
> there should be someway of abstracting them further than is currently
> available.
>
> Lets say that your media server's address changes, doesnt it seem silly
> to have to go
James,
Thank you for your replies.
> settings.MEDIA_URL contains info on this; if you're worried about that
> use it to build up the links (e.g., write a templatetag that pulls it
> in, or a context processor that puts it in the template context.
I had thought of doing this, but after not seein
On 6/13/06, ChrisW <[EMAIL PROTECTED]> wrote:
> Lets say that your media server's address changes, doesnt it seem silly
> to have to go through ALL of your templates to change those absolute
> URL's?
settings.MEDIA_URL contains info on this; if you're worried about that
use it to build up the lin
Let me rephrase this. I don't disagree with absolute URL's per se, but
there should be someway of abstracting them further than is currently
available.
Lets say that your media server's address changes, doesnt it seem silly
to have to go through ALL of your templates to change those absolute
URL'
On 6/13/06, ChrisW <[EMAIL PROTECTED]> wrote:
> I also noticed that the djangoproject webistes templates are full of
> absolute hrefs to stylesheets and other *media*. Does anyone else think
> this is a bad idea?
Why is it a bad idea to have a site's templates reference that site's
stylesheets an
I don't know the status but read this to see some past thoughts on the
topic:
http://groups.google.com/group/django-developers/browse_thread/thread/a5d12bc4fb073f24/83d7e4cb5f35ed08
There are other threads pre-dating that one as well...
--~--~-~--~~~---~--~~
You
bump :)
I also noticed that the djangoproject webistes templates are full of
absolute hrefs to stylesheets and other *media*. Does anyone else think
this is a bad idea?
ChrisW.
plungerman wrote:
> greetings,
>
> in an attempt to better understand, django from a systems perspective,
> i have bee
18 matches
Mail list logo