add some verbose names
This commit is contained in:
@@ -5,6 +5,6 @@ from .models import Entry
|
|||||||
|
|
||||||
# Register your models here.
|
# Register your models here.
|
||||||
class EntryAdmin(admin.ModelAdmin):
|
class EntryAdmin(admin.ModelAdmin):
|
||||||
pass
|
list_display = ('title', 'pub_date', 'element')
|
||||||
|
|
||||||
admin.site.register(Entry, EntryAdmin)
|
admin.site.register(Entry, EntryAdmin)
|
||||||
|
|||||||
@@ -3,7 +3,14 @@ from django.db import models
|
|||||||
|
|
||||||
# Create your models here.
|
# Create your models here.
|
||||||
class Entry(models.Model):
|
class Entry(models.Model):
|
||||||
title = models.CharField(max_length=100)
|
title = models.CharField(max_length=100, verbose_name='Titel')
|
||||||
pub_date = models.DateTimeField('Veröffentlichungsdatum')
|
pub_date = models.DateTimeField('Veröffentlichungsdatum')
|
||||||
image = models.ImageField('Vorschaubild', upload_to='thumbnails')
|
image = models.ImageField('Vorschaubild', upload_to='thumbnails')
|
||||||
element = models.FileField('Datei', upload_to='datastorage')
|
element = models.FileField('Datei', upload_to='datastorage')
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return str(self.title)
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
verbose_name = 'Eintrag'
|
||||||
|
verbose_name_plural = 'Einträge'
|
||||||
|
|||||||
@@ -105,9 +105,9 @@ DATABASES = {
|
|||||||
# Internationalization
|
# Internationalization
|
||||||
# https://docs.djangoproject.com/en/1.8/topics/i18n/
|
# https://docs.djangoproject.com/en/1.8/topics/i18n/
|
||||||
|
|
||||||
LANGUAGE_CODE = 'en-us'
|
LANGUAGE_CODE = 'de-de'
|
||||||
|
|
||||||
TIME_ZONE = 'UTC'
|
TIME_ZONE = 'Europe/Berlin'
|
||||||
|
|
||||||
USE_I18N = True
|
USE_I18N = True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user