pembo13, don't you want to set the password field to '!' in sql ?
pembo13
zeograd: is that what that function does?
zeograd
password is usable if set and different from '!'
which is a constant (UNUSABLE_PASSWORD) which can't be a valid hash
pembo13
zeograd: that's the answer to my question then, thanks
the_rat_ has quit
zeograd
you're welcome
garretraziel joined the channel
pembo13
another issue I have is that I am getting "Unknown password hashing algorithm" against the built-in authentication backend if a user's password is wrong
the_rat joined the channel
i have a custom auth backend
mlavin has quit
but if the password is wrong, it seems like the contrib.auth default backend is used, but that is consistently throwing a "Unknown password hashing algorithm"
it's using the password itself as the hash
garretraziel
Hi, I have problem with logout view. I'm using django.contrib.auth.views.logout, I created my own template, set LOGOUT_URL in settings, but still, if I go to address associated with logou view, it shows "django admin" logout.
jdunck has quit
ehazlett joined the channel
epiloque has quit
savid has quit
b3free joined the channel
pembo13
i see the problem, looks like i missed a step in my read of the docs, I was setting user.password directly instead of using make_password
Ixbidie has quit
houssein has quit
the_rat has quit
ovnicraft has quit
b3free has quit
fission6
garretraziel: post some code, urls.py specifically
i'd rename it to registraion/logout.html and pass that in your url {'template_name':'registration/logout.html'}
leetrout joined the channel
or again use ?next=/logout or whatever
quake_guy has quit
wittgenstein has quit
j_syk has quit
gawry joined the channel
atula has quit
sivy joined the channel
ehazlett has left the channel
garretraziel
ok, thanks, will try
trang has quit
ok, now it works, thank you
wenzhixue has quit
juliaelman has quit
kristianroebuck has left the channel
fission6
yep
foundatron joined the channel
bak1an has quit
natea joined the channel
brainwarped
in my views, if I have a "def done", and I do an if statement and call "return", does that return end the "def done" script(ie, no further lines are executed within the def)?
FunkyBob
return exits the function.... unless it's within a "finally" clause of a try
sorry, within a try block wityh a finally clause, I mean
brainwarped
FunkyBob: Thanks! that explains a lot:)
FunkyBob
basic Python
if it's in a ftry block with a finally... it exectures the finally, _then_ exits the function
brainwarped
FunkyBob: I tried to do the dive into python training, but I never found the time:(
joshfinnie has quit
thiagoss
Hi, I'm having a user login successfully and at the next page access request.user points to anonymous user
brainwarped
FunkyBob: but now that you mention "finally", I recall reading about this before, but it hasn't come up in a couple months (since I started with django).
thiagoss
I can confirm that at the end of the login view function the session has the user login info correctly and request.user points to the user
jdunck joined the channel
jspiros has quit
__love__ joined the channel
mgrouchy has quit
tbaxter
thiagoss: does the next page have request context?
dan_johnsin
anyone have any experience with django_rq?
mengu has quit
lapilofu has quit
mengu joined the channel
tocf has quit
rideh joined the channel
bluepnume has quit
bforbes has quit
thiagoss
tbaxter, the login page returns a redirect (302), should it need to do anything else? This code used to work on another computer.
bluepnume joined the channel
dbrgn
does someone in here have experience with django-rulez? i can't get it to work with django-admin :/ i want members of a group to be able to edit only their own objects via admin. is that possible?
tbaxter
thiagoss: the login page is almost surely fine. My bet is either the page it's going to doesn't have requestContext, or there's a cookie problem.
caleb_smith has quit
aezell has quit
tbaxter has quit
areski has quit
napperjabber has quit
garretraziel has quit
zoumpis has quit
maZtaiR has quit
twikz joined the channel
lapilofu joined the channel
jspiros joined the channel
JJMalina has quit
wstearns has quit
smcoll has left the channel
ryanisnan
This may not be a very well formulated question, so apologies in advance. I have a model which uses a `GenericRelation` to an object - let's call them Likes, for example. I also have a Tastypie endpoint setup to allow POSTing to that resource. I'd like to set up a system where users can only 'Like' an object who's class has a corresponding `likes` GenericRelation. How can something like this be achieved?
nedbat has quit
frequant has quit
neosergio has quit
svetlyak40wt has quit
foundatron has quit
hell_razer joined the channel
FunkyBob
ryanisnan: so, you want ti limit what can be Liked?
ryanisnan
FunkyBob: Essentially, yes :)
FunkyBob
you could use a limit_choices_to on the content-type fkey
ryanisnan
FunkyBob: Ah… I would like to do this programatically, if possible.
beacon joined the channel
FunkyBob: I'm envisioning a system where, if a model has a GenericRelation to the Like object, it'd be allowed, for example.
FunkyBob
so, not so much "programatically", as declaratively
FunkyBob: It becomes slightly problematic when I want to open source this app I'm working on - if I have limit_choices_to in my model, that's only as useful to myself.
FunkyBob
yeah... basically a "I'll only love you if you love me back" scenario
vakaras has quit
ryanisnan
Basically :)
FunkyBob
so... a registration pattern?
ryanisnan
Hmm… Perhaps. I'll be honest, I'm not entirely sure what you mean.
FunkyBob
like with admin....
things have to register if they want to be "in it"