django-admin Questions

3

Solved

I'm using a soft delete in my django admin, done like this. The issue is that when I delete a foreign key item, that it doesn't seem to trigger the deletes for all the items it's linked to. Or may...
Rriocard asked 4/7, 2011 at 8:38

3

Solved

Django gives admin url automatically, such as www.example.com/admin. I do not want any outside visitors to access this url. This should be accessed only with in the host and allowed IP address. If ...
Vacancy asked 30/4, 2014 at 18:1

4

Solved

I'm using Django for a small project and I want to make a table with one row to add the description of the project in it. I only need one row and nothing more since it's one description for the who...
Callery asked 31/1, 2016 at 15:59

11

Solved

I quite like the filter feature of django admin views (list_filter). But, on views with a lot of fields, I would really like the ability to minimize/expand it with a click, to save screen real-est...
Wesleywesleyan asked 22/5, 2011 at 7:32

2

I am getting this error django.core.exceptions.FieldError: Unsupported lookup 'icontains' for ForeignKey or join on the field not permitted Below is models.py: class Author(models.Model): first_na...
Wonted asked 5/6, 2023 at 12:42

5

Solved

By default, Django's admin renders ForeignKey fields in admin as a select field, listing every record in the foreign table as an option. In one admin-accessible model, I'm referencing the User mode...
Frightened asked 24/2, 2011 at 17:18

4

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_tool...
Helve asked 23/3, 2022 at 15:24

3

Solved

I want to display my widget on the field at django admin when the field is readonly. admin.py class AudioTrackAdminInline(admin.StackedInline): model = AudioTrack form = AudioTrackForm readonl...
Casefy asked 12/2, 2013 at 12:36

9

Solved

after running "python manage.py syncdb" i gett an error saying "unable to open database file". here is the important part from my settings.py: DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2',...
Var asked 19/7, 2010 at 11:5

9

Solved

The AdminTimeWidget rendered in admin for a DateTimeField displays an icon of a clock and when you click you have the choice between: "Now Midnight 6:00 Noon". How can I change these choices to "1...
Sister asked 24/4, 2011 at 14:8

4

Solved

How can I add users to a group in Django admin interface of "Change Group"? I have seen dirty hacks to get this working for older django version. How to solve this with Django 1.10? Emphasize: I...
Longicorn asked 14/9, 2016 at 7:45

6

Solved

I have a Django admin form. And now I want to fill it's initial field with data based on my model. So I tried this: class OrderForm(forms.ModelForm): class Meta: model = Order email = CharFiel...
Beautify asked 28/5, 2011 at 22:38

23

Solved

Let's say I have my pizza application with Topping and Pizza classes and they show in Django Admin like this: PizzaApp - Toppings >>>>>>>>>> Add / Change Pizzas >&...
Giveaway asked 29/12, 2008 at 17:25

2

I know that by default, transaction is used in Django Admin when adding, changing and deleting data according to my tests. But, I selected Delete selected persons and clicked on Go in Django Admin ...

3

Solved

I'm working on improving the admin.py in a django project, and while I'm not totally jazzed about how the table was coming out with three fields in the list_diplay, at least it's better than just g...
Umeh asked 6/9, 2012 at 23:22

19

Solved

How can I change the default filter choice from 'ALL'? I have a field named as status which has three values: activate, pending and rejected. When I use list_filter in Django admin, the filter is b...
Lura asked 12/5, 2009 at 7:52

6

Solved

In my Django model, I defined a @property which worked nicely and the property can be shown in the admin list_display without any problems. I need this property not only in admin but in my code l...
Carousal asked 13/10, 2019 at 19:15

3

Solved

Here's my setup: from django.contrib.auth.models import User class Product(models.Model): ... email_users = models.ManyToManyField(User, null=True, blank=True) ... [elsewhere] class Product...
Equiponderance asked 2/9, 2010 at 18:44

3

How do you limit the inline formset in django admin? Problem: I have a table A with 1 to n relationship with B. Table A should have at least one Table B item and a max of 5 Table B items.
Jewelljewelle asked 30/3, 2011 at 1:48

6

I am making a custom administration page in Django. I do not want to reinvent the wheel and thus want to use Django admin login form for the staff to log in and redirect them to /my-url/ afterwards...
Abuzz asked 14/6, 2012 at 15:19

15

Solved

For Django 1.1. I have this in my models.py: class User(models.Model): created = models.DateTimeField(auto_now_add=True) modified = models.DateTimeField(auto_now=True) When updating a row I g...
Petry asked 15/11, 2009 at 8:47

5

Solved

I have two tables related Quiz and Difficulty_level: I have created inline in admin.py like this: class DifficultyLevelInline(admin.TabularInline): model = DifficultyLevel and included in Quiz...
Teller asked 11/9, 2013 at 7:16

4

Solved

I have following model: class Model(models.Model): creator = models.ForeignKey(User,related_name='com_creator',on_delete=models.SET_NULL, blank=True, null=True) username = models.CharField(max_...
Subantarctic asked 7/6, 2017 at 18:37

10

Solved

When I am trying to open django admin panel this error is showing: ImportError at /admin/ failed to find libmagic. Check your installation Request Method: GET Request URL: Django Version: 1.5.1 Ex...
Kingpin asked 22/8, 2013 at 7:23

3

How do I add extra context to all admin webpages? I use default Django Admin for my admin part of a site. Here is an url entry for admin: urlpatterns = [ url(r'^admin/', admin.site.urls), ] A...
Echinate asked 13/9, 2016 at 18:8

© 2022 - 2025 — McMap. All rights reserved.