Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Maybe, maybe not. It wouldn't be too hard to have an app that has a many-to-many association between a Newsletter (however that is imagine) and a Subscriber (foreign key on User or firstName/lastName/emailAddress/password).</p> <p>Your models would be something like this:</p> <pre><code>from django.db import models from django.contrib.auth.models import User class Subscriber(models.Model): user = models.ForeignKey(User) email = models.EmailField() def __unicode__(self): return "User %s" % (self.user.username, ) @models.permalink def get_absolute_url(self): return ('subscriber', None, {'object_id' : self.id}) class Meta: ordering = [ "id" ] class Newsletter(models.Model): name = models.CharField(max_length=80) subscribers = models.ManyToManyField('Subscriber') # .... Other stuff def __unicode__(self): return "Newsletter %s" % (self.name, ) @models.permalink def get_absolute_url(self): return ('newsletter', None, {'object_id' : self.id}) class Meta: ordering = [ "id" ] </code></pre> <p>Your urls.py would be something like this:</p> <pre><code>from django.conf.urls.defaults import * from django.views.generic.simple import direct_to_template urlpatterns = patterns('', url(r'^subscriber/(?P&lt;object_id&gt;\d+)/$', views.subscriberview, name='subscriber_view'), url(r'^newsletter/(?P&lt;object_id&gt;\d+)/$'', views.newsletterview,name='newsletter_view'), url(r'^site_media/(?P&lt;path&gt;.*)$', 'django.views.static.serve', {'document_root': MEDIA_ROOT}), ) </code></pre> <p>Is that enough to get you going?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload