Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django 1.2 and invalid exclude definition in admin.py #2

Open
restless opened this issue Apr 26, 2010 · 0 comments
Open

Django 1.2 and invalid exclude definition in admin.py #2

restless opened this issue Apr 26, 2010 · 0 comments

Comments

@restless
Copy link

When I enter admin panel I get an error saying that "exclude refers to field created_on that is missing from the form."

The problem is caused by the following definition (admin.py):

class WorkflowAdmin(admin.ModelAdmin):
    """
    Workflow administration
    """
    (...)
    exclude = ['created_on', 'cloned_from']
    list_filter = ['status']

It is enough to remove created_on from the exclude (exclude = ['cloned_from']). created_on field is defined as auto_now_add which makes it automatically editable=False, so it is not included in the form generated for admin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant