interestingly changing candidate = request.candidate (retrieved from
middleware) to candidate = Candidate.objects.filter(user=request.user)
and then doing .delete() works.
Very strange behaviour. I don't understand the ORM well enough to know
why it would get confused.
On Jan 12, 2:43 pm, Szymon
The candidate object is attached to the request object by middleware.
class CandidateCheckMiddleware(object):
def process_view(self, request, view, args, kwargs):
candidate = request.user.is_authenticated() and \
Candidate.objects.filter(user=request.user)
if candi
On 12 Sty, 15:40, John Baker wrote:
> # later in code trying to delete
> candidate.delete()
>
> Any clues? (Django 1.0.2 final)
You need to provide how you fetch objects, I mean code before
cadidate.delete().
--~--~-~--~~~---~--~~
You received this message because
3 matches
Mail list logo