Settings angepasst

Dashboard fertig
This commit is contained in:
holger.trampe 2019-12-08 21:20:35 +01:00
parent 076583e8bd
commit 2488ce0d44
4 changed files with 27 additions and 20 deletions

View File

@ -24,7 +24,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = '_qv2t2lmsctjxpbb4rrp=op%_20_hxzonv^mvty1o85c)l$s^q' SECRET_KEY = '_qv2t2lmsctjxpbb4rrp=op%_20_hxzonv^mvty1o85c)l$s^q'
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False DEBUG = True
ALLOWED_HOSTS = ['digitale-agentur.com', 'www.digitale-agentur.com', 'localhost'] ALLOWED_HOSTS = ['digitale-agentur.com', 'www.digitale-agentur.com', 'localhost']
@ -169,15 +169,16 @@ LOGIN_REDIRECT_URL = 'users-dashboard'
#SITE_ROOT = '/var/www/digitale-agentur.com/digitaleagentur/digitaleagentur/../' #SITE_ROOT = '/var/www/digitale-agentur.com/digitaleagentur/digitaleagentur/../'
#STATIC_ROOT = (os.path.join(SITE_ROOT, 'static/')) #STATIC_ROOT = (os.path.join(SITE_ROOT, 'static/'))
if DEBUG: #DEV-UMBGEUNG
STATIC_URL = '/static/' #STATIC_URL = '/static/'
else:
STATIC_URL = 'users/static/' #SERVER
SITE_ROOT = os.path.dirname(os.path.realpath(__file__)) + '/..' STATIC_URL = 'users/static/'
STATIC_ROOT = (os.path.join(SITE_ROOT, 'users/static/')) SITE_ROOT = os.path.dirname(os.path.realpath(__file__)) + '/..'
STATICFILES_DIRS = ( STATIC_ROOT = (os.path.join(SITE_ROOT, 'users/static/'))
os.path.join(SITE_ROOT, 'users/static/'), STATICFILES_DIRS = (
) os.path.join(SITE_ROOT, 'users/static/'),
)
# CRISPY # CRISPY
CRISPY_TEMPLATE_PACK = 'bootstrap4' CRISPY_TEMPLATE_PACK = 'bootstrap4'

View File

@ -4,20 +4,22 @@
<h3>Willkommen, {{request.user.first_name}} {{request.user.last_name}}!</h3> <h3>Willkommen, {{request.user.first_name}} {{request.user.last_name}}!</h3>
<small>Letzter Login: {{ request.user.last_login }}</small> <small>Letzter Login: {{ request.user.last_login }}</small>
<hr> <hr>
Agentur: <b>{{ request.user.profile.agency.name }}</b> <h4>Agentur: <b>{{ request.user.profile.agency.name }}</b></h4>
<div class=""> <hr>
<img class="img-profile" width="75%" src="{{ request.user.profile.agency.agencypic.url }}"> <h5>Neueste Standards</h5>
<hr> <div class="row">
<hr>
<div class="col mt-2">
{% for item in standards_of_agency %} {% for item in standards_of_agency %}
{% if item.public or item.created_standard_by == user or perms.users.standard_management %} {% if item.public or item.created_standard_by == user or perms.users.standard_management %}
<div class=" mb-4 col-5"> <div class=" mb-4">
<div class="card"> <div class="card">
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between"> <div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
<a href="{% url 'standard-single' item.pk%}"> <a href="{% url 'standard-single' item.pk%}">
{% if item.public %} {% if item.public %}
<h4><u>{{item.name}}</u></h4> <h5><u>{{item.name}}</u></h5>
{% else %} {% else %}
<h4 class="text-warning"><u>{{item.name}}</u></h4> <h5 class="text-warning"><u>{{item.name}}</u></h5>
{% endif %} {% endif %}
</a> </a>
{% if item.created_standard_by == user or perms.users.standard_management %} {% if item.created_standard_by == user or perms.users.standard_management %}
@ -35,14 +37,18 @@
{% endif %} {% endif %}
</div> </div>
<div class="card-body"> <div class="card-body">
<h5 class="card-title">{{item.created_standard_by.first_name}} {{item.created_standard_by.last_name}} <h6>Zuletzt bearbeitet von {{ item.last_modified_by.first_name }} {{ item.last_modified_by.last_name }} am {{ item.last_modified_on }}</h6> <h6 class="card-title">{{item.created_standard_by.first_name}} {{item.created_standard_by.last_name}} <small>Zuletzt bearbeitet von {{ item.last_modified_by.first_name }} {{ item.last_modified_by.last_name }} am {{ item.last_modified_on }}</small>
</h5> </h6>
<p class="card-text">{{ item.content|truncatechars:250|safe}}</p> <p class="card-text">{{ item.content|truncatechars:80|safe}}</p>
</div> </div>
</div> </div>
</div> </div>
{% endif %} {% endif %}
{% endfor%} {% endfor%}
</div>
<div class="col">
<img class="img-profile" width="75%" src="{{ request.user.profile.agency.agencypic.url }}">
</div>
</div> </div>
</div> </div>
{% endblock content %} {% endblock content %}