Ejemplo n.º 1
0
 def ready(self):
     from djangoapp.admin import admin_site
     from pages.models import Page
     from pages.admin import PageAdmin
     post_save.connect(invalidate_cache, sender=Page)
     post_delete.connect(invalidate_cache, sender=Page)
     admin_site.register(Page, PageAdmin)
Ejemplo n.º 2
0
 def ready(self):
     from djangoapp.admin import admin_site
     from headlines.models import Headline
     from headlines.admin import HeadlineAdmin
     post_save.connect(invalidate_cache, sender=Headline)
     post_delete.connect(invalidate_cache, sender=Headline)
     m2m_changed.connect(invalidate_cache, sender=Headline)
     admin_site.register(Headline, HeadlineAdmin)
Ejemplo n.º 3
0
 def ready(self):
     from djangoapp.admin import admin_site
     from registration.admin import UserAdmin
     from registration.models import User
     from django.contrib.auth.admin import GroupAdmin
     from django.contrib.auth.models import Group
     admin_site.register(User, UserAdmin)
     admin_site.register(Group, GroupAdmin)
Ejemplo n.º 4
0
 def ready(self):
     from djangoapp.admin import admin_site
     from videogallery.models import VideoGallery
     from videogallery.admin import VideoGalleryAdmin
     post_save.connect(invalidate_cache, sender=VideoGallery)
     post_delete.connect(invalidate_cache, sender=VideoGallery)
     m2m_changed.connect(invalidate_cache, sender=VideoGallery)
     admin_site.register(VideoGallery, VideoGalleryAdmin)
Ejemplo n.º 5
0
 def ready(self):
     from djangoapp.admin import admin_site
     from polls.models import Poll, Choice
     from polls.admin import PollAdmin
     post_save.connect(invalidate_cache, sender=Poll)
     post_delete.connect(invalidate_cache, sender=Poll)
     post_save.connect(invalidate_cache, sender=Choice)
     post_delete.connect(invalidate_cache, sender=Choice)
     admin_site.register(Poll, PollAdmin)
Ejemplo n.º 6
0
 def ready(self):
     from djangoapp.admin import admin_site
     from photogallery.models import Image, PhotoGallery
     from photogallery.admin import PhotoGalleryAdmin
     post_save.connect(invalidate_cache, sender=Image)
     post_delete.connect(invalidate_cache, sender=Image)
     post_save.connect(invalidate_cache, sender=PhotoGallery)
     post_delete.connect(invalidate_cache, sender=PhotoGallery)
     m2m_changed.connect(invalidate_cache, sender=PhotoGallery)
     admin_site.register(PhotoGallery, PhotoGalleryAdmin)
Ejemplo n.º 7
0
 def ready(self):
     from djangoapp.admin import admin_site
     from blogs.models import Author, Blog
     from blogs.admin import AuthorAdmin, BlogAdmin
     post_save.connect(invalidate_cache, sender=Author)
     post_delete.connect(invalidate_cache, sender=Author)
     post_save.connect(invalidate_cache, sender=Blog)
     post_delete.connect(invalidate_cache, sender=Blog)
     m2m_changed.connect(invalidate_cache, sender=Blog)
     admin_site.register(Author, AuthorAdmin)
     admin_site.register(Blog, BlogAdmin)
Ejemplo n.º 8
0
    def ready(self):

        from djangoapp.admin import admin_site
        from partners.models import Partner
        from partners.admin import PartnerAdmin

        post_save.connect(invalidate_cache, sender=Partner)
        post_delete.connect(invalidate_cache, sender=Partner)
        m2m_changed.connect(invalidate_cache, sender=Partner)

        admin_site.register(Partner, PartnerAdmin)
Ejemplo n.º 9
0
    def ready(self):

        from djangoapp.admin import admin_site
        from annons.models import Annons
        from annons.admin import AnnonsAdmin

        post_save.connect(invalidate_cache, sender=Annons)
        post_delete.connect(invalidate_cache, sender=Annons)
        m2m_changed.connect(invalidate_cache, sender=Annons)

        admin_site.register(Annons, AnnonsAdmin)
Ejemplo n.º 10
0
 def ready(self):
     from djangoapp.admin import admin_site
     from news.models import NewsCategory, News
     from news.admin import NewsCategoryAdmin, NewsAdmin
     post_save.connect(invalidate_cache, sender=NewsCategory)
     post_delete.connect(invalidate_cache, sender=NewsCategory)
     post_save.connect(invalidate_cache, sender=News)
     post_delete.connect(invalidate_cache, sender=News)
     m2m_changed.connect(invalidate_cache, sender=News)
     admin_site.register(NewsCategory, NewsCategoryAdmin)
     admin_site.register(News, NewsAdmin)
Ejemplo n.º 11
0
    def ready(self):

        from djangoapp.admin import admin_site
        from mklogo.models import Logo
        from mklogo.admin import LogoAdmin

        post_save.connect(invalidate_cache, sender=Logo)
        post_delete.connect(invalidate_cache, sender=Logo)
        m2m_changed.connect(invalidate_cache, sender=Logo)

        admin_site.register(Logo, LogoAdmin)
Ejemplo n.º 12
0
 def ready(self):
     from djangoapp.admin import admin_site
     from articles.models import Category, Tag, Article
     from articles.admin import CategoryAdmin, TagAdmin, ArticleAdmin
     post_save.connect(invalidate_cache, sender=Category, dispatch_uid='articles_category')
     post_delete.connect(invalidate_cache, sender=Category, dispatch_uid='articles_category')
     post_save.connect(invalidate_cache, sender=Tag, dispatch_uid='articles_tag')
     post_delete.connect(invalidate_cache, sender=Tag, dispatch_uid='articles_tag')
     post_save.connect(invalidate_cache, sender=Article, dispatch_uid='articles_article')
     post_delete.connect(invalidate_cache, sender=Article, dispatch_uid='articles_article')
     m2m_changed.connect(invalidate_cache, sender=Article, dispatch_uid='articles_article')
     admin_site.register(Tag, TagAdmin)
     admin_site.register(Category, CategoryAdmin)
     admin_site.register(Article, ArticleAdmin)
Ejemplo n.º 13
0
    def ready(self):
        from djangoapp.admin import admin_site
        from banners.models import Category, Client, Banner
        from banners.admin import CategoryAdmin, ClientAdmin, BannerAdmin
        post_save.connect(invalidate_cache, sender=Category)
        post_delete.connect(invalidate_cache, sender=Category)
        post_save.connect(invalidate_cache, sender=Client)
        post_delete.connect(invalidate_cache, sender=Client)
        post_save.connect(invalidate_cache, sender=Banner)
        post_delete.connect(invalidate_cache, sender=Banner)
        m2m_changed.connect(invalidate_cache,
                            sender=Banner,
                            dispatch_uid='banners_banner')

        admin_site.register(Category, CategoryAdmin)
        admin_site.register(Client, ClientAdmin)
        admin_site.register(Banner, BannerAdmin)
Ejemplo n.º 14
0
 def ready(self):
     from djangoapp.admin import admin_site
     from subscribes.admin import SubscribeAdmin
     from subscribes.models import Subscribe
     admin_site.register(Subscribe, SubscribeAdmin)