init und migrations gitignore

This commit is contained in:
holger.trampe 2019-12-12 23:06:53 +01:00
parent e7a31f4767
commit adbe594279
11 changed files with 23 additions and 5 deletions

20
.gitignore vendored
View File

@ -1,3 +1,21 @@
*/migrations/
media/agencymain/* media/agencymain/*
!media/agencymain/default.jpg
media/userprofilepics/* media/userprofilepics/*
!media/userprofilepics/default.jpg
media/uploadsCK/*
!media/uploadsCK/README.txt
areas/migrations/*
!areas/migrations/__init__.py
news/migrations/*
!news/migrations/__init__.py
standards/migrations/*
!standards/migrations/__init__.py
tasks/migrations/*
!tasks/migrations/__init__.py
users/migrations/*
!users/migrations/__init__.py

View File

View File

View File

View File

View File

@ -45,7 +45,7 @@ class Agency(models.Model):
if self.agencypic and hasattr(self.agencypic, 'url'): if self.agencypic and hasattr(self.agencypic, 'url'):
return self.agencypic.url return self.agencypic.url
else: else:
return "/media/default.jpg" return "/media/agencymain/default.jpg"
''' '''
Class Profile Class Profile
@ -119,7 +119,7 @@ class Profile(models.Model):
if self.image and hasattr(self.image, 'url'): if self.image and hasattr(self.image, 'url'):
return self.image.url return self.image.url
else: else:
return "/media/default.jpg" return "/media/userprofilepics/default.jpg"
# PERMISSIONS - Über alle Modelle hinweg, in der url.py wird dann die route verhindert! # PERMISSIONS - Über alle Modelle hinweg, in der url.py wird dann die route verhindert!
# Im template: if perms.users.PERMISSION # Im template: if perms.users.PERMISSION

View File

@ -226,7 +226,7 @@
<li class="nav-item dropdown no-arrow"> <li class="nav-item dropdown no-arrow">
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="mr-2 d-none d-lg-inline text-gray-600 small">{{request.user.first_name}} {{request.user.last_name}}</span> <span class="mr-2 d-none d-lg-inline text-gray-600 small">{{request.user.first_name}} {{request.user.last_name}}</span>
<img class="img-profile " src="{{ user.profile.image.url }}"> <img class="img-profile " src="{{ user.profile.get_photo_url }}">
</a> </a>
<!-- Dropdown - User Information --> <!-- Dropdown - User Information -->
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="userDropdown"> <div class="dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="userDropdown">