Hello everyone. I am using a third party app django-contact-form. It is working fine but the problem is it does not show my models in admin. I can't see the data in admin. The docs are very poor.
-- Here is my model.py
from django.db import models
from contact_form.forms import ContactForm
class ContactForm(models.Model):
name = models.CharField(max_length=100)
email = models.EmailField(max_length=200)
body = models.CharField(max_length=200)
def __str__(self):
return (self.email)
admin.py
from django.contrib import admin
from . import models
from contact_form.models import ContactForm
class ContactFormAdmin(admin.ModelAdmin):
list_display = ("name", "body", "email")
admin.site.register(ContactForm, ContactFormAdmin)
I am using django 1.7
http://django-contact-form.readthedocs.org/en/latest/quickstart.html
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/035e8b0b-e502-4ba5-b8e2-9923afa43909%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment