1
0
Fork 0

Added LICENSE note to source files

This commit is contained in:
Daniele Tricoli 2010-11-16 11:16:47 +01:00
parent c5d1817334
commit 2688a169e1
4 changed files with 33 additions and 2 deletions

View file

@ -1,4 +1,11 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""microcms.admin module, admin site configuration and options.
THIS SOFTWARE IS UNDER BSD LICENSE.
Copyright (c) 2010 Daniele Tricoli <eriol@mornie.org>
Read LICENSE for more informations.
"""
from django import forms from django import forms
from django.conf import settings from django.conf import settings
from django.contrib import admin from django.contrib import admin

View file

@ -1,8 +1,14 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""microcms.models module, Page the core model of microcms.
THIS SOFTWARE IS UNDER BSD LICENSE.
Copyright (c) 2010 Daniele Tricoli <eriol@mornie.org>
Read LICENSE for more informations.
"""
import datetime import datetime
from django.db import models from django.db import models
from django.conf import settings
from django.contrib.auth.models import User from django.contrib.auth.models import User
from django.contrib.flatpages.models import FlatPage from django.contrib.flatpages.models import FlatPage
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _

View file

@ -1,4 +1,11 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""microcms.settings module, custom settings for microcms.
THIS SOFTWARE IS UNDER BSD LICENSE.
Copyright (c) 2010 Daniele Tricoli <eriol@mornie.org>
Read LICENSE for more informations.
"""
from django.conf import settings from django.conf import settings
CKEDITOR_URL = getattr(settings, 'CKEDITOR_URL', 'ckeditor/ckeditor.js') CKEDITOR_URL = getattr(settings, 'CKEDITOR_URL', 'ckeditor/ckeditor.js')

View file

@ -1,4 +1,12 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""microcms.templatetags.microcms_tags module, some useful template tags for
microcms.
THIS SOFTWARE IS UNDER BSD LICENSE.
Copyright (c) 2010 Daniele Tricoli <eriol@mornie.org>
Read LICENSE for more informations.
"""
from django import template from django import template
from django.template.defaultfilters import stringfilter from django.template.defaultfilters import stringfilter
@ -7,7 +15,10 @@ register = template.Library()
@register.filter @register.filter
@stringfilter @stringfilter
def active_page(url, regex): def active_page(url, regex):
"""Check the current url with regex and return 'active' if matched.""" """Check the current url with regex and return 'active' if matched.
Avoid using this filter: better is to make use of CSS inheritance.
"""
import re import re
if re.search(regex, url): if re.search(regex, url):
return 'active' return 'active'