AttributeError When Overwritting AUTH_USER_MODEL in Test Cases

2016-02-08 Thread Aubrey Stark-Toller
Hello, When I override the AUTH_USER_MODEL setting to "auth.User", when AUTH_USER_MODEL in settings is not set to "auth.User", in either a TestCase or individual test, and then try to access the objects attribute on the user model, I get an AttributeError. The exact error I get is: AttributeEr

Re: Calling a function for a url tag parameter

2014-10-31 Thread Aubrey Stark-Toller
Hey, A filter would work better here if you can use one. The following should work: Defined as: @register.filter def encode_url(link_text): return link_text.replace(' ', '_') And in template: {% with state_url=flow.state.description|encode_url %} advance {% endwith %} Aubrey On Thu, Oct 30,

Re: Inspecting form errors in a view

2013-03-21 Thread Aubrey Stark-Toller
On Thu, Mar 21, 2013 at 03:40:39PM -0700, Rainy wrote: > I believe you can just set self.my_flag = foo in clean method and then > check for Cheers for the reply. I suspect my original mail could have clearer. Just setting attributes when checks fail seems to me to be the best way to do this, bu