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
5
votes
1 answer

Can the Admin UI be used without the user authenticating in Django 1.3?

I was wondering if there's an easy way to configure the Django Admin UI (eg at http://mysite.com/admin) so that I don't need to authenticate/login? I've tried tweaking urls.py but couldn't get it to bypass the login screen: urlpatterns =…
5
votes
2 answers

Django admin: ManyToManyField in list_editable?

In the Django admin, I would really like to be able to display an editable ManyToManyField in the list display. It doesn't necessarily need to be the full ManyToManyField control - being able to save just one value would be good enough for the…
Richard
  • 62,943
  • 126
  • 334
  • 542
5
votes
1 answer

django prefetch when listing objects in admin

I have following models: class UserProfile(models.Model): name = models.CharField() info = models.OneToOneField(UserInfo, related_name='user') class UserInfo(models.Model): def __unicode__(self): return self.user.__unicode__() + self.age …
Juho Rutila
  • 2,316
  • 1
  • 25
  • 40
5
votes
2 answers

Closing a django admin add related object popup window on save

In the django admin, when a user successfully saves (after my clean method) a new or changed related object which was edited in a popup, I'd like the popup to close instead of going to a different view. I believe I could use response_change or…
Mitch
  • 2,350
  • 7
  • 29
  • 48
5
votes
3 answers

Redirecting in Admin Site

I have an app called CMS with Category and Article. Quite simple. I overwrite app_index.html to enable ajax-based drag-n-drop ordering and to move articles from one category to another. Now I would like to redirect after saving/deleting an article…
vikingosegundo
  • 52,040
  • 14
  • 137
  • 178
5
votes
0 answers

How to make Inline fields clickable in the object admin page? (Django)

I'm using Django 1.4. I have two types of objects: Parts and Chapters. Parts have many Chapters via a foreign key. In the admin page of a Part object, I wanted to see a list of the Chapters that 'belong' to that part. So I did this: from…
user1011444
  • 1,389
  • 2
  • 15
  • 25
5
votes
2 answers

Django Admin: populate the field based on previous field value

I have a model in django admin as follows ChoiceA= ( ("on-false","on-false"), ("on-true","on-true"), ) ChoiceB = ( ("always","always"), ("never","never"), ) id =…
arjun
  • 2,333
  • 4
  • 21
  • 21
5
votes
3 answers

no admin.py file in new django app

I'm new to Django and i've already come across a problem. I'm using Django 1.4.3 on OSX Mountain lion. When I start a new app using django-admin.py startapp "name" the app is created and all the necessary files are within it (__Init__.py,…
5
votes
7 answers

Django - A server error occurred. Please contact the administrator

I've just started learning Django and followed their tutorial to the letter. I've tried to set up the website three times, every time I was greeted with the same error (in the title). Again, followed their official tutorial to the letter. I'm at…
Bo Milanovich
  • 7,995
  • 9
  • 44
  • 61
5
votes
4 answers

Make the prepopulated slug field as readonly in Django Admin

I want to make the slug field as read_only depending on the other field value like "lock_slug". Means There will be Two conditions. 1) When value of "lock_slug" is false then the slug field directly prepopulated from the field…
Meenakshi
  • 259
  • 5
  • 19
5
votes
2 answers

Django Admin Search optimization

I have a CMS running on Django 1.4 and the database is Postgresql 9.1. I have a lot of content in the CMS and the issue I am facing right now is that the Django Admin search takes forever to retrieve the results. I would like to know if there are…
user710907
  • 762
  • 5
  • 12
5
votes
1 answer

how to manage permission table in django admin

When I use django admin, I can get Groups, Users management entrance on the dashboard? How can I get Permission table management entrance as pictures shows above? I am using django 1.4 . thx for ur time. EDITED: from django.contrib import…
Nick Dong
  • 3,638
  • 8
  • 47
  • 84
5
votes
1 answer

Django form validation depending on data in formset

I have the following code: from django import forms from django.core.exceptions import ValidationError class MyAdminForm(forms.ModelForm): class Meta: model = MyModel def clean(self): cleaned_data = self.cleaned_data …
user9903
5
votes
2 answers

Django admin save error: get_db_prep_value() got an unexpected keyword argument 'connection'

When I try and save (using the Django standard admin interface) I get the following error... TypeError at /admin/web/campaign/dc6eb21f-87fa-462f-88af-416cf6be37f6/ get_db_prep_value() got an unexpected keyword argument 'connection' Could someone…
Prometheus
  • 32,405
  • 54
  • 166
  • 302
5
votes
1 answer

Modify Django "save and add another" button to set initial value of field based on value of field on object just saved

I have a basic blog app with models Entry and Category. One of the fields in Entry is a ForeignKey to Category. When a user is adding an Entry and chooses to "save and add another', I'd like it if the Category of the new form is set to be equal to…
KrisF
  • 1,371
  • 13
  • 27