from django.contrib import admin | from django.contrib import admin | ||||
from django.contrib.auth import get_user_model | from django.contrib.auth import get_user_model | ||||
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin | from django.contrib.auth.admin import UserAdmin as BaseUserAdmin | ||||
from django.contrib.auth.models import User | from django.contrib.auth.models import User | ||||
from .models import Post, CustomUser | from .models import Post, CustomUser | ||||
#external code customised | |||||
#import from https://docs.djangoproject.com/en/dev/topics/auth/customizing/#extending-the-existing-user-model | |||||
class CustomUserInline(admin.StackedInline): | class CustomUserInline(admin.StackedInline): | ||||
model = CustomUser | model = CustomUser | ||||
can_delete = False | can_delete = False | ||||
verbose_name_plural = 'customUsers' | verbose_name_plural = 'customUsers' | ||||
#external code customised | |||||
#import from https://docs.djangoproject.com/en/dev/topics/auth/customizing/#extending-the-existing-user-model | |||||
# Define a new User admin | # Define a new User admin | ||||
class UserAdmin(BaseUserAdmin): | class UserAdmin(BaseUserAdmin): | ||||
inlines = (CustomUserInline, ) | inlines = (CustomUserInline, ) | ||||
#external code customised | |||||
#import from https://docs.djangoproject.com/en/dev/topics/auth/customizing/#extending-the-existing-user-model | |||||
# Re-register UserAdmin | # Re-register UserAdmin | ||||
admin.site.unregister(User) | admin.site.unregister(User) | ||||
admin.site.register(User, UserAdmin) | admin.site.register(User, UserAdmin) | ||||
admin.site.register(Post) | admin.site.register(Post) | ||||
from .models import Post, CustomUser | from .models import Post, CustomUser | ||||
from django.forms import ModelForm, ValidationError | from django.forms import ModelForm, ValidationError | ||||
from taggit.forms import * | from taggit.forms import * | ||||
#extended code customised | |||||
#import from https://tutorial.djangogirls.org/en/django_forms/ | |||||
class PostForm(forms.ModelForm): | class PostForm(forms.ModelForm): | ||||
class Meta: | class Meta: | ||||
model = Post | model = Post | ||||
fields = ('title', 'text', 'published_date','tags') | fields = ('title', 'text', 'published_date','tags') | ||||
class NewTagForm(forms.ModelForm): | class NewTagForm(forms.ModelForm): | ||||
tags = TagField() | tags = TagField() | ||||
class Meta: | class Meta: | ||||
model = CustomUser | model = CustomUser | ||||
fields = ['tags'] | fields = ['tags'] |
from django.conf.urls import url | from django.conf.urls import url | ||||
from django.conf.urls import include | from django.conf.urls import include | ||||
from django.urls import path | from django.urls import path | ||||
from taggit_templatetags2 import urls as taggit_templatetags2_urls | |||||
from . import views | from . import views | ||||
from taggit_templatetags2 import urls as taggit_templatetags2_urls | |||||
import debug_toolbar | import debug_toolbar | ||||
urlpatterns = [ | urlpatterns = [ | ||||
url(r'^$', views.tag_list, name='tag_list'), | url(r'^$', views.tag_list, name='tag_list'), | ||||
url(r'^tag/(?P<slug>[-\w]+)/$', views.post_list, name='post_list_by_tag'), | url(r'^tag/(?P<slug>[-\w]+)/$', views.post_list, name='post_list_by_tag'), | ||||
url(r'^tags/', include('taggit_templatetags2.urls')), | url(r'^tags/', include('taggit_templatetags2.urls')), | ||||
] | ] | ||||
#external code | |||||
#import from https://django-debug-toolbar.readthedocs.io/en/latest/installation.html | |||||
if settings.DEBUG: | if settings.DEBUG: | ||||
import debug_toolbar | import debug_toolbar | ||||
urlpatterns += [ | urlpatterns += [ |
return redirect('post_list') | return redirect('post_list') | ||||
""" @login_required | |||||
def tag_remove(request, slug=None): | |||||
log = logging.getLogger('mysite') | |||||
user_instance = get_object_or_404(CustomUser, user=request.user) | |||||
tag = Tag.get_object_or_404(Tag, slug = slug) | |||||
log.info(tag) | |||||
if slug: | |||||
user_instance.tags.remove(tag) | |||||
save_m2m() | |||||
return redirect('student_page') """ | |||||
@login_required | @login_required | ||||
def tag_list(request): | def tag_list(request): | ||||
log = logging.getLogger('mysite') | log = logging.getLogger('mysite') |
Subproject commit 3273cbc777423138f9b6cfb127de503b63ccd22f |
\bibdata{references/References_2} | \bibdata{references/References_2} | ||||
\bibcite{Bootstrap}{{BA11}{}{{}}{{}}} | \bibcite{Bootstrap}{{BA11}{}{{}}{{}}} | ||||
\bibcite{Computer}{{Com18}{}{{}}{{}}} | \bibcite{Computer}{{Com18}{}{{}}{{}}} | ||||
\bibcite{Oracle}{{Coo10}{}{{}}{{}}} | |||||
\bibcite{Dixit}{{Dix18}{}{{}}{{}}} | |||||
\bibcite{Djangogirls}{{Dja18a}{}{{}}{{}}} | \bibcite{Djangogirls}{{Dja18a}{}{{}}{{}}} | ||||
\bibcite{Djangogirls-2}{{Dja18b}{}{{}}{{}}} | \bibcite{Djangogirls-2}{{Dja18b}{}{{}}{{}}} | ||||
\bibcite{Moodle}{{Dok15}{}{{}}{{}}} | \bibcite{Moodle}{{Dok15}{}{{}}{{}}} | ||||
\bibcite{Moodle-2}{{Dok18}{}{{}}{{}}} | \bibcite{Moodle-2}{{Dok18}{}{{}}{{}}} | ||||
\bibcite{Fiok}{{Fio14}{}{{}}{{}}} | \bibcite{Fiok}{{Fio14}{}{{}}{{}}} | ||||
\bibcite{Schlede}{{FMS17}{}{{}}{{}}} | |||||
\bibcite{Django-4}{{Fou18a}{}{{}}{{}}} | \bibcite{Django-4}{{Fou18a}{}{{}}{{}}} | ||||
\bibcite{Django}{{Fou18b}{}{{}}{{}}} | \bibcite{Django}{{Fou18b}{}{{}}{{}}} | ||||
\@writefile{toc}{\contentsline {chapter}{Referenzen}{35}{chapter*.25}} | |||||
\bibcite{Django-2}{{Fou18c}{}{{}}{{}}} | \bibcite{Django-2}{{Fou18c}{}{{}}{{}}} | ||||
\bibcite{Django-3}{{Fou18d}{}{{}}{{}}} | \bibcite{Django-3}{{Fou18d}{}{{}}{{}}} | ||||
\bibcite{Python}{{Fou18e}{}{{}}{{}}} | \bibcite{Python}{{Fou18e}{}{{}}{{}}} | ||||
\@writefile{toc}{\contentsline {chapter}{Referenzen}{35}{chapter*.25}} | |||||
\bibcite{Gaynor}{{Gay10}{}{{}}{{}}} | \bibcite{Gaynor}{{Gay10}{}{{}}{{}}} | ||||
\bibcite{Sario}{{Gmb18}{}{{}}{{}}} | \bibcite{Sario}{{Gmb18}{}{{}}{{}}} | ||||
\bibcite{Herzog}{{Her16}{}{{}}{{}}} | \bibcite{Herzog}{{Her16}{}{{}}{{}}} | ||||
\bibcite{King}{{Kin17}{}{{}}{{}}} | \bibcite{King}{{Kin17}{}{{}}{{}}} | ||||
\bibcite{Leipner}{{Lei13}{}{{}}{{}}} | \bibcite{Leipner}{{Lei13}{}{{}}{{}}} | ||||
\bibcite{Microsoft}{{Mic18}{}{{}}{{}}} | |||||
\bibcite{Ndukwe}{{Ndu17}{}{{}}{{}}} | \bibcite{Ndukwe}{{Ndu17}{}{{}}{{}}} | ||||
\bibcite{Nevius}{{Nev15}{}{{}}{{}}} | \bibcite{Nevius}{{Nev15}{}{{}}{{}}} | ||||
\bibcite{Ong}{{Ong18}{}{{}}{{}}} | \bibcite{Ong}{{Ong18}{}{{}}{{}}} |
\newblock 2018. | \newblock 2018. | ||||
\newblock https://www.pcmag.com/encyclopedia/term/58231/user-permissions. | \newblock https://www.pcmag.com/encyclopedia/term/58231/user-permissions. | ||||
\bibitem[Coo10]{Oracle} | |||||
Oracle Cooperation. | |||||
\newblock About ldap. | |||||
\newblock 2010. | |||||
\newblock https://docs.oracle.com/cd/E19182-01/820-6573/6nht2e5a4/index.html. | |||||
\bibitem[Dix18]{Dixit} | |||||
Chitrank Dixit. | |||||
\newblock Pep-8 tutorial: Code standards in python. | |||||
\newblock 2018. | |||||
\newblock | |||||
https://www.datacamp.com/community/tutorials/pep8-tutorial-python-code. | |||||
\bibitem[Dja18a]{Djangogirls} | \bibitem[Dja18a]{Djangogirls} | ||||
Djangogirls. | Djangogirls. | ||||
\newblock Creating a blog post model. | \newblock Creating a blog post model. | ||||
\newblock | \newblock | ||||
https://www.tecchannel.de/a/e-mail-flut-sorgt-fuer-kostenlawine,402338,3. | https://www.tecchannel.de/a/e-mail-flut-sorgt-fuer-kostenlawine,402338,3. | ||||
\bibitem[FMS17]{Schlede} | |||||
Andreas~Donner Frank-Michael~Schlede, Thomas~Bär. | |||||
\newblock Was ist ldap (lightweight directory access protocol)? | |||||
\newblock 2017. | |||||
\newblock | |||||
https://www.ip-insider.de/was-ist-ldap-lightweight-directory-access-protocol-a-581204/. | |||||
\bibitem[Fou18a]{Django-4} | \bibitem[Fou18a]{Django-4} | ||||
Django~Software Foundation. | Django~Software Foundation. | ||||
\newblock Cross site request forgery protection. | \newblock Cross site request forgery protection. | ||||
\newblock | \newblock | ||||
http://www.mz-web.de/wirtschaft/e-mail-flut-mails-bearbeiten-kommunikation-stress-zeit-sparen. | http://www.mz-web.de/wirtschaft/e-mail-flut-mails-bearbeiten-kommunikation-stress-zeit-sparen. | ||||
\bibitem[Mic18]{Microsoft} | |||||
Microsoft. | |||||
\newblock Extensions for the visual studio family of products. | |||||
\newblock 2018. | |||||
\newblock https://marketplace.visualstudio.com/. | |||||
\bibitem[Ndu17]{Ndukwe} | \bibitem[Ndu17]{Ndukwe} | ||||
Nnenna Ndukwe. | Nnenna Ndukwe. | ||||
\newblock Python is the back-end programming language of the future and | \newblock Python is the back-end programming language of the future and |
A level-1 auxiliary file: chapters/fazit.aux | A level-1 auxiliary file: chapters/fazit.aux | ||||
The style file: alpha.bst | The style file: alpha.bst | ||||
Database file #1: ../references/References_2.bib | Database file #1: ../references/References_2.bib | ||||
Repeated entry---line 204 of file ../references/References_2.bib | |||||
Repeated entry---line 176 of file ../references/References_2.bib | |||||
: @article{Djangogirls-2 | : @article{Djangogirls-2 | ||||
: , | : , | ||||
I'm skipping whatever remains of this entry | I'm skipping whatever remains of this entry | ||||
Warning--empty journal in Bootstrap | Warning--empty journal in Bootstrap | ||||
Warning--empty journal in Computer | Warning--empty journal in Computer | ||||
Warning--empty journal in Oracle | |||||
Warning--empty journal in Dixit | |||||
Warning--empty journal in Djangogirls | Warning--empty journal in Djangogirls | ||||
Warning--empty journal in Djangogirls-2 | Warning--empty journal in Djangogirls-2 | ||||
Warning--empty journal in Moodle | Warning--empty journal in Moodle | ||||
Warning--empty journal in Moodle-2 | Warning--empty journal in Moodle-2 | ||||
Warning--empty journal in Fiok | Warning--empty journal in Fiok | ||||
Warning--empty journal in Schlede | |||||
Warning--empty journal in Django-4 | Warning--empty journal in Django-4 | ||||
Warning--empty journal in Django | Warning--empty journal in Django | ||||
Warning--empty journal in Django-2 | Warning--empty journal in Django-2 | ||||
Warning--empty journal in Herzog | Warning--empty journal in Herzog | ||||
Warning--empty journal in King | Warning--empty journal in King | ||||
Warning--empty journal in Leipner | Warning--empty journal in Leipner | ||||
Warning--empty journal in Microsoft | |||||
Warning--empty journal in Ndukwe | Warning--empty journal in Ndukwe | ||||
Warning--empty journal in Nevius | Warning--empty journal in Nevius | ||||
Warning--empty journal in Ong | Warning--empty journal in Ong | ||||
Warning--empty journal in Solutions | Warning--empty journal in Solutions | ||||
Warning--empty journal in Timm | Warning--empty journal in Timm | ||||
Warning--empty publisher in Weigend | Warning--empty publisher in Weigend | ||||
You've used 31 entries, | |||||
You've used 27 entries, | |||||
2543 wiz_defined-function locations, | 2543 wiz_defined-function locations, | ||||
721 strings with 8688 characters, | |||||
and the built_in function-call counts, 8440 in all, are: | |||||
= -- 834 | |||||
> -- 248 | |||||
< -- 31 | |||||
+ -- 67 | |||||
- -- 62 | |||||
* -- 407 | |||||
:= -- 1475 | |||||
add.period$ -- 124 | |||||
call.type$ -- 31 | |||||
change.case$ -- 154 | |||||
chr.to.int$ -- 26 | |||||
cite$ -- 62 | |||||
duplicate$ -- 436 | |||||
empty$ -- 626 | |||||
format.name$ -- 122 | |||||
if$ -- 1648 | |||||
702 strings with 8139 characters, | |||||
and the built_in function-call counts, 7358 in all, are: | |||||
= -- 726 | |||||
> -- 216 | |||||
< -- 27 | |||||
+ -- 59 | |||||
- -- 54 | |||||
* -- 355 | |||||
:= -- 1287 | |||||
add.period$ -- 108 | |||||
call.type$ -- 27 | |||||
change.case$ -- 134 | |||||
chr.to.int$ -- 22 | |||||
cite$ -- 54 | |||||
duplicate$ -- 380 | |||||
empty$ -- 546 | |||||
format.name$ -- 107 | |||||
if$ -- 1436 | |||||
int.to.chr$ -- 6 | int.to.chr$ -- 6 | ||||
int.to.str$ -- 0 | int.to.str$ -- 0 | ||||
missing$ -- 32 | |||||
newline$ -- 189 | |||||
num.names$ -- 93 | |||||
pop$ -- 187 | |||||
missing$ -- 28 | |||||
newline$ -- 165 | |||||
num.names$ -- 81 | |||||
pop$ -- 164 | |||||
preamble$ -- 1 | preamble$ -- 1 | ||||
purify$ -- 186 | |||||
purify$ -- 162 | |||||
quote$ -- 0 | quote$ -- 0 | ||||
skip$ -- 336 | |||||
skip$ -- 291 | |||||
stack$ -- 0 | stack$ -- 0 | ||||
substring$ -- 217 | |||||
substring$ -- 189 | |||||
swap$ -- 1 | swap$ -- 1 | ||||
text.length$ -- 31 | |||||
text.prefix$ -- 29 | |||||
text.length$ -- 27 | |||||
text.prefix$ -- 26 | |||||
top$ -- 0 | top$ -- 0 | ||||
type$ -- 244 | |||||
warning$ -- 31 | |||||
while$ -- 62 | |||||
width$ -- 37 | |||||
write$ -- 405 | |||||
type$ -- 212 | |||||
warning$ -- 27 | |||||
while$ -- 54 | |||||
width$ -- 33 | |||||
write$ -- 353 | |||||
(There was 1 error message) | (There was 1 error message) |
This is XeTeX, Version 3.14159265-2.6-0.99999 (TeX Live 2018) (preloaded format=xelatex 2018.6.7) 7 DEC 2018 20:38 | |||||
This is XeTeX, Version 3.14159265-2.6-0.99999 (TeX Live 2018) (preloaded format=xelatex 2018.6.7) 9 DEC 2018 11:03 | |||||
entering extended mode | entering extended mode | ||||
\write18 enabled. | \write18 enabled. | ||||
file:line:error style messages enabled. | file:line:error style messages enabled. | ||||
Underfull \hbox (badness 10000) in paragraph at lines 16--20 | Underfull \hbox (badness 10000) in paragraph at lines 16--20 | ||||
[]\T1/aer/m/n/12 Oracle Coope-ra-ti-on. About ldap. 2010. | |||||
[]\T1/aer/m/n/12 Djangogirls. Crea-ting a blog post mo-del. 2018. | |||||
[] | [] | ||||
Underfull \hbox (badness 10000) in paragraph at lines 22--27 | |||||
\T1/aer/m/n/12 https://www.datacamp.com/community/tutorials/pep8-tutorial-python- | |||||
Underfull \hbox (badness 10000) in paragraph at lines 28--32 | |||||
[]\T1/aer/m/n/12 Moodle Do-ku-men-ta-ti-on. Auf-bau ei-ner moodle-site. 2015. | |||||
[] | [] | ||||
Underfull \hbox (badness 10000) in paragraph at lines 29--33 | |||||
[]\T1/aer/m/n/12 Djangogirls. Crea-ting a blog post mo-del. 2018. | |||||
Underfull \hbox (badness 10000) in paragraph at lines 34--38 | |||||
[]\T1/aer/m/n/12 Moodle Do-ku-men-ta-ti-on. Cron-job. 2018. | |||||
[] | [] | ||||
Underfull \hbox (badness 10000) in paragraph at lines 41--45 | |||||
[]\T1/aer/m/n/12 Moodle Do-ku-men-ta-ti-on. Auf-bau ei-ner moodle-site. 2015. | |||||
Underfull \hbox (badness 10000) in paragraph at lines 40--45 | |||||
[]\T1/aer/m/n/12 Marzena Fiok. E-mail-flut sorgt für ko-sten-la-wi-ne. | |||||
[] | [] | ||||
Underfull \hbox (badness 10000) in paragraph at lines 47--51 | |||||
[]\T1/aer/m/n/12 Moodle Do-ku-men-ta-ti-on. Cron-job. 2018. | |||||
Underfull \hbox (badness 10000) in paragraph at lines 40--45 | |||||
\T1/aer/m/n/12 2014. https://www.tecchannel.de/a/e-mail-flut-sorgt-fuer- | |||||
[] | [] | ||||
Underfull \hbox (badness 10000) in paragraph at lines 53--58 | |||||
[]\T1/aer/m/n/12 Marzena Fiok. E-mail-flut sorgt für ko-sten-la-wi-ne. | |||||
Underfull \hbox (badness 10000) in paragraph at lines 59--64 | |||||
\T1/aer/m/n/12 https://docs.djangoproject.com/en/dev/topics/forms/modelforms/#the- | |||||
[] | [] | ||||
Underfull \hbox (badness 10000) in paragraph at lines 53--58 | |||||
\T1/aer/m/n/12 2014. https://www.tecchannel.de/a/e-mail-flut-sorgt-fuer- | |||||
Underfull \hbox (badness 8056) in paragraph at lines 66--71 | |||||
[]\T1/aer/m/n/12 Django Soft-ware Foun-da-ti-on. Working with forms. 2018. | |||||
[] | |||||
Underfull \hbox (badness 10000) in paragraph at lines 66--71 | |||||
\T1/aer/m/n/12 https://docs.djangoproject.com/en/dev/topics/forms/#using-a-form- | |||||
[] | [] | ||||
Package babel Info: Redefining german shorthand "f | Package babel Info: Redefining german shorthand "f | ||||
] | ] | ||||
Underfull \hbox (badness 10000) in paragraph at lines 79--84 | |||||
\T1/aer/m/n/12 https://docs.djangoproject.com/en/dev/topics/forms/modelforms/#the- | |||||
[] | |||||
Underfull \hbox (badness 8056) in paragraph at lines 86--91 | |||||
[]\T1/aer/m/n/12 Django Soft-ware Foun-da-ti-on. Working with forms. 2018. | |||||
[] | |||||
Underfull \hbox (badness 10000) in paragraph at lines 86--91 | |||||
\T1/aer/m/n/12 https://docs.djangoproject.com/en/dev/topics/forms/#using-a-form- | |||||
[] | |||||
Missing character: There is no ’ in font aer12! | Missing character: There is no ’ in font aer12! | ||||
Underfull \hbox (badness 10000) in paragraph at lines 105--109 | |||||
Underfull \hbox (badness 10000) in paragraph at lines 85--89 | |||||
[]\T1/aer/m/n/12 Sario Mar-ke-ting GmbH. Tag-ging. 2018. | []\T1/aer/m/n/12 Sario Mar-ke-ting GmbH. Tag-ging. 2018. | ||||
[] | [] | ||||
Underfull \hbox (badness 2717) in paragraph at lines 119--124 | |||||
Underfull \hbox (badness 2717) in paragraph at lines 99--104 | |||||
[]\T1/aer/m/n/12 Adam King. Djan-go midd-le-wa-res and the re-quest/-re-spon-se cy- | []\T1/aer/m/n/12 Adam King. Djan-go midd-le-wa-res and the re-quest/-re-spon-se cy- | ||||
[] | [] | ||||
Missing character: There is no ̈ in font aer12! | Missing character: There is no ̈ in font aer12! | ||||
Missing character: There is no ’ in font aer12! | Missing character: There is no ’ in font aer12! | ||||
Underfull \hbox (badness 10000) in paragraph at lines 140--146 | |||||
Underfull \hbox (badness 10000) in paragraph at lines 114--120 | |||||
\T1/aer/m/n/12 medium-com-nnennandukwe-python-is-the-back-end-programming- | \T1/aer/m/n/12 medium-com-nnennandukwe-python-is-the-back-end-programming- | ||||
[] | [] | ||||
Underfull \hbox (badness 10000) in paragraph at lines 148--152 | |||||
Underfull \hbox (badness 10000) in paragraph at lines 122--126 | |||||
[]\T1/aer/m/n/12 Ryan Ne-vi-us. django-post_office git re-po-si-to-ry. 2015. | []\T1/aer/m/n/12 Ryan Ne-vi-us. django-post_office git re-po-si-to-ry. 2015. | ||||
[] | [] | ||||
Package Fancyhdr Warning: \headheight is too small (12.0pt): | |||||
Make it at least 14.49998pt. | |||||
We now make it that large for the rest of the document. | |||||
This may cause the page layout to be inconsistent, however. | |||||
Package babel Info: Redefining german shorthand "f | |||||
(babel) in language on input line 153. | |||||
Package babel Info: Redefining german shorthand "| | |||||
(babel) in language on input line 153. | |||||
Package babel Info: Redefining german shorthand "~ | |||||
(babel) in language on input line 153. | |||||
Package babel Info: Redefining german shorthand "f | |||||
(babel) in language on input line 153. | |||||
Package babel Info: Redefining german shorthand "| | |||||
(babel) in language on input line 153. | |||||
Package babel Info: Redefining german shorthand "~ | |||||
(babel) in language on input line 153. | |||||
[36] | |||||
Underfull \hbox (badness 10000) in paragraph at lines 154--158 | |||||
Underfull \hbox (badness 10000) in paragraph at lines 128--132 | |||||
[]\T1/aer/m/n/12 Selwin Ong. Djan-go request-response cy-cle. 2018. | []\T1/aer/m/n/12 Selwin Ong. Djan-go request-response cy-cle. 2018. | ||||
[] | [] | ||||
Underfull \hbox (badness 10000) in paragraph at lines 160--165 | |||||
Underfull \hbox (badness 10000) in paragraph at lines 134--139 | |||||
[]\T1/aer/m/n/12 Mark Ot-to. Boot-strap from twit-ter. 2011. | []\T1/aer/m/n/12 Mark Ot-to. Boot-strap from twit-ter. 2011. | ||||
[] | [] | ||||
Underfull \hbox (badness 10000) in paragraph at lines 160--165 | |||||
Underfull \hbox (badness 10000) in paragraph at lines 134--139 | |||||
\T1/aer/m/n/12 https://blog.twitter.com/developer/en_us/a/2011/bootstrap- | \T1/aer/m/n/12 https://blog.twitter.com/developer/en_us/a/2011/bootstrap- | ||||
[] | [] | ||||
Underfull \hbox (badness 10000) in paragraph at lines 167--172 | |||||
Underfull \hbox (badness 10000) in paragraph at lines 141--146 | |||||
[]\T1/aer/m/n/12 Mark Ot-to. Say hel-lo to boot-strap 2.0. 2012. | []\T1/aer/m/n/12 Mark Ot-to. Say hel-lo to boot-strap 2.0. 2012. | ||||
[] | [] | ||||
Overfull \hbox (38.1438pt too wide) in paragraph at lines 167--172 | |||||
Overfull \hbox (38.1438pt too wide) in paragraph at lines 141--146 | |||||
\T1/aer/m/n/12 https://web.archive.org/web/20120203191214/https://dev.twitter.com/blog/say- | \T1/aer/m/n/12 https://web.archive.org/web/20120203191214/https://dev.twitter.com/blog/say- | ||||
[] | [] | ||||
Underfull \hbox (badness 10000) in paragraph at lines 174--178 | |||||
Underfull \hbox (badness 10000) in paragraph at lines 148--152 | |||||
[]\T1/aer/m/n/12 Shabda. Un-der-stan-ding de-co-ra-tors. 2009. | []\T1/aer/m/n/12 Shabda. Un-der-stan-ding de-co-ra-tors. 2009. | ||||
[] | [] | ||||
Underfull \hbox (badness 10000) in paragraph at lines 180--186 | |||||
Underfull \hbox (badness 10000) in paragraph at lines 154--160 | |||||
[]\T1/aer/m/n/12 Alexy She-lest. Mo-del view con-trol-ler, mo-del view pre- | []\T1/aer/m/n/12 Alexy She-lest. Mo-del view con-trol-ler, mo-del view pre- | ||||
[] | [] | ||||
Underfull \hbox (badness 10000) in paragraph at lines 180--186 | |||||
Underfull \hbox (badness 10000) in paragraph at lines 154--160 | |||||
\T1/aer/m/n/12 sen-ter, and mo-del view view-mo-del de-sign pat-terns. 2009. | \T1/aer/m/n/12 sen-ter, and mo-del view view-mo-del de-sign pat-terns. 2009. | ||||
[] | [] | ||||
Underfull \hbox (badness 10000) in paragraph at lines 180--186 | |||||
Underfull \hbox (badness 10000) in paragraph at lines 154--160 | |||||
\T1/aer/m/n/12 https://www.codeproject.com/Articles/42830/Model-View-Controller- | \T1/aer/m/n/12 https://www.codeproject.com/Articles/42830/Model-View-Controller- | ||||
[] | [] | ||||
) | |||||
Package Fancyhdr Warning: \headheight is too small (12.0pt): | |||||
Make it at least 14.49998pt. | |||||
We now make it that large for the rest of the document. | |||||
This may cause the page layout to be inconsistent, however. | |||||
Package babel Info: Redefining german shorthand "f | |||||
(babel) in language on input line 160. | |||||
Package babel Info: Redefining german shorthand "| | |||||
(babel) in language on input line 160. | |||||
Package babel Info: Redefining german shorthand "~ | |||||
(babel) in language on input line 160. | |||||
Package babel Info: Redefining german shorthand "f | |||||
(babel) in language on input line 160. | |||||
Package babel Info: Redefining german shorthand "| | |||||
(babel) in language on input line 160. | |||||
Package babel Info: Redefining german shorthand "~ | |||||
(babel) in language on input line 160. | |||||
[36]) | |||||
Package atveryend Info: Empty hook `BeforeClearDocument' on input line 78. | Package atveryend Info: Empty hook `BeforeClearDocument' on input line 78. | ||||
) | ) | ||||
(\end occurred when \ifnum on line 5 was incomplete) | (\end occurred when \ifnum on line 5 was incomplete) | ||||
Here is how much of TeX's memory you used: | Here is how much of TeX's memory you used: | ||||
27414 strings out of 492970 | |||||
490166 string characters out of 6133939 | |||||
562518 words of memory out of 5000000 | |||||
30995 multiletter control sequences out of 15000+600000 | |||||
27402 strings out of 492970 | |||||
489989 string characters out of 6133939 | |||||
562442 words of memory out of 5000000 | |||||
30983 multiletter control sequences out of 15000+600000 | |||||
559401 words of font info for 77 fonts, out of 8000000 for 9000 | 559401 words of font info for 77 fonts, out of 8000000 for 9000 | ||||
1348 hyphenation exceptions out of 8191 | 1348 hyphenation exceptions out of 8191 | ||||
44i,18n,50p,10437b,951s stack positions out of 5000i,500n,10000p,200000b,80000s | 44i,18n,50p,10437b,951s stack positions out of 5000i,500n,10000p,200000b,80000s |
Speichert der Benutzer den Artikel, so werden im Backend die Daten wie folgt verarbeitet. In der View \texttt{post\_new} wird zunächst geprüft, ob alle Eingaben valide sind. Falls dies der Fall ist, wird der jeweilige Beitrag als Objekt zurückgegeben, jedoch durch das optionale Keywort \texttt{commit=false} noch nicht in der Datenbank gespeichert. Das ist notwendig, um dem Objekt spezifische Informationen mitzugeben. In diesem Kontext wird der aktuell eingeloggte User als Autor hinterlegt. Jedoch birgt die Vorgehensweise eine Problematik im Speichervorgang einer \texttt{ManyToMany} Relation zwischen zwei Modellen. Da Informationen nur auf ein bereits in der Datenbank bestehendes Objekt gesichert werden können, ist dies zunächst nicht möglich (vgl. [Fou18b]). | Speichert der Benutzer den Artikel, so werden im Backend die Daten wie folgt verarbeitet. In der View \texttt{post\_new} wird zunächst geprüft, ob alle Eingaben valide sind. Falls dies der Fall ist, wird der jeweilige Beitrag als Objekt zurückgegeben, jedoch durch das optionale Keywort \texttt{commit=false} noch nicht in der Datenbank gespeichert. Das ist notwendig, um dem Objekt spezifische Informationen mitzugeben. In diesem Kontext wird der aktuell eingeloggte User als Autor hinterlegt. Jedoch birgt die Vorgehensweise eine Problematik im Speichervorgang einer \texttt{ManyToMany} Relation zwischen zwei Modellen. Da Informationen nur auf ein bereits in der Datenbank bestehendes Objekt gesichert werden können, ist dies zunächst nicht möglich (vgl. [Fou18b]). | ||||
Im Prototyp nutzt das \texttt{PostModel} die \texttt{ManyToMany} Konnektivität mit dem Modell des \texttt{TaggabelManagers}. Um die Eingabe des Tag-Felds trotzdem im neuen Artikel speichern zu können, wird zunächst das Objekt gespeichert, um danach explizit das von Django zur Verfügung gestellte \texttt{form.save\_m2m()} aufrufen zu können. Der Befehl zwingt die Daten der \texttt{ManyToMany} Relation zu speichern. | Im Prototyp nutzt das \texttt{PostModel} die \texttt{ManyToMany} Konnektivität mit dem Modell des \texttt{TaggabelManagers}. Um die Eingabe des Tag-Felds trotzdem im neuen Artikel speichern zu können, wird zunächst das Objekt gespeichert, um danach explizit das von Django zur Verfügung gestellte \texttt{form.save\_m2m()} aufrufen zu können. Der Befehl zwingt die Daten der \texttt{ManyToMany} Relation zu speichern. | ||||
Die eindeutige Zuordnung der Eingabe im Front-end zur Verarbeitung der Artikel im Back-end ist mit einem \texttt{Primary Key} realisiert. Das \texttt{PostModel} bekommt beim Anlegen keinen Schlüssel zu einem Feld zugewiesen. Django erstellt ihn automatisiert beim Speichern der Tabelle als \texttt{AutoField} im Feld \texttt{Id} und identifiziert die \texttt{Id} automatisch bei jedem neu Erstellen eines Objekts. Somit sind alle Objekte eindeutig zuordenbar und können mit dem Kommando \texttt{post.pk} jederzeit abgefragt werden. | |||||
Die eindeutige Zuordnung der Eingabe im Frontend zur Verarbeitung der Artikel im Backend ist mit einem \texttt{Primary Key} realisiert. Das \texttt{PostModel} bekommt beim Anlegen keinen Schlüssel zu einem Feld zugewiesen. Django erstellt ihn automatisiert beim Speichern der Tabelle als \texttt{AutoField} im Feld \texttt{Id} und identifiziert die \texttt{Id} automatisch bei jedem neu Erstellen eines Objekts. Somit sind alle Objekte eindeutig zuordenbar und können mit dem Kommando \texttt{post.pk} jederzeit abgefragt werden. | |||||
\\ | \\ | ||||
\\ | \\ | ||||
\textbf{Einen bereits vorhandenen Artikel löschen: } | \textbf{Einen bereits vorhandenen Artikel löschen: } | ||||
\hfill | \hfill | ||||
\end{figure} | \end{figure} | ||||
Veranlasst der Benutzer die Speicherung des Artikels im Front-end, wird die bedingte Abfrage der Abbildung 3.7. in Zeile 91 erfüllt. Die POST-Abfrage ist hier notwendig, da Django nur so Daten in der Datenbank verändert. Eine Begründung hierfür ist die Art der Übertragung der Daten an den Server. \texttt{POST-Requests} bündeln alle Daten, verschlüsseln sie und senden sie dann an der Server (vgl. [Fou18c]). Dadurch ist der Vorgang einfacher kontrollierbar und mit einem \texttt{csrf-Token} im Template ebenfalls gegen Cross-Site-Request-Fälschung abgesichert. Die weitere Vorgehensweise der Funktion ist identisch zum bereits dargelegten neu erstellen eines Artikels und muss nicht weiter beschrieben werden.\\ | |||||
Veranlasst der Benutzer die Speicherung des Artikels im Frontend, wird die bedingte Abfrage der Abbildung 3.7. in Zeile 91 erfüllt. Die POST-Abfrage ist hier notwendig, da Django nur so Daten in der Datenbank verändert. Eine Begründung hierfür ist die Art der Übertragung der Daten an den Server. \texttt{POST-Requests} bündeln alle Daten, verschlüsseln sie und senden sie dann an der Server (vgl. [Fou18c]). Dadurch ist der Vorgang einfacher kontrollierbar und mit einem \texttt{csrf-Token} im Template ebenfalls gegen Cross-Site-Request-Fälschung abgesichert. Die weitere Vorgehensweise der Funktion ist identisch zum bereits dargelegten neu erstellen eines Artikels und muss nicht weiter beschrieben werden.\\ | |||||
\begin{figure}[!h] | \begin{figure}[!h] | ||||
\centering | \centering |
note = "https://docs.python.org/3/tutorial/venv.html" | note = "https://docs.python.org/3/tutorial/venv.html" | ||||
} | } | ||||
@article{Dixit, | |||||
author = "Chitrank Dixit", | |||||
title = "PEP-8 Tutorial: Code Standards in Python", | |||||
year = "2018", | |||||
note = "https://www.datacamp.com/community/tutorials/pep8-tutorial-python-code" | |||||
} | |||||
@article{Shabda, | @article{Shabda, | ||||
author = "Shabda", | author = "Shabda", | ||||
title = "Understanding decorators", | title = "Understanding decorators", | ||||
note = "Kapitel 23.1" | note = "Kapitel 23.1" | ||||
} | } | ||||
@article{Schlede, | |||||
author = "Frank-Michael Schlede, Thomas Bär, Andreas Donner", | |||||
title = "Was ist LDAP (Lightweight Directory Access Protocol)?", | |||||
year = "2017", | |||||
note = "https://www.ip-insider.de/was-ist-ldap-lightweight-directory-access-protocol-a-581204/" | |||||
} | |||||
@article{Oracle, | |||||
author = "Oracle Cooperation", | |||||
title = "About LDAP", | |||||
year = "2010", | |||||
note = "https://docs.oracle.com/cd/E19182-01/820-6573/6nht2e5a4/index.html" | |||||
} | |||||
@article{Otto, | @article{Otto, | ||||
author = "Mark Otto", | author = "Mark Otto", | ||||
title = "Bootstrap from Twitter", | title = "Bootstrap from Twitter", | ||||
note = "https://djangogirls.org/" | note = "https://djangogirls.org/" | ||||
} | } | ||||
@article{Microsoft, | |||||
author = "Microsoft", | |||||
title = "Extensions for the Visual Studio family of products", | |||||
year = "2018", | |||||
note = "https://marketplace.visualstudio.com/" | |||||
} | |||||
@article{Computer, | @article{Computer, | ||||
author = "The Computer Language Company", | author = "The Computer Language Company", | ||||
title = "Definition of: user permissions", | title = "Definition of: user permissions", |