django-admin
Define a default child (reverse ForeignKey)
I have 2 models Foo and Bar. Each Foo has multiple Bars, but one needs to be the \"default\". At this point I have a foreignkey in Bar pointing to Foo, but now I need a way to specify which of the Bar[详细]
2023-03-31 19:37 分类:问答Django Admin CSS missing
I\'ve been messing around with the new collectstatic command and have got it working for my normal pages. That is to say, I am able to load my css at this location http://localhost:8000/static/css/mai[详细]
2023-03-31 13:00 分类:问答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.[详细]
2023-03-31 10:15 分类:问答Django Admin Filtering List By TextField
I need to filter an admin list based on a TextField. I want to be able to filter the queryset for all objects whose TextField value is Null.[详细]
2023-03-31 08:03 分类:问答TemplateSyntaxError, Could not parse the remainder
I\'m following the django tutorial at Django by example in http://www.lightbird.net/. In the first example, TodoList, Customizing Model Template part, I\'ve copied the template to[详细]
2023-03-31 07:31 分类:问答Django admin - jQuery namespace
I\'m trying to use certain jQuery plugins in my Django admin site. Django admin sets the jQuery namespace to django.jQuery (to avoid conflicts)[详细]
2023-03-31 04:31 分类:问答Django admin login page redirects to same page on correct login credentials
I\'m running a relatively fresh Django app that I haven\'t added much to. I tried to set up the admin (which I\'ve done on plenty of other apps) to create some sample data while I build out the app, b[详细]
2023-03-30 23:25 分类:问答TabularInlines readonly fields are deleteable
I\'m using TabularInlines for administrate many-to-many relationships in the django admin. When some conditions are met, I want to make the inline read only. To achieve this I override the get_readonl[详细]
2023-03-30 16:16 分类:问答sorting on foreign key columns in django admin?
I have two tables : customers and attributes.They are related as customers.id=attributes.id (for a given id joining the info of customers and attributes one can get the whole profile of the customer).[详细]
2023-03-30 08:27 分类:问答Django - Dynamicly set the contents of list_display (admin view)
Is there a way to reset the contents of the list_display (in the admin view) for some model each time the model is filtered? (so that filtering by different objects will give a diffrent number of colu[详细]
2023-03-30 06:01 分类:问答