Re: Admin functionality available on public site

2006-01-20 Thread [EMAIL PROTECTED]

Hi if your just looking to steal great swathes of the fabulous admin
code the clever people at django wrote then I did find a natty way of
doing that.

In my views.py I created functions that look a bit like this

from django.contrib.admin.views.main import add_stage, change_stage

def do_change_stage(request, app_label, module_name, object_id):
return change_stage(request, app_label, module_name, object_id)

It may be breaking some cardinal rule of django but it seems to work
you can then mess around with making custom templates by puting them in
templates_dir/admin/app_name/module_name

If people don't jump down my throat crying "You can't do that" and
you're interested I can give you more details

Regards 
Charlie



Re: Admin functionality available on public site

2006-01-19 Thread Max Battcher


[EMAIL PROTECTED] wrote:

Yes, this is what I meant. I'm looking for a way to use admin ui forms
in my templates.


Here is what I have found, you have two major ingredients for this:

Forms and Manipulators: http://www.djangoproject.com/documentation/forms/

Create/Update/Delete Generic Views:
http://www.djangoproject.com/documentation/generic_views/#using-create-update-delete-generic-views

Mix and match these two in a good cocktail sauce and you have 
admin-style ui forms ala django.  (Mmm, tasty.)


--
--Max Battcher--
http://www.worldmaker.net/


Re: Admin functionality available on public site

2006-01-19 Thread [EMAIL PROTECTED]

Yes, this is what I meant. I'm looking for a way to use admin ui forms
in my templates.



Re: Admin functionality available on public site

2006-01-19 Thread Eric Walstad

On Thursday 19 January 2006 13:15, [EMAIL PROTECTED] wrote:
> I was wondering what would be the
> easiest and most portable way to add selected admin functionality to my
> public site, i.e. I would like certain apps to be fully editable by
> authenticated users without directing them to admin site. Any ideas?

I'm not entirely clear on what you want.  Are you looking for admin ui forms 
outside of the admin application?  If so, I think you'll have to roll your 
own.  If not, then the following might help as it demonstrates 
authentication: