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


class Album(models.Model):
    pass


class Photo(models.Model):
    user = models.ForeignKey(User, related_name='photos')
    albums = models.ManyToManyField(Album, related_name='photos')

    title = models.CharField(max_length=50, blank=True)
    description = models.TextField(blank=True)
    date_uploaded = models.DateField(null=True, blank=True)
    date_modified = models.DateField(null=True, blank=True)
    date_published = models.DateField(null=True, blank=True)

    PRIVATE = 'pvt'
    SHARED = 'shd'
    PUBLIC = 'pub'
    PHOTO_PRIVACY_OPTIONS = (
        (PRIVATE, 'Private'),
        (SHARED, 'Shared'),
        (PUBLIC, 'Public'),
    )

    published = models.CharField(max_length=3,
                                 choices=PHOTO_PRIVACY_OPTIONS,
                                 default=PRIVATE)

@@ -103,12 +103,689 @@
     
-pass
+user = models.ForeignKey(User, related_name='albums')%0A    title = models.CharField(max_length=100, blank=True)%0A    description = models.TextField(blank=True)%0A    date_uploaded = models.DateField(null=True, blank=True)%0A    date_modified = models.DateField(null=True, blank=True)%0A    date_published = models.DateField(null=True, blank=True)%0A%0A    PRIVATE = 'pvt'%0A    SHARED = 'shd'%0A    PUBLIC = 'pub'%0A    PHOTO_PRIVACY_OPTIONS = (%0A        (PRIVATE, 'Private'),%0A        (SHARED, 'Shared'),%0A        (PUBLIC, 'Public'),%0A    )%0A%0A    published = models.CharField(max_length=3,%0A                                 choices=PHOTO_PRIVACY_OPTIONS,%0A                                 default=PRIVATE)
 %0A%0A%0Ac
@@ -979,9 +979,10 @@
 gth=
-5
+10
 0, b

add album model.