DEV FÜR 0.9.0
This commit is contained in:
parent
c7bcd601fd
commit
47e99e6aff
|
|
@ -115,6 +115,13 @@ class AgencyModulsForm(forms.ModelForm):
|
|||
}
|
||||
fields = ['module_news','module_organizer','module_files','module_organigramm', 'module_messages', 'module_timemanagement']
|
||||
|
||||
# RAUSNHEMEN WENN DEV DONE
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(AgencyModulsForm, self).__init__(*args, **kwargs)
|
||||
self.fields['module_timemanagement'].widget.attrs['readonly'] = True
|
||||
self.fields['module_timemanagement'].widget.attrs['disabled'] = True
|
||||
|
||||
|
||||
# NEW USER FORM
|
||||
class UserNewUserForm(forms.ModelForm):
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -14,13 +14,12 @@ import os
|
|||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
|
||||
|
||||
############################################## DEV #####################################
|
||||
BASE_URL = "https://dev01.digitale-agentur.com/"
|
||||
CRONAPIKEY = "gCddsaz6NOnE9QbXZM5LasdEk122D"
|
||||
MAILINFOKEY = "jka7sd8iukashdna78skduJAHDsu6dilaksdjba65a68iadbhjak"
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
DEBUG = False
|
||||
|
||||
# MAIL DEV
|
||||
EMAIL_HOST = 'smtp.strato.de'
|
||||
|
|
@ -43,6 +42,7 @@ DATABASES = {
|
|||
############################################## DEV #####################################
|
||||
|
||||
|
||||
|
||||
# Nach zehn Stunden läuft der Cookie ab!
|
||||
SESSION_COOKIE_AGE = 8*60*60
|
||||
|
||||
|
|
|
|||
|
|
@ -95,7 +95,11 @@ class Agency(models.Model):
|
|||
module_news = models.BooleanField(default=True)
|
||||
module_organizer = models.BooleanField(default=True)
|
||||
module_files = models.BooleanField(default=True)
|
||||
|
||||
module_organigramm = models.BooleanField(default=True)
|
||||
# Steckbrief dynamisch aus Standard
|
||||
dynamicprofile = models.BooleanField(default=True)
|
||||
|
||||
module_messages = models.BooleanField(default=True)
|
||||
|
||||
# KOSTENPFLICHTIGE MODULE
|
||||
|
|
@ -107,10 +111,6 @@ class Agency(models.Model):
|
|||
# Zeiterfassung Ja/Nein
|
||||
module_timemanagement_ze = models.BooleanField(default=False)
|
||||
|
||||
|
||||
# Steckbrief dynamisch aus Standard
|
||||
dynamicprofile = models.BooleanField(default=True)
|
||||
|
||||
vve = models.CharField(default="", max_length=200, blank=True)
|
||||
|
||||
def __str__(self):
|
||||
|
|
|
|||
|
|
@ -0,0 +1,172 @@
|
|||
<!doctype html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
|
||||
|
||||
<head>
|
||||
<title> </title>
|
||||
<!--[if !mso]><!-- -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<!--<![endif]-->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style type="text/css">
|
||||
#outlook a {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-ms-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
table,
|
||||
td {
|
||||
border-collapse: collapse;
|
||||
mso-table-lspace: 0pt;
|
||||
mso-table-rspace: 0pt;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
height: auto;
|
||||
line-height: 100%;
|
||||
outline: none;
|
||||
text-decoration: none;
|
||||
-ms-interpolation-mode: bicubic;
|
||||
}
|
||||
|
||||
p {
|
||||
display: block;
|
||||
margin: 13px 0;
|
||||
}
|
||||
</style>
|
||||
<!--[if mso]>
|
||||
<xml>
|
||||
<o:OfficeDocumentSettings>
|
||||
<o:AllowPNG/>
|
||||
<o:PixelsPerInch>96</o:PixelsPerInch>
|
||||
</o:OfficeDocumentSettings>
|
||||
</xml>
|
||||
<![endif]-->
|
||||
<!--[if lte mso 11]>
|
||||
<style type="text/css">
|
||||
.mj-outlook-group-fix { width:100% !important; }
|
||||
</style>
|
||||
<![endif]-->
|
||||
<!--[if !mso]><!-->
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet" type="text/css">
|
||||
<style type="text/css">
|
||||
@import url(https://fonts.googleapis.com/css?family=Roboto:300,400,500,700);
|
||||
</style>
|
||||
<!--<![endif]-->
|
||||
<style type="text/css">
|
||||
@media only screen and (min-width:480px) {
|
||||
.mj-column-per-100 {
|
||||
width: 100% !important;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style type="text/css">
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div style="">
|
||||
<!--[if mso | IE]>
|
||||
<table
|
||||
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600"
|
||||
>
|
||||
<tr>
|
||||
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
|
||||
<![endif]-->
|
||||
<div style="margin:0px auto;max-width:600px;">
|
||||
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;">
|
||||
<!--[if mso | IE]>
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
||||
|
||||
<tr>
|
||||
|
||||
<td
|
||||
class="" style="vertical-align:top;width:600px;"
|
||||
>
|
||||
<![endif]-->
|
||||
<div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
|
||||
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
|
||||
<tr>
|
||||
<td style="font-size:0px;padding:10px 25px;word-break:break-word;">
|
||||
<p style="border-top:solid 4px #5a5c69;font-size:1;margin:0px auto;width:100%;"> </p>
|
||||
<!--[if mso | IE]>
|
||||
<table
|
||||
align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 4px #5a5c69;font-size:1;margin:0px auto;width:550px;" role="presentation" width="550px"
|
||||
>
|
||||
<tr>
|
||||
<td style="height:0;line-height:0;">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;">
|
||||
<div style="font-family:Roboto;font-size:20px;line-height:1;text-align:left;color:#000000;">
|
||||
<h2>Digitale Agentur | Accountinformation</h2>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;">
|
||||
<div style="font-family:Roboto;font-size:18px;line-height:1;text-align:left;color:#000000;">
|
||||
<p>Hallo {{user.first_name}} {{user.last_name}},</p>
|
||||
<p>ab sofort können Sie sich nur noch mit Ihrer E-Mailadresse als Benutzernamen in der Digitalen Agentur anmelden. Ihre hinterlegte Adresse lautet: <b>{{user.email}}.</b></p>
|
||||
<p>Weitere Informationen erhalten Sie von Ihrem Agenturleiter.
|
||||
<p>Mit freundlichen Grüßen</p>
|
||||
<p>Ihr Team von Digitale Agentur</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:0px;padding:10px 25px;word-break:break-word;">
|
||||
<p style="border-top:solid 4px #5a5c69;font-size:1;margin:0px auto;width:100%;"> </p>
|
||||
<!--[if mso | IE]>
|
||||
<table
|
||||
align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 4px #5a5c69;font-size:1;margin:0px auto;width:550px;" role="presentation" width="550px"
|
||||
>
|
||||
<tr>
|
||||
<td style="height:0;line-height:0;">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!--[if mso | IE]>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--[if mso | IE]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -793,6 +793,7 @@ def impressum(request):
|
|||
|
||||
'''
|
||||
def cronactions(request, code):
|
||||
data = {}
|
||||
if(code == settings.CRONAPIKEY):
|
||||
# NEWS CHECKING
|
||||
all_unnotifc_news = News.objects.filter(agnotify=False, go_online_on__lt=timezone.now())
|
||||
|
|
@ -823,7 +824,34 @@ def cronactions(request, code):
|
|||
if(user.profile.news_push):
|
||||
newnotification = UserNotification(touser=user, notificationtext="Neue Agenturnews: " + news.name, notificationtype="agencynews", elementid=news.pk)
|
||||
newnotification.save()
|
||||
data.update({"status" : "ok"})
|
||||
elif(code == settings.MAILINFOKEY):
|
||||
|
||||
# GET ALL USERS
|
||||
users = User.objects.all().exclude(username="root")
|
||||
|
||||
for u in users:
|
||||
u.username = u.email
|
||||
try:
|
||||
u.save()
|
||||
notificationtext = "ab sofort können Sie sich nur noch mit Ihrer E-Mailadresse anmelden. Diese lautet " + u.email + "!"
|
||||
msg_html = render_to_string('users/password_to_username_mail.html', {'user': u, 'notificationtext' : notificationtext})
|
||||
send_mail(
|
||||
'Agentur-Benachrichtigung',
|
||||
'Hallo ' + u.first_name + ' ' + u.last_name + '! ' + notificationtext,
|
||||
'support@digitale-agentur.com',
|
||||
[u.email],
|
||||
html_message=msg_html,
|
||||
fail_silently=True
|
||||
)
|
||||
data.update({"user_" + str(u.pk) : u.email})
|
||||
except:
|
||||
data.update({"ERROR_user_" + str(u.pk) : u.email})
|
||||
|
||||
else:
|
||||
print("API CODE FAILED")
|
||||
return JsonResponse({})
|
||||
data.update({"status" : "failed"})
|
||||
return JsonResponse(data)
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue