On Monday, 3 June 2013 15:50:21 UTC+1, huw_at1 wrote:
> Hi there, I've run into an issue whereby on production my Django project
> is accessed from a URL such as http://example.com/django_project/. Apache
> is configured to host the code under this URL since I do not want the
> entire site managed by the Django project. My problem is that when I run
> the Django test server I have a lot of broken links as it wants to run the
> project from 127.0.0.1 instead of 127.0.0.1/django_project/. Ideally I'd
> like to have the Django test server reproduce the apache configuration.
> What is the best way to resolve this does anyone have any experience?
>
> Many thanks
>
> Huw
>
You should not hard-code any links. If you use `{% url %}` tags everywhere
in templates, and `reverse()` everywhere in views, Django will just Do The
Right Thing and calculate the correct links, according to the mount point
of your site.
--
DR.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.