I am trying to design a form using the django admin with text fields
to make notes in and a drop down box with email addresses to choose.
I would like to add an action button, that sends an email with the
information in the forms to one of the addresses in the drop down
box.  I was wondering the best way to add an action button to the
django admin interface.  I could do this with python cgi and
fieldstorage, but I would like to integrate this into the admin page.
Does anyone have any suggestions.  my model is below.

    from django.db import models

from django.db import models
from django.contrib.auth.models import User
from django.conf import settings




class Call(models.Model):
    name = models.CharField(maxlength=100)
    service = models.IntegerField(blank=True, default=1,
choices=SERVICE_CODES)



    name = models.CharField(maxlength=100)
    service = models.IntegerField(blank=True, default=1,
choices=SERVICE_CODES)
    company = models.IntegerField(blank=True, default=1,
choices=CUSTOMER_TYPES)
    called_for = models.IntegerField(blank=True, default=0,
choices=CALLED_FOR)
    date =  models.DateField()
    email = models.CharField(blank=True, maxlength=100)
    phone_number = models.CharField(blank=True, maxlength=100)
    phone_number2 = models.CharField(blank=True, maxlength=100)
    description = models.TextField(blank=True)
    email_to = models.IntegerField(blank=True, default=1,
choices=EMAILS)
    class Admin:
        list_display = ('name', 'date','service', 'phone_number')
        list_filter = ('service', 'company')
        search_fields = ('name', 'description','email','phone_number')

    class Meta:

        ordering = ('name', 'service', 'date')

    def __str__(self):
        return self.name

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to