Re: How to use Admin modules in my application

2007-07-08 Thread Angela Sutanto

On 7/8/07, Doug B <[EMAIL PROTECTED]> wrote:


> As tempting as the pretty admin interface
> might be, I think you would be better off rolling your own form and
> view for end users.  Then you have complete control.  Using the
> form_for_* functions you could have the whole thing done in a few
> minutes.

Maybe you are right and this is the solution my current Python/Django
knowledge seems to be sufficient for. But, this is 'quick and dirty'
solution and I'm affraid I can't present it to my Boss without a risk
I'd be fired and we can't interface out users/customers to such kind
of interface in 21th century...

> admin != user
> Atleast that's my view.

I don't agree in that point - from my perspective Django seems to be
the system, which is used by admins only (admin == user), because
admin's interface is pretty and much more user friendly comparing with
techniques for building ordinary user interface described in
documentation/tutorials, even if admins are used to talk to  machines
via text mode consoles :-O

I'm going mad if it is true that there is a valuable piece of
software, which is not possible to reuse in Django based applications.

Please, is there any other solution than copy functions from
admin.main module and modify source code properly?

Thanks, Angela

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: How to use Admin modules in my application

2007-07-07 Thread Doug B

admin != user

Atleast that's my view.  As tempting as the pretty admin interface
might be, I think you would be better off rolling your own form and
view for end users.  Then you have complete control.  Using the
form_for_* functions you could have the whole thing done in a few
minutes.

fetch user profile.
form_for_instance on user profile
in the post procesing double check userid then do a form.save() and
redirect.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



How to use Admin modules in my application

2007-07-07 Thread Angela Sutanto

Hi everybody,

I'd like to take advantage of Admin modules to edit some my models
e.g. user profile by navigating user to
/admin/myapp/// to open
change form.

1. I should check, whether  is the same as request.user.id to
prevent user from editing a foreign user record. But I don't know how to
implement this. Perhaps by overriding some model's method or listening
for a suitable signal.

2. In the related admin's template I need somehow override tag
submit_row to hide all buttons except Save one. As well, I have no idea
   how to do this.

3. Finally, is my conception of using Admin modules this way feasible per se?


Please, could somebody enlighten me on this?


Thanks, Angela

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---