verbose_name_plural = _('Users profiles')
class UserAdmin(UserAdmin):
- inlines = (UserProfileInline, )
+ inlines = (UserProfileInline,)
admin.site.unregister(User)
admin.site.register(User, UserAdmin)
class ComicAdmin(admin.ModelAdmin):
fieldsets = [
- (_('Title'), {'fields': ['title']}),
- (_('Online'), {'fields': ['is_online']}),
- (_('Comic block'), {'fields': ['blocks']}),
+ (_('Title'), {'fields': ['title']}),
+ (_('Online'), {'fields': ['is_online']}),
+ (_('Comic block'), {'fields': ['blocks']}),
]
inlines = [
Comic_blockInline,
"""
Let's view a comics as an images serie
"""
- name = models.CharField(_('name'), max_length=50) # probably not useful, it's just simplier to assemble afterwards for author
+ name = models.CharField(_('name'), max_length=50) # probably not useful, it's just simplier to assemble afterwards for author
number = models.IntegerField(_('number'))
content = models.ImageField(upload_to='block_contents')
# TODO: probably not useful
from django.core.management import execute_manager
import imp
try:
- imp.find_module('settings') # Assumed to be in the same directory.
+ imp.find_module('settings') # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n" % __file__)
DATABASES = {
'default': {
- 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
- 'NAME': 'django', # Or path to database file if using sqlite3.
- 'USER': 'django', # Not used with sqlite3.
- 'PASSWORD': 'django', # Not used with sqlite3.
- 'HOST': 'localhost', # Set to empty string for localhost. Not used with sqlite3.
- 'PORT': '', # Set to empty string for default. Not used with sqlite3.
+ 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
+ 'NAME': 'django', # Or path to database file if using sqlite3.
+ 'USER': 'django', # Not used with sqlite3.
+ 'PASSWORD': 'django', # Not used with sqlite3.
+ 'HOST': 'localhost', # Set to empty string for localhost. Not used with sqlite3.
+ 'PORT': '', # Set to empty string for default. Not used with sqlite3.
}
}