Zwischencommit und Bilder Test
This commit is contained in:
parent
c945c8d4f4
commit
8c5532967a
Binary file not shown.
Binary file not shown.
|
|
@ -15,35 +15,31 @@ import os
|
||||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
|
||||||
|
|
||||||
############################################## LOCAL #####################################
|
############################################## DEV #####################################
|
||||||
BASE_URL = "http://localhost:8000/"
|
BASE_URL = "https://dev01.digitale-agentur.com/"
|
||||||
CRONAPIKEY = "gCddsaz6NOnE9QbXZM5LasdEk122D"
|
CRONAPIKEY = "gCddsaz6NOnE9QbXZM5LasdEk122D"
|
||||||
|
|
||||||
# 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 = True
|
||||||
|
|
||||||
# Database
|
# MAIL DEV
|
||||||
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases
|
EMAIL_HOST = 'smtp.strato.de'
|
||||||
|
EMAIL_PORT = 587
|
||||||
|
EMAIL_USE_TLS = True
|
||||||
|
EMAIL_HOST_USER = "support@dev01.digitale-agentur.com"
|
||||||
|
EMAIL_HOST_PASSWORD = "support@dev01.digitale-agentur.com"
|
||||||
|
DEFAULT_FROM_EMAIL = "support@dev01.digitale-agentur.com"
|
||||||
|
|
||||||
# DEV
|
# DEV
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': {
|
'default': {
|
||||||
'ENGINE': 'django.db.backends.mysql',
|
'ENGINE': 'django.db.backends.mysql',
|
||||||
'NAME' : 'digitaleagentur',
|
'NAME' : 'digitaleagentur_dev01',
|
||||||
'USER' : 'root',
|
'USER' : 'digitaleagentur_dev01',
|
||||||
'PASSWORD' : '',
|
'PASSWORD' : 't3TvtGAOkFHYXdJlUMIu9u3U',
|
||||||
'PORT' : 3306
|
'PORT' : 3306
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
############################################## DEV #####################################
|
||||||
# MAIL DEV
|
|
||||||
EMAIL_HOST = 'gymhum.de'
|
|
||||||
EMAIL_PORT = 587
|
|
||||||
EMAIL_USE_TLS = True
|
|
||||||
EMAIL_HOST_USER = "holger.trampe"
|
|
||||||
EMAIL_HOST_PASSWORD = "Motte2016_!"
|
|
||||||
DEFAULT_FROM_EMAIL = "holger.trampe@gymhum.de"
|
|
||||||
|
|
||||||
################################################### LOCAL ###############################
|
|
||||||
|
|
||||||
|
|
||||||
# Nach zehn Stunden läuft der Cookie ab!
|
# Nach zehn Stunden läuft der Cookie ab!
|
||||||
|
|
@ -175,9 +171,11 @@ LOGIN_URL = 'login'
|
||||||
#DEV-UMBGEUNG
|
#DEV-UMBGEUNG
|
||||||
STATIC_URL = '/static/'
|
STATIC_URL = '/static/'
|
||||||
|
|
||||||
|
|
||||||
############################# FÜR COMMIT
|
############################# FÜR COMMIT
|
||||||
SITE_ROOT = os.path.dirname(os.path.realpath(__file__)) + '/..'
|
SITE_ROOT = os.path.dirname(os.path.realpath(__file__)) + '/..'
|
||||||
STATIC_ROOT = (os.path.join(SITE_ROOT, 'users/static/'))
|
STATIC_ROOT = (os.path.join(SITE_ROOT, 'users/static/'))
|
||||||
|
|
||||||
#STATICFILES_DIRS = (os.path.join(SITE_ROOT, 'users/static/'),)
|
#STATICFILES_DIRS = (os.path.join(SITE_ROOT, 'users/static/'),)
|
||||||
|
|
||||||
# CRISPY
|
# CRISPY
|
||||||
|
|
|
||||||
|
|
@ -46,4 +46,4 @@ urlpatterns = [
|
||||||
path('tm/', include('timemanagement.urls'), name="timemanagement")
|
path('tm/', include('timemanagement.urls'), name="timemanagement")
|
||||||
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||||
if settings.DEBUG:
|
if settings.DEBUG:
|
||||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 38 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.9 KiB |
|
|
@ -17,11 +17,11 @@ User._meta.get_field('last_name').blank = False
|
||||||
# PATH FOR AGENCYPIC
|
# PATH FOR AGENCYPIC
|
||||||
def picturepath_agency(instance, filename):
|
def picturepath_agency(instance, filename):
|
||||||
# file will be uploaded to MEDIA_ROOT/agency_<id>/<subdirs>/<filename>
|
# file will be uploaded to MEDIA_ROOT/agency_<id>/<subdirs>/<filename>
|
||||||
return 'agencydata/agency_{0}/agencystats/{1}'.format(instance.pk, filename)
|
return settings.MEDIA_URL + 'agencydata/agency_{0}/agencystats/{1}'.format(instance.pk, filename)
|
||||||
|
|
||||||
# PATH FOR PROFILEPICS
|
# PATH FOR PROFILEPICS
|
||||||
def picturepath_user(instance, filename):
|
def picturepath_user(instance, filename):
|
||||||
return 'agencydata/agency_{0}/agencystats/profilepics/{1}'.format(instance.agency.pk, filename)
|
return settings.MEDIA_URL + 'agencydata/agency_{0}/agencystats/profilepics/{1}'.format(instance.agency.pk, filename)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -81,7 +81,7 @@ class Agency(models.Model):
|
||||||
plz = models.CharField(default="", max_length=5, blank=True)
|
plz = models.CharField(default="", max_length=5, blank=True)
|
||||||
agency_email = models.EmailField(default="", blank=True)
|
agency_email = models.EmailField(default="", blank=True)
|
||||||
phone = models.CharField(default="", max_length=50, blank=True)
|
phone = models.CharField(default="", max_length=50, blank=True)
|
||||||
agencypic = models.ImageField(default='ag_default.jpg', upload_to=picturepath_agency, blank=True)
|
agencypic = models.ImageField(default=settings.MEDIA_URL + 'ag_default.jpg', upload_to=picturepath_agency, blank=True)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -125,7 +125,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/ag_default.jpg"
|
return settings.MEDIA_URL + "ag_default.jpg"
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
@ -170,7 +170,7 @@ class Profile(models.Model):
|
||||||
func = models.ForeignKey("AgencyJob", blank=True, null=True, default=None, on_delete=models.SET_NULL)
|
func = models.ForeignKey("AgencyJob", blank=True, null=True, default=None, on_delete=models.SET_NULL)
|
||||||
# Wenn dieses Profil gelöscht wird, wird NICHT die Agency geslöscht
|
# Wenn dieses Profil gelöscht wird, wird NICHT die Agency geslöscht
|
||||||
agency = models.ForeignKey(Agency, on_delete=models.PROTECT)
|
agency = models.ForeignKey(Agency, on_delete=models.PROTECT)
|
||||||
image = models.ImageField(default='agencymain/default.jpg', upload_to=picturepath_user, blank=True)
|
image = models.ImageField(default=settings.MEDIA_URL + 'default.jpg', upload_to=picturepath_user, blank=True)
|
||||||
compfunc = models.CharField(max_length=60, blank=True)
|
compfunc = models.CharField(max_length=60, blank=True)
|
||||||
visible = models.BooleanField(default=True)
|
visible = models.BooleanField(default=True)
|
||||||
persnumber = models.CharField(default="", max_length=50, blank=True)
|
persnumber = models.CharField(default="", max_length=50, blank=True)
|
||||||
|
|
@ -239,7 +239,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 settings.MEDIA_URL + "default.jpg"
|
||||||
|
|
||||||
|
|
||||||
class UserTime(models.Model):
|
class UserTime(models.Model):
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,8 @@ def checkDefaultAbsenceReasons(sender, user, request, **kwargs):
|
||||||
|
|
||||||
@receiver(signal=user_logged_in, sender=User)
|
@receiver(signal=user_logged_in, sender=User)
|
||||||
def checkAllFreeDaysLoaded(sender, user, request, **kwargs):
|
def checkAllFreeDaysLoaded(sender, user, request, **kwargs):
|
||||||
|
pass
|
||||||
|
'''
|
||||||
allFreeDays = FreeDays.objects.filter(agency=user.profile.agency, year=date.today().year)
|
allFreeDays = FreeDays.objects.filter(agency=user.profile.agency, year=date.today().year)
|
||||||
# NO DAYS FOR THIS YEAR
|
# NO DAYS FOR THIS YEAR
|
||||||
if(len(allFreeDays) == 0):
|
if(len(allFreeDays) == 0):
|
||||||
|
|
@ -91,7 +93,7 @@ def checkAllFreeDaysLoaded(sender, user, request, **kwargs):
|
||||||
for k in tempdays.keys():
|
for k in tempdays.keys():
|
||||||
tempdate = tempdays[k]["datum"].split("-")
|
tempdate = tempdays[k]["datum"].split("-")
|
||||||
FreeDays(agency=user.profile.agency, name=k, day=datetime.datetime(int(tempdate[0]),int(tempdate[1]),int(tempdate[2])), year=date.today().year).save()
|
FreeDays(agency=user.profile.agency, name=k, day=datetime.datetime(int(tempdate[0]),int(tempdate[1]),int(tempdate[2])), year=date.today().year).save()
|
||||||
|
'''
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 99 KiB |
|
Before Width: | Height: | Size: 513 B After Width: | Height: | Size: 513 B |
|
|
@ -8,7 +8,7 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<meta name="description" content="">
|
<meta name="description" content="">
|
||||||
<meta name="author" content="">
|
<meta name="author" content="">
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="{% static 'users/img/favicon.png' %}">
|
<link rel="shortcut icon" type="image/x-icon" href="{% static 'users/img/favicon.ico' %}">
|
||||||
<title>Digitale Agentur</title>
|
<title>Digitale Agentur</title>
|
||||||
|
|
||||||
<!-- Custom fonts for this template-->
|
<!-- Custom fonts for this template-->
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue