add some verbose names

This commit is contained in:
erichhasl
2017-11-18 15:58:02 +01:00
parent b1bf306522
commit 24fc56d26d
3 changed files with 11 additions and 4 deletions
+1 -1
View File
@@ -5,6 +5,6 @@ from .models import Entry
# Register your models here.
class EntryAdmin(admin.ModelAdmin):
pass
list_display = ('title', 'pub_date', 'element')
admin.site.register(Entry, EntryAdmin)
+8 -1
View File
@@ -3,7 +3,14 @@ from django.db import models
# Create your models here.
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')
image = models.ImageField('Vorschaubild', upload_to='thumbnails')
element = models.FileField('Datei', upload_to='datastorage')
def __str__(self):
return str(self.title)
class Meta:
verbose_name = 'Eintrag'
verbose_name_plural = 'Einträge'
+2 -2
View File
@@ -105,9 +105,9 @@ DATABASES = {
# Internationalization
# 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