# Path: twobuntu/images/models.py
# class Image(models.Model):
#     """
#     A web-accessible image file.
#     """
# 
#     caption = models.CharField(
#         max_length=100,
#         help_text="A brief description of the image.",
#     )
#     image = models.ImageField(
#         upload_to='images',
#         help_text="The image file.",
#     )
# 
#     def __str__(self):
#         return self.caption
# 
#     @models.permalink
#     def get_absolute_url(self):
#         return ('images:view', (), {
#             'id': self.id,
#         })


from django.contrib import admin
from twobuntu.images.models import Image



class ImageAdmin(admin.ModelAdmin):
    """
    Describe the administration inferface for images.
    """

    search_fields = ('caption', 'image')



# Path: twobuntu/images/models.py
# class Image(models.Model):
#     """
#     A web-accessible image file.
#     """
# 
#     caption = models.CharField(
#         max_length=100,
#         help_text="A brief description of the image.",
#     )
#     image = models.ImageField(
#         upload_to='images',
#         help_text="The image file.",
#     )
# 
#     def __str__(self):
#         return self.caption
# 
#     @models.permalink
#     def get_absolute_url(self):
#         return ('images:view', (), {
#             'id': self.id,
#         })


# Path: twobuntu/images/admin.py
from django.contrib import admin
from twobuntu.images.models import Image




class ImageAdmin(admin.ModelAdmin):
    """
    Describe the administration inferface for images.
    """

    search_fields = ('caption', 'image')



admin.site.register(Image, ImageAdmin)