On Sep 16, 5:42 pm, Dana <[EMAIL PROTECTED]> wrote:
> Kip, don't you mean {{ model.get_image_url }}?
>
get_FOO_url() has gone in Django 1.0.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To po
Kip, don't you mean {{ model.get_image_url }}?
Using {% url %}, get_absolute_url, MEDIA_ROOT, sites framework and
url.py should be able to accomplish what you are looking to do and
more. Also look into the permalink decorator while you're at it.
Good luck!
On Sep 16, 8:27 am, Kip Parker <[EMAIL
No, nothing to do with HTTP_HOST, that comes from the server.
The point of the sites framework is to differentiate between different
sites, so a * site would be pointless.
If I were you I'd sort out my templates so that instead of
/some/media/location/css/styles.css
you have
{{MEDIA_URL}}/css/st
Thank you Kip.
Call me stupid but does site framework have something to do with HTTP
HOST header?
But in my case the site is for ANYSITE, no matter you visit the site
by IP, domain, or even customized CNAME you cann visit the site with
out any problem (Why there isn't a wildcard * in site framew
> no, it's not THAT simple.
It really is that simple, honest, but your brain has made it all
complicated. Look at http://docs.djangoproject.com/en/dev/ref/contrib/sites/
(sites framework), TEMPLATE_CONTEXT_PROCESSORS setting and
RequestContext and the URL dispatcher docs, the answers to your
pro
On Tue, Sep 16, 2008 at 10:02 AM, est <[EMAIL PROTECTED]> wrote:
>
> Today, my boss came to me and asked: "Please move our django site from
> http://xxx.com/ to http://xxx.com/v2/";
>
> It's killing me. Just image how huge mount of HTML source code to
> modify.
> I STRONGLY suggest django implem
On 16 Sep 2008, at 9:53 am, Donn wrote:
> How about
> 1. making a link under /var/www/assets to /whatever/v2/assets
> 2. move your assets directory into /whatever/v2/
> 3. setup your webserver to go look at /var/www/assets when media is
> served.
>
> You should be able to arrange something lik
On Tuesday, 16 September 2008 10:32:54 est wrote:
> http://xxx.com/assets/main.css
> Now the problem is, how can I massively move all template under a new
> sub-directory URL like http://xxx.com/v2/ ?
How about
1. making a link under /var/www/assets to /whatever/v2/assets
2. move your assets dire
First thanks all of you for the quick reply!
On Sep 16, 4:10 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote:
> Wiadomość napisana w dniu 2008-09-16, o godz. 10:02, przez est:
>
>
>
>
>
>
>
> > Today, my boss came to me and asked: "Please move our django site from
> >http://xxx.com/tohttp://xxx.com/v2/
Seems like you have a lot of URLs hardcoded -- you shouldn't do that.
Use MEDIA_URL for static media files and the {% url %} tag for dynamic
URLs (or django.core.urlresolvers.reverse in Python code).
Erik
On 16.09.2008, at 11:02, est wrote:
>
> Today, my boss came to me and asked: "Please m
The domain isn't changing. It's just the path, so links that use
absolute paths will break. In a way I get it - using relative urls is
easy to break something if you need to move it. Also copy & paste
becomes hard. Perhaps an APPNAME_URL in your request context would
help?
Tim ^,^
2008/9/16 Ja
Isn't that what MEDIA_URL is for? At least for your images and css
resources. And as for the rest of the urls... urls.py?
Tim ^,^
On Tue, Sep 16, 2008 at 9:02 AM, est <[EMAIL PROTECTED]> wrote:
>
> Today, my boss came to me and asked: "Please move our django site from
> http://xxx.com/ to htt
Wiadomość napisana w dniu 2008-09-16, o godz. 10:02, przez est:
>
> Today, my boss came to me and asked: "Please move our django site from
> http://xxx.com/ to http://xxx.com/v2/";
>
> It's killing me. Just image how huge mount of HTML source code to
> modify.
>
> I STRONGLY suggest django implem
Today, my boss came to me and asked: "Please move our django site from
http://xxx.com/ to http://xxx.com/v2/";
It's killing me. Just image how huge mount of HTML source code to
modify.
I STRONGLY suggest django implement a 'project url' like asp.net, say
where ~ always points to the current d
14 matches
Mail list logo