how can i create a user instance without savig it to the db?
koell has quit
Kayra has quit
willingc joined the channel
twilling joined the channel
jrm2k6 has quit
benwilber has quit
mattmcc
djapo: Same as any other model, just instantiate it.
djapo
mattmcc: like modelname.objects.create(**kwargs) or modelname(**kwargs)?
newzen joined the channel
FunkyBob
no
that saves it
u = User(*kwargs)
will _instanciate_ it
djapo
neat
dfunckt has quit
jeffisabelle has quit
FunkyBob
just like, in fact, any other Python class
jeffisabelle joined the channel
Frosh has quit
Leeds joined the channel
Z_A_M has quit
Left_Turn has quit
McMAGIC--Copy has quit
McMAGIC--Copy joined the channel
dump joined the channel
iqualfragile_ joined the channel
iqualfragile has quit
lduros has quit
willingc has quit
rh0dium has quit
Mechanimal has quit
NomadJim has quit
Left_Turn joined the channel
willingc_ joined the channel
genomespam has quit
Z_A_M joined the channel
johtso has quit
siqi joined the channel
edbaffei has quit
m0rpho has quit
warjin joined the channel
siqi has quit
dkog joined the channel
richardiii has quit
Sanukode joined the channel
Sanukode
Hi!!
richardiii joined the channel
does anyone know how to remove the cache in a some "View" in django?
NomadJim joined the channel
epicowl joined the channel
nkuttler
Sanukode: how did you set the cache?
richardiii has quit
lduros joined the channel
lduros has quit
Sanukode
I want to know if exist a decorator to remove cache a view
i need remove a cache to view
"@cache_page(0)" <-- this work to a set a view like no-cache page?
nszceta has quit
watermel0n has quit
djapo
for password reset, do ya'll use django.contrib.auth.tokens.default_token_generator or what other logic is therethat could be better?
and what are the downfalls of using default_token_generator?
patrick91 has quit
FunkyBob
Sanukode: but did you enable cache for it in the first place?
djapo: I just use the built in passwor reset views
Sanukode: there's no point disabling a cache that isn'tenabled
Sanukode
not, my idea is to force that has no cache
FunkyBob
Sanukode: browser or server side caching?
Sanukode
you say that mi view don't have any conf about cache, mi view always will be a page without cache?
FunkyBob
I'm saying that unless you explicitly turn it on, Django does no page caching
however, if you want to tell the _browser_ to not cache the page, there's django.views.decorators.cache.never_cache
Sanukode
:o
frewsxcv________ joined the channel
FunkyBob
Sanukode: so... can we start with why you want to "remove cache to a view"?
frewsxcv________
Is there a way to make the Meta class of Form class Foo inherit the Meta class of Form class Bar without having to do `class Meta(Foo.Meta)`
errr `class Meta(Bar.Meta):`
mattmcc
frewsxcv________: No, that's how inheritance works in Python.
FunkyBob
mattmcc: was about to say exactly that :P
frewsxcv________
i don't work with inner classes much. wasn't sure if there was a way to make the inner class inherit the same thing as the outer class
or if it does that automatically
FunkyBob
they're nothing magic
they're just classes defined inside the scope of another class
frewsxcv________
gotcha
oslvbo has quit
FunkyBob
it's only because of the meta-class that they do anything special in this context
Manyman has quit
maroloccio has quit
willingc_ has quit
richardiii joined the channel
willingc joined the channel
dray3 joined the channel
georgeirwin joined the channel
dlogs has quit
dlogs joined the channel
djapo
for forms, if i want to add an extra clean method, is creating a method with the prefix clean_ as its name enought to have it called automaticlly and what should/can it return?