Hello all -- could someone please verify this?  I want to make sure I
got it right.

from django.db import models
from satchmo_store.contact.models import Contact

class Subscription(models.Model):
    contact = models.ForeignKey(Contact, unique=True,
related_name='subscription')
    has_subscription = models.BooleanField("Subscription",
default=False)
    subscription_start_date = models.DateField("Start Date")
    subscription_end_date = models.DateField("End Date")

This way I should be able to check the status of 'subscription' by
calling

user.get_profile().subscription.has_subscription

so long as AUTH_PROFILE_MODULE = 'Contact.contact'

I assume that to get the subscription info showing up side-by-side
with the contact info in the admin I'd have to rewrite the
Contact.admin.py, unregister the contactAdmin and register a new
subscription_contactAdmin....  correct?

Thanks a million.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Satchmo 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/satchmo-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to