fixes + ordering
This commit is contained in:
parent
f1d0734abf
commit
2bf7deb4ca
|
@ -101,6 +101,7 @@ class Character(models.Model):
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = _("character")
|
verbose_name = _("character")
|
||||||
verbose_name_plural = _("characters")
|
verbose_name_plural = _("characters")
|
||||||
|
ordering = ["name"]
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
return self.name
|
||||||
|
|
|
@ -29,10 +29,11 @@
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
</div>
|
</div>
|
||||||
<a href="{{character.picture.url}}" style="float:left;margin-right:10px;margin-bottom:10px;">
|
{% if character.picture %}
|
||||||
<img src="{{character.picture.url}}" width="300"/>
|
<a href="{{character.picture.url}}" style="float:left;margin-right:10px;margin-bottom:10px;">
|
||||||
</a>
|
<img src="{{character.picture.url}}" width="300"/>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
<p>{{character.description|md|safe}}</p>
|
<p>{{character.description|md|safe}}</p>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -7,7 +7,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent.parent
|
||||||
SECRET_KEY = "django-insecure-e*p%e)pwf+-ntt4wpn-^^7-0yq)!cjo*om18vy77-=*c0jjfqa"
|
SECRET_KEY = "django-insecure-e*p%e)pwf+-ntt4wpn-^^7-0yq)!cjo*om18vy77-=*c0jjfqa"
|
||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = True
|
DEBUG = False
|
||||||
|
|
||||||
ALLOWED_HOSTS = os.environ.get("DJANGO_HOST").split(",")
|
ALLOWED_HOSTS = os.environ.get("DJANGO_HOST").split(",")
|
||||||
CSRF_TRUSTED_ORIGINS = [
|
CSRF_TRUSTED_ORIGINS = [
|
||||||
|
@ -25,5 +25,5 @@ DATABASES = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EDIA_ROOT = "/data/media"
|
MEDIA_ROOT = "/data/media"
|
||||||
MEDIA_URL = "/media/"
|
MEDIA_URL = "/media/"
|
||||||
|
|
Loading…
Reference in New Issue