from django.db import models
from django.core.urlresolvers import reverse

class Gallery(models.Model):
    """ Gallery table """
    name = models.CharField(max_length=30)
    category = models.ForeignKey("Category")
    gallery_location = models.TextField(blank=True, null=True)
    def get_absolute_url(self):
        return reverse('gallery-detail', kwargs={'pk': self.pk})

class Category(models.Model):
    """ Category Galery table """
    name = models.CharField(max_length=30)
    description = models.TextField(blank=True, null=True)
    def __str__(self):
        return str(self.name)
    def __unicode__(self):
        return unicode(self.name)
    def get_galleries(self):
        return self.gallery_set.select_related()
    def get_absolute_url(self):
        return reverse('category-detail', kwargs={'pk': self.pk})




53aa2d347ee153034cc2b36226188780ee09d412
<mask token>


class Gallery(models.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>


class Category(models.Model):
    """ Category Galery table """
    name = models.CharField(max_length=30)
    description = models.TextField(blank=True, null=True)

    def __str__(self):
        return str(self.name)

    def __unicode__(self):
        return unicode(self.name)

    def get_galleries(self):
        return self.gallery_set.select_related()

    def get_absolute_url(self):
        return reverse('category-detail', kwargs={'pk': self.pk})

<mask token>


class Gallery(models.Model):
    <mask token>
    name = models.CharField(max_length=30)
    category = models.ForeignKey('Category')
    gallery_location = models.TextField(blank=True, null=True)

    def get_absolute_url(self):
        return reverse('gallery-detail', kwargs={'pk': self.pk})


class Category(models.Model):
    """ Category Galery table """
    name = models.CharField(max_length=30)
    description = models.TextField(blank=True, null=True)

    def __str__(self):
        return str(self.name)

    def __unicode__(self):
        return unicode(self.name)

    def get_galleries(self):
        return self.gallery_set.select_related()

    def get_absolute_url(self):
        return reverse('category-detail', kwargs={'pk': self.pk})

<mask token>


class Gallery(models.Model):
    """ Gallery table """
    name = models.CharField(max_length=30)
    category = models.ForeignKey('Category')
    gallery_location = models.TextField(blank=True, null=True)

    def get_absolute_url(self):
        return reverse('gallery-detail', kwargs={'pk': self.pk})


class Category(models.Model):
    """ Category Galery table """
    name = models.CharField(max_length=30)
    description = models.TextField(blank=True, null=True)

    def __str__(self):
        return str(self.name)

    def __unicode__(self):
        return unicode(self.name)

    def get_galleries(self):
        return self.gallery_set.select_related()

    def get_absolute_url(self):
        return reverse('category-detail', kwargs={'pk': self.pk})

from django.db import models
from django.core.urlresolvers import reverse


class Gallery(models.Model):
    """ Gallery table """
    name = models.CharField(max_length=30)
    category = models.ForeignKey('Category')
    gallery_location = models.TextField(blank=True, null=True)

    def get_absolute_url(self):
        return reverse('gallery-detail', kwargs={'pk': self.pk})


class Category(models.Model):
    """ Category Galery table """
    name = models.CharField(max_length=30)
    description = models.TextField(blank=True, null=True)

    def __str__(self):
        return str(self.name)

    def __unicode__(self):
        return unicode(self.name)

    def get_galleries(self):
        return self.gallery_set.select_related()

    def get_absolute_url(self):
        return reverse('category-detail', kwargs={'pk': self.pk})

from django.db import models
from django.core.urlresolvers import reverse

class Gallery(models.Model):
    """ Gallery table """
    name = models.CharField(max_length=30)
    category = models.ForeignKey("Category")
    gallery_location = models.TextField(blank=True, null=True)
    def get_absolute_url(self):
        return reverse('gallery-detail', kwargs={'pk': self.pk})

class Category(models.Model):
    """ Category Galery table """
    name = models.CharField(max_length=30)
    description = models.TextField(blank=True, null=True)
    def __str__(self):
        return str(self.name)
    def __unicode__(self):
        return unicode(self.name)
    def get_galleries(self):
        return self.gallery_set.select_related()
    def get_absolute_url(self):
        return reverse('category-detail', kwargs={'pk': self.pk})



