List Info

Thread: Customising Admin




Customising Admin
user name
2006-03-28 08:49:30
Just to learn Django, I'm 'porting' a small CMS I wrote
in PHP for a
customer. While the standard admin buttons "Save an
add another", "Save
and continue editing" and "Add ..." makes
perfectly sense in most of
the back-end functionality, I have one page where it
doesn't: A
Settings page where things like No. of Articles to list on
the first
page, image widths, paths etc. can be set.

This is just a single page with a bunch of textfields,
checkboxes etc.
In DB it's only one row. I set default values in the model.
Optimally
there is only a "Save" button and when the user
clicks "Configuration"
in the Admin Index, he should go directly to this page.

So what I wonder is: How to bypass the Add-mechanism and how
to remove
the buttons I don't need?

Considering the absurd amount of time I spent writing this
back-end in
PHP, Django generally feels like a ligther compared to a
flintstone.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Customising Admin
user name
2006-03-28 16:15:21
If you only give the user permission to change your object,
they will
not see an add button when they log in.

On 3/28/06, Rune Strand <rune.strandgmail.com> wrote:
>
> Just to learn Django, I'm 'porting' a small CMS I
wrote in PHP for a
> customer. While the standard admin buttons "Save
an add another", "Save
> and continue editing" and "Add ..."
makes perfectly sense in most of
> the back-end functionality, I have one page where it
doesn't: A
> Settings page where things like No. of Articles to list
on the first
> page, image widths, paths etc. can be set.
>
> This is just a single page with a bunch of textfields,
checkboxes etc.
> In DB it's only one row. I set default values in the
model. Optimally
> there is only a "Save" button and when the
user clicks "Configuration"
> in the Admin Index, he should go directly to this page.
>
> So what I wonder is: How to bypass the Add-mechanism
and how to remove
> the buttons I don't need?
>
> Considering the absurd amount of time I spent writing
this back-end in
> PHP, Django generally feels like a ligther compared to
a flintstone.
>
>
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Customising Admin
user name
2006-03-28 20:47:00
Thanks!  I tried that now. The Add-button disappears, but
alas the
'Save and add another' button is still there and gives an
unfriendly
"Permission denied" if clicked.

I've been reading the Model docs and the META docs, but I
can't find
any obvious way.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Customising Admin
user name
2006-03-28 22:32:16
On 3/28/06, Rune Strand <rune.strandgmail.com> wrote:
> Thanks!  I tried that now. The Add-button disappears,
but alas the
> 'Save and add another' button is still there and
gives an unfriendly
> "Permission denied" if clicked.

Hey Rune,

That problem has been fixed in Django's development branch
and will no
longer be an issue in the next release.

For now, you could hack around it by removing that button
with
JavaScript using the admin.js hook...

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Customising Admin
user name
2006-03-29 06:27:37

Adrian Holovaty wrote:
> Hey Rune,
>
> That problem has been fixed in Django's development
branch and will no
> longer be an issue in the next release.
>
> For now, you could hack around it by removing that
button with
> JavaScript using the admin.js hook...
> 
> Adrian

I see!  I'm in no rush so I can wait  Thanks a
lot.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )