from django.db import models
from django.utils.translation import ugettext_lazy as _

from opps.core.models.publishable import Publishable



class Image(Publishable):

    title = models.CharField(_(u"Title"), max_length=140)
    slug = models.SlugField(_(u"Slug"), max_length=150, blank=True)
    image = models.ImageField(upload_to="uploads/")
    description = models.CharField(_(u"Description"), max_length=255,
            null=True, blank=True)

    credit = models.CharField(_(u"Credit"), max_length=255, blank=False)

    def __unicode__(self):
        return self.title

    class Meta:
        app_label = 'core'

from django.db import models
from django.utils.translation import ugettext_lazy as _

from opps.core.models.publishable import Publishable
from opps.core.models import Source



class Image(Publishable):

    title = models.CharField(_(u"Title"), max_length=140)
    slug = models.SlugField(_(u"Slug"), max_length=150, blank=True)
    image = models.ImageField(upload_to="uploads/")
    description = models.CharField(_(u"Description"), max_length=255,
            null=True, blank=True)

    source = models.ForeignKey(Source, null=True, blank=True)

    def __unicode__(self):
        return self.title

    class Meta:
        app_label = 'core'

Change credit to source models
Change credit to source models

  from django.db import models
  from django.utils.translation import ugettext_lazy as _
  
  from opps.core.models.publishable import Publishable
+ from opps.core.models import Source
  
  
  
  class Image(Publishable):
  
      title = models.CharField(_(u"Title"), max_length=140)
      slug = models.SlugField(_(u"Slug"), max_length=150, blank=True)
      image = models.ImageField(upload_to="uploads/")
      description = models.CharField(_(u"Description"), max_length=255,
              null=True, blank=True)
  
-     credit = models.CharField(_(u"Credit"), max_length=255, blank=False)
+     source = models.ForeignKey(Source, null=True, blank=True)
  
      def __unicode__(self):
          return self.title
  
      class Meta:
          app_label = 'core'
  
Change credit to source models
## Code Before:
from django.db import models
from django.utils.translation import ugettext_lazy as _

from opps.core.models.publishable import Publishable



class Image(Publishable):

    title = models.CharField(_(u"Title"), max_length=140)
    slug = models.SlugField(_(u"Slug"), max_length=150, blank=True)
    image = models.ImageField(upload_to="uploads/")
    description = models.CharField(_(u"Description"), max_length=255,
            null=True, blank=True)

    credit = models.CharField(_(u"Credit"), max_length=255, blank=False)

    def __unicode__(self):
        return self.title

    class Meta:
        app_label = 'core'

## Instruction:
Change credit to source models
## Code After:
from django.db import models
from django.utils.translation import ugettext_lazy as _

from opps.core.models.publishable import Publishable
from opps.core.models import Source



class Image(Publishable):

    title = models.CharField(_(u"Title"), max_length=140)
    slug = models.SlugField(_(u"Slug"), max_length=150, blank=True)
    image = models.ImageField(upload_to="uploads/")
    description = models.CharField(_(u"Description"), max_length=255,
            null=True, blank=True)

    source = models.ForeignKey(Source, null=True, blank=True)

    def __unicode__(self):
        return self.title

    class Meta:
        app_label = 'core'
