Friday, September 7, 2012

Re: Virtualenv changes url reverse behaviour

Are you certain that you don't have an absolute path lurking somewhere
in your code?

On Fri, Sep 7, 2012 at 3:36 PM, William Hart <hart.wl@gmail.com> wrote:
> Hi all,
> I've made a post on stack overflow, but I'm not sure if this is some kind of
> weird bug or just something silly I'm doing. (see
> http://stackoverflow.com/questions/12310608/running-virtualenv-on-django-app-kills-my-urls).
>
> Basically I have an existing app with working urls set up like the
> following:
>
> url(r'^$', 'myapp.views.Dashboard', name="dashboard"),
>
>
> And used in templates like so:
>
> {% url 'dashboard' %}
>
>
> I pip freeze > requirements.txt, and then create and activate a virtual
> environment (virtualenv venv --distribute --no-site-packges). As soon as I
> activate this virtual environment I get a NoReverseMatch error for every url
> in my application except admin urls. If I remove the single quotes from the
> url tag above, {% url dashboard %}, it works fine so I have a work around
> for the problem.
>
> I have tried all the usual stuff, reinstalling virtual environments and
> making sure the Django versions are the same inside and outside the virtual
> environment. Any thoughts?
>
> --
> 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/-/RZOAigB-IhsJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate