Questions tagged [django-admin]

Django's built-in, automatic admin interface (django.contrib.admin) which is part of the Django Web framework for the Python programming language.

One of the most powerful parts of Django is the automatic admin interface. It reads metadata from your models to provide a quick, model-centric interface where trusted users can manage content on your site. The admin’s recommended use is limited to an organization’s internal management tool. It’s not intended for building your entire front end around.

-- Django Admin Documentation

Resources:

10185 questions
4
votes
3 answers

Performing a check when saving a model in Django's admin

I'd like to perform a check when saving a model via the django Admin panel. I thought about using ModelAdmin.save_model(), however, from the documentation it says: ModelAdmin.save_model() and ModelAdmin.delete_model() must save/delete the object,…
jeannicolas
  • 3,139
  • 4
  • 24
  • 25
4
votes
1 answer

Django - Admin : Editing child model without inlineForm

Standard example: class Author(models.Model): name = models.CharField(max_length=100) class Book(models.Model): title = models.CharField(max_length=100) author = models.ForeignKey(Author) #... Many other fields ... I'd like to edit the…
Pierre de LESPINAY
  • 44,700
  • 57
  • 210
  • 307
4
votes
0 answers

django admin multiple inline formsets custom delete for one of them

python 2.6.5 django 1.2.1 I have multiple inline formsets for 3 different classes, but one of them has a custom delete() method which I need to send extra arguments to. The main page has a custom save_formset method: def save_formset(self, request,…
Brian
  • 41
  • 4
4
votes
1 answer

Lookup admin change url for arbitrary Django model

How do you lookup the admin change url for an arbitrary model? If I know the model, I can get the url by doing something like: >>> print urlresolvers.reverse('admin:myapp_mymodel_change', args=(obj.id,)) /admin/myapp/mymodel/123/ I have a generic…
Cerin
  • 60,957
  • 96
  • 316
  • 522
4
votes
3 answers

Django-Admin: integrating custom forms

I am trying to build a import form for a CSV file into the admin interface for a given model. the view can be reached from the change_list of the model, but it throws a template syntax error. What am I doing wrong? Do I have to create my own…
bjoern
  • 95
  • 2
  • 5
4
votes
3 answers

Django-admin. Link to edit user profile from list_display

I inserted "creator"-method to my model like this: def creator(self): return self.user Then i'd add this line to Admin-class of this model^ list_display = ('title','created_at','votes','creator') And there was all good... usernames are…
korovaisdead
  • 6,271
  • 4
  • 26
  • 33
4
votes
1 answer

Django-nonrel can't login as super user to localhost admin site

I got the django-nonrel setup fine, and worked through the first 5 chapters of the djangobook without any real problems. I'm currently on chapter 6 which talks about creating the admin site. http://www.djangobook.com/en/2.0/chapter06/ But, I can't…
b-ryce
  • 5,752
  • 7
  • 49
  • 79
4
votes
1 answer

Django: admin.StackedInline with no foreign key

I have the following in admin.py class AdInline(admin.StackedInline): model = Ad class UnitAdmin(admin.ModelAdmin): fields = ('user', 'name', 'about', 'url', 'active', 'type') list_display = ('user', 'name', 'url', 'created', 'active',…
Mike
  • 7,769
  • 13
  • 57
  • 81
4
votes
3 answers

CSS broken on Django admin on developer server

I'm getting some really weird issues with the Django admin application. I'm running everything on the manage.py runserver development server, so I can't imagine what the issue would be, but I'm seeing something like this: Obviously, this isn't…
Naftuli Kay
  • 87,710
  • 93
  • 269
  • 411
4
votes
2 answers

Rich Text Editor in Django Admin with image upload

I'm looking for a good Rich Text Editor for the Django Admin Panel. I need an integrated with Django server which uploads the images. I also need a functionality of different configurations for two instances of RichText placed at one admin…
user828398
  • 41
  • 2
4
votes
2 answers

How possible to show external links in Django Admin Interface?

I need to generate external links in admin interface grid column, but they shows as html code: site Admin interface translates my links as html-entities and they doesn't shows as right links. Is it possible to…
ramusus
  • 7,789
  • 5
  • 38
  • 45
4
votes
2 answers

django admin filters cascading

I've got a question - can Django Admin interface be customized in such a way, that it presents only those filter options that occur in the subset of data matching currently selected filters? Say I have a db of three objects: a.Foo = "One" a.Bar =…
qdot
  • 6,195
  • 5
  • 44
  • 95
4
votes
2 answers

How do I display a confirmation message after a custom admin action with an intermediate page (in Django)?

The built-in actions that come with the Django admin generally display a helpful message after they execute at the top, e.g. saying that a new object was added or what have you. The docs show how to do it with simple actions that can be represented…
bdeniker
  • 995
  • 1
  • 9
  • 21
4
votes
2 answers

Custom latitude/longitude form field in Django

One of my models has latitude and longitude fields which are stored in the database as floating point numbers. I like to keep it this way, because it allows me to work with them most efficiently. I'd like the users to be able to edit them in the…
4
votes
3 answers

I have an error about smart_text after installing django-admin-charts

I want to have charts in the admin panel, I installed the django-admin-charts package, Which said add these to settings.py INSTALLED_APPS = ( 'admin_tools_stats', # this must be BEFORE 'admin_tools' and 'django.contrib.admin' …
user18556740
  • 57
  • 1
  • 4