Tuesday, January 27, 2015

Re: Help in Django-contact-form

Can you show us also the view?

On Wed, Jan 28, 2015 at 8:04 AM, Akash Nimare <svnitakash@gmail.com> wrote:
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

--
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.



--
Karim N. Gorjux

--
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/CACeuRGUDWMDg1UQb7KMZ5e0jK%3DcmfrVa-%3DfRzyXUAiqV6ATtYQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment