I, too, struggle with this frequently.
On Wednesday, July 2, 2014 9:07:04 PM UTC-6, Jon Dufresne wrote:
>
> I'm reporting this to the developers list as I feel this shows a
> shortfall in (to me) expected behavior. I'm not sure this is exactly a
> bug or simply a use case the unique validation w
I don't think this is possible to do generally. What would count__gt=1 or
pub_date__month=12 do?
On Friday, June 6, 2014 3:50:08 PM UTC-6, Patrick Bregman wrote:
>
> Hi all,
>
> First of, I'm new to this list so please tell me if there's something that
> can be done better. It's the best way to
Every time I get a failure on one of these types of tests I go in and edit
the code to print out the queries that were executed. There's no way to
troubleshoot the problem without know the queries.
On Wednesday, November 13, 2013 11:37:43 PM UTC-7, Dominic Rodger wrote:
>
> Currently, when asser
This topic was also discussed during the deprecation of
TransactionMiddleware and the introduction of ATOMIC_REQUESTS. The existing
middleware semantics can't guarantee that __exit__ (during
process_response) will get called no matter what, necessitating the setting
that invokes BaseHandler.ma
> The current User model is great for admin panel users but in frontend it
may become extra overhead for some cases. People try to create another user
attribute models and use extra joins to be able to keep extra attributes
(city, ip, locale etc.) for their users.
Use the user-profile
pattern<
> The intention was to mark a particular model as a something that can be
replaced.
It's hard to find the original rationale behind swappable, but my mental
model was always:
A model with `swappable = 'x'` means that the model should only be
loading if settings.x is set to that same model
> Note that EmailUser *doesn't* have a Meta: swappable definition. There is
nothing on this model that says "I am swappable", or "I am an appropriate
substitute for User".
Ah, this is were the misunderstanding was. authtools does actually set
swappable on its replacement user, too[1]. The two d
Some of the built-in auth forms only work on user models whose
`USERNAME_FIELD` is `username`. It is possible to remove this constraint
and allow them work on any user model. [django-authtools][1] demonstrates
this possibility.
The two forms in question are `UserCreationForm` and `UserChangeFor
each class that wants to
use a decorator.
Its implementation is simple: https://gist.github.com/gavinwahl/5694349.
This is a complete implementation, and is all that's necessary to use view
decorators with Django's CBVs. I use this code in all my projects with
great success. [H