Skip to content

Instantly share code, notes, and snippets.

@colinkahn
Created September 28, 2012 17:50
Show Gist options
  • Save colinkahn/3801247 to your computer and use it in GitHub Desktop.
Save colinkahn/3801247 to your computer and use it in GitHub Desktop.
ElephantBlog Config
Page.create_content_type(ApplicationContent, APPLICATIONS=(
('elephantblog.urls', _('Blog')),
))
########## ELEPHANTBLOG CONFIGURATION
def elephantblog_entry_url_app(self):
from feincms.content.application.models import app_reverse
return app_reverse('elephantblog_entry_detail', 'elephantblog.urls', kwargs={
'year': self.published_on.strftime('%Y'),
'month': self.published_on.strftime('%m'),
'day': self.published_on.strftime('%d'),
'slug': self.slug,
})
def elephantblog_categorytranslation_url_app(self):
from feincms.content.application.models import app_reverse
return app_reverse('elephantblog_category_detail', 'elephantblog.urls', kwargs={
'slug': self.slug,
})
ABSOLUTE_URL_OVERRIDES = {
'elephantblog.entry': elephantblog_entry_url_app,
'elephantblog.categorytranslation': elephantblog_categorytranslation_url_app,
}
########## END ELEPHANTBLOG CONFIGURATION
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment