App read only in django-admin
|Reported by:||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I think I found a problem in Django.
Steps to reproduce:
- Create a new project
- Setup DB to sqllite
- Create an app (models are enough no views needed)
- register the models from within models.py to the admin with admin.site.register
- set DEBUG=False
- include that page in an apache server
- Go to the admin page and verify that no entries can be added to the models and neither can the existing ones be viewed.
- Verify that the code is correct by running runserver or with DEBUG=True
The models file I used for reproduction:
from django.db import models from django.contrib import admin class Tesst(models.Model): t = models.CharField(max_length=200) admin.site.register(Tesst)
To clarify Again:
Expected is: An entry in django-admin that has a button to add or edit Tesst entries aswell as a clickable link Tessts that lists all the entries already entered.
Actual result is: An entry in django-admin but no buttons to add or edit. The Tessts "link" is not a link but a black text and not clickable (Looks as if has_change_permission returns False).
The Bug happens only appears when run with:
I run Django 1.4.8 and tried it with apache 2.4.6 (Fedora) and 2.2.15 (CentOS) and python 2.7
There are no special apps needed to trigger the bug.
If there is anything in addition to the already provided information please contact me.