Sortierreihenfolge bei Standards Dashboard und Rgister-Seite Agenturname auf required

This commit is contained in:
holger.trampe 2019-12-25 11:55:49 +01:00
parent 196ad6fcba
commit b7b554d870
3 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@
{{ form|crispy }} {{ form|crispy }}
<div class="form-group"> <div class="form-group">
<label for="pwd">Agenturname</label> <label for="pwd">Agenturname</label>
<input type="text" name="agency_name" class="form-control" id="agency_name" required> <input type="text" name="agency_name" class="form-control" id="agency_name" required="true">
</div> </div>
</fieldset> </fieldset>
<div class="form-group" > <div class="form-group" >

View File

@ -71,7 +71,7 @@ def dashboard(request):
# Loading only user same agency # Loading only user same agency
# Change context and return for template-data # Change context and return for template-data
# # Get all Users of the Same Agency as logged user # # Get all Users of the Same Agency as logged user
standards_of_agency = Standards.objects.filter(agency__pk=request.user.profile.agency.pk).filter(public=True).order_by('-created_standard_date')[:5] standards_of_agency = Standards.objects.filter(agency__pk=request.user.profile.agency.pk).filter(public=True).order_by('-last_modified_on')[:5]
filterdate = datetime.now() filterdate = datetime.now()
news = News.objects.filter(agency__pk=request.user.profile.agency.pk).filter(go_online_on__lt=filterdate).filter(go_offline_on__gt=filterdate).order_by('-go_online_on')[:4] news = News.objects.filter(agency__pk=request.user.profile.agency.pk).filter(go_online_on__lt=filterdate).filter(go_offline_on__gt=filterdate).order_by('-go_online_on')[:4]