Adrian Holovaty wrote:
> On 10/22/05, stava <[EMAIL PROTECTED]> wrote:
> > Do you have a similar trick for the object list view?
>
> Sure! To view the automatically-generated template for the object list
> view, find the line "t =
> loader.get_template_from_string(''.join(raw_template))" (line 492) in
> django/contrib/admin/views/main.py, and put the following line before
> it:
>
> return HttpResponse(raw_template, mimetype='text/plain')

OK, thanks, I'll try that.

> > Also, I got the following traceback when trying out the new templates:
> >
> >   File "/usr/lib/python2.3/site-packages/django/core/handlers/base.py",
> > line 68, in get_response
> >     response = callback(request, **param_dict)
> >
> > TypeError: object_list() got an unexpected keyword argument
> > 'login_required'
> >
> > I don't expect this to have anything to do with the templates, I'm just
> > a bit lost as to what to do about it. My application would require a
> > logged in user at all times.
>
> Which steps did you take to cause this error? I.e., how did this error
> start happening?

Stupid mistake, turns out that I tried to force the user to be logged
in by adding 'login_required' to the dictionary passed to the view in
my ursl.py. I removed that and it works.

BTW, how do I go about requiring a logged in user when using generic
views on my public site (i.e. not admin).

> > About the new-admin branch, I discovered that I could check out that
> > branch which contains the entire django stuff (as it seems). Would you
> > think the new-admin branch is mature enough to be used instead of the
> > trunk?
>
> I've never used the new-admin branch myself, so I can't vouch for its
> stability or maturity. It's completely unofficial (and under heavy
> development) at this point.

I'll have to stay clear of that one for a while, thanks.

R
/LarS

Reply via email to