added new buttons and einen artikel bearbeiten

This commit is contained in:
Esther Kleinhenz 2018-11-12 19:17:20 +01:00
parent 67e91fc5af
commit 5ec22d5ff9
17 changed files with 250 additions and 145 deletions

View File

@ -10,10 +10,10 @@
<a class="btn btn-outline-dark" href="{% url 'post_publish' pk=post.pk %}">Publish</a> <a class="btn btn-outline-dark" href="{% url 'post_publish' pk=post.pk %}">Publish</a>
{% endif %} {% if user.is_staff and user == post.author %} {% endif %} {% if user.is_staff and user == post.author %}
<a class="btn btn-outline-dark" href="{% url 'post_edit' pk=post.pk %}"> <a class="btn btn-outline-dark" href="{% url 'post_edit' pk=post.pk %}">
<span class="glyphicon glyphicon-pencil">Edit</span> <span class="glyphicon glyphicon-pencil">Bearbeiten</span>
</a> </a>
<a class="btn btn-outline-dark" href="{% url 'post_remove' pk=post.pk %}"> <a class="btn btn-outline-dark" href="{% url 'post_remove' pk=post.pk %}">
<span class="glyphicon glyphicon-remove">Remove</span> <span class="glyphicon glyphicon-remove">Löschen</span>
</a> </a>
{% endif %} {% endif %}
<h1>{{ post.title }}</h1> <h1>{{ post.title }}</h1>

View File

@ -1,9 +1,9 @@
{% extends 'base.html' %} {% extends 'base.html' %}
{% block content %} {% block content %}
<h1>New post</h1> <h1>Artikel-Editor</h1>
<form method="POST" class="post-form">{% csrf_token %} <form method="POST" class="post-form">{% csrf_token %}
{{ form.as_p }} {{ form.as_p }}
<button type="submit" class="save btn btn-outline-dark">Save</button> <button type="submit" class="save btn btn-outline-dark">Sichern</button>
</form> </form>
{% endblock %} {% endblock %}

View File

@ -1,5 +1,12 @@
{% extends 'base.html' %} {% block content %} {% extends 'base.html' %} {% block content %}
{% if tag %} Posts tagged with "{{ tag.name }}" {% endif %} {% if tag %} Posts tagged with "{{ tag.name }}" {% endif %}
{% if messages %}
<div class="messages">
{% for message in messages %}
<p {% if message.tags %} class="{{ message.tags }}" {% endif %}>{{ message }}</p>
{% endfor %}
</div>
{% endif %}
{% for post in posts %} {% for post in posts %}
<div class="post"> <div class="post">
<div class="date"> <div class="date">

View File

@ -121,6 +121,7 @@ def post_publish(request, pk):
@staff_member_required @staff_member_required
def post_remove(request, pk): def post_remove(request, pk):
post = get_object_or_404(Post, pk=pk) post = get_object_or_404(Post, pk=pk)
messages.info(request, 'Der Artikel "' + post.title + '" wurde gelöscht')
post.delete() post.delete()
return redirect('post_list') return redirect('post_list')

View File

@ -39,18 +39,21 @@
\bibcite{Computer}{{Com18}{}{{}}{{}}} \bibcite{Computer}{{Com18}{}{{}}{{}}}
\bibcite{Oracle}{{Coo10}{}{{}}{{}}} \bibcite{Oracle}{{Coo10}{}{{}}{{}}}
\bibcite{Dixit}{{Dix18}{}{{}}{{}}} \bibcite{Dixit}{{Dix18}{}{{}}{{}}}
\bibcite{Djangogirls}{{Dja18}{}{{}}{{}}}
\bibcite{Schlede}{{FMS17}{}{{}}{{}}} \bibcite{Schlede}{{FMS17}{}{{}}{{}}}
\bibcite{Django}{{Fou18a}{}{{}}{{}}} \bibcite{Django}{{Fou18a}{}{{}}{{}}}
\bibcite{Python}{{Fou18b}{}{{}}{{}}} \bibcite{Django-2}{{Fou18b}{}{{}}{{}}}
\bibcite{Python}{{Fou18c}{}{{}}{{}}}
\bibcite{Gaynor}{{Gay10}{}{{}}{{}}} \bibcite{Gaynor}{{Gay10}{}{{}}{{}}}
\bibcite{Herzog}{{Her16}{}{{}}{{}}} \bibcite{Herzog}{{Her16}{}{{}}{{}}}
\@writefile{toc}{\contentsline {chapter}{Referenzen}{23}{chapter*.15}}
\bibcite{King}{{Kin17}{}{{}}{{}}} \bibcite{King}{{Kin17}{}{{}}{{}}}
\bibcite{Leipner}{{Lei13}{}{{}}{{}}} \bibcite{Leipner}{{Lei13}{}{{}}{{}}}
\@writefile{toc}{\contentsline {chapter}{Referenzen}{22}{chapter*.15}}
\bibcite{Microsoft}{{Mic18}{}{{}}{{}}} \bibcite{Microsoft}{{Mic18}{}{{}}{{}}}
\bibcite{Ndukwe}{{Ndu17}{}{{}}{{}}} \bibcite{Ndukwe}{{Ndu17}{}{{}}{{}}}
\bibcite{Ong}{{Ong18}{}{{}}{{}}} \bibcite{Ong}{{Ong18}{}{{}}{{}}}
\bibcite{Otto}{{Ott11}{}{{}}{{}}} \bibcite{Otto}{{Ott11}{}{{}}{{}}}
\bibcite{Otto-2}{{Ott12}{}{{}}{{}}}
\bibcite{Shabda}{{Sha09}{}{{}}{{}}} \bibcite{Shabda}{{Sha09}{}{{}}{{}}}
\bibcite{Shelest}{{She09}{}{{}}{{}}} \bibcite{Shelest}{{She09}{}{{}}{{}}}
\bibcite{Solutions}{{Sol17}{}{{}}{{}}} \bibcite{Solutions}{{Sol17}{}{{}}{{}}}

View File

@ -25,6 +25,12 @@ Chitrank Dixit.
\newblock \newblock
https://www.datacamp.com/community/tutorials/pep8-tutorial-python-code. https://www.datacamp.com/community/tutorials/pep8-tutorial-python-code.
\bibitem[Dja18]{Djangogirls}
Djangogirls.
\newblock Creating a blog post model.
\newblock 2018.
\newblock https://tutorial.djangogirls.org/en/django\_models/.
\bibitem[FMS17]{Schlede} \bibitem[FMS17]{Schlede}
Andreas~Donner Frank-Michael~Schlede, Thomas~Bär. Andreas~Donner Frank-Michael~Schlede, Thomas~Bär.
\newblock Was ist ldap (lightweight directory access protocol)? \newblock Was ist ldap (lightweight directory access protocol)?
@ -38,7 +44,14 @@ Django~Software Foundation.
\newblock 2018. \newblock 2018.
\newblock https://docs.djangoproject.com/en/2.1/ref/contrib/auth/. \newblock https://docs.djangoproject.com/en/2.1/ref/contrib/auth/.
\bibitem[Fou18b]{Python} \bibitem[Fou18b]{Django-2}
Django~Software Foundation.
\newblock Modelforms - the save() methode.
\newblock 2018.
\newblock
https://docs.djangoproject.com/en/dev/topics/forms/modelforms/\#the-save-method.
\bibitem[Fou18c]{Python}
Python~Software Foundation. Python~Software Foundation.
\newblock Virtual environments and packages. \newblock Virtual environments and packages.
\newblock 2018. \newblock 2018.
@ -100,6 +113,13 @@ Mark Otto.
\newblock \newblock
https://blog.twitter.com/developer/en\_us/a/2011/bootstrap-twitter.html. https://blog.twitter.com/developer/en\_us/a/2011/bootstrap-twitter.html.
\bibitem[Ott12]{Otto-2}
Mark Otto.
\newblock Say hello to bootstrap 2.0.
\newblock 2012.
\newblock
https://web.archive.org/web/20120203191214/https://dev.twitter.com/blog/say-hello-to-bootstrap-2.
\bibitem[Sha09]{Shabda} \bibitem[Sha09]{Shabda}
Shabda. Shabda.
\newblock Understanding decorators. \newblock Understanding decorators.

View File

@ -15,20 +15,14 @@ Repeated entry---line 78 of file ../references/References_2.bib
: @article{Ong : @article{Ong
: , : ,
I'm skipping whatever remains of this entry I'm skipping whatever remains of this entry
Repeated entry---line 127 of file ../references/References_2.bib
: @article{Otto
: ,
I'm skipping whatever remains of this entry
Repeated entry---line 141 of file ../references/References_2.bib
: @article{Django
: ,
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 Oracle
Warning--empty journal in Dixit Warning--empty journal in Dixit
Warning--empty journal in Djangogirls
Warning--empty journal in Schlede Warning--empty journal in Schlede
Warning--empty journal in Django Warning--empty journal in Django
Warning--empty journal in Django-2
Warning--empty journal in Python Warning--empty journal in Python
Warning--empty journal in Gaynor Warning--empty journal in Gaynor
Warning--empty journal in Herzog Warning--empty journal in Herzog
@ -38,50 +32,51 @@ Warning--empty journal in Microsoft
Warning--empty journal in Ndukwe Warning--empty journal in Ndukwe
Warning--empty journal in Ong Warning--empty journal in Ong
Warning--empty journal in Otto Warning--empty journal in Otto
Warning--empty journal in Otto-2
Warning--empty journal in Shabda Warning--empty journal in Shabda
Warning--empty journal in Shelest Warning--empty journal in Shelest
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 20 entries, You've used 23 entries,
2543 wiz_defined-function locations, 2543 wiz_defined-function locations,
671 strings with 7567 characters, 684 strings with 7930 characters,
and the built_in function-call counts, 5457 in all, are: and the built_in function-call counts, 6272 in all, are:
= -- 537 = -- 618
> -- 160 > -- 184
< -- 20 < -- 23
+ -- 41 + -- 48
- -- 40 - -- 46
* -- 264 * -- 303
:= -- 959 := -- 1101
add.period$ -- 80 add.period$ -- 92
call.type$ -- 20 call.type$ -- 23
change.case$ -- 99 change.case$ -- 114
chr.to.int$ -- 19 chr.to.int$ -- 21
cite$ -- 40 cite$ -- 46
duplicate$ -- 282 duplicate$ -- 324
empty$ -- 406 empty$ -- 466
format.name$ -- 78 format.name$ -- 90
if$ -- 1065 if$ -- 1224
int.to.chr$ -- 2 int.to.chr$ -- 3
int.to.str$ -- 0 int.to.str$ -- 0
missing$ -- 21 missing$ -- 24
newline$ -- 123 newline$ -- 141
num.names$ -- 60 num.names$ -- 69
pop$ -- 121 pop$ -- 139
preamble$ -- 1 preamble$ -- 1
purify$ -- 120 purify$ -- 138
quote$ -- 0 quote$ -- 0
skip$ -- 217 skip$ -- 249
stack$ -- 0 stack$ -- 0
substring$ -- 140 substring$ -- 161
swap$ -- 1 swap$ -- 1
text.length$ -- 20 text.length$ -- 23
text.prefix$ -- 18 text.prefix$ -- 21
top$ -- 0 top$ -- 0
type$ -- 156 type$ -- 180
warning$ -- 20 warning$ -- 23
while$ -- 40 while$ -- 46
width$ -- 25 width$ -- 29
write$ -- 262 write$ -- 301
(There were 3 error messages) (There was 1 error message)

View File

@ -1,4 +1,4 @@
This is XeTeX, Version 3.14159265-2.6-0.99999 (TeX Live 2018) (preloaded format=xelatex 2018.6.7) 11 NOV 2018 23:26 This is XeTeX, Version 3.14159265-2.6-0.99999 (TeX Live 2018) (preloaded format=xelatex 2018.6.7) 12 NOV 2018 19:00
entering extended mode entering extended mode
\write18 enabled. \write18 enabled.
file:line:error style messages enabled. file:line:error style messages enabled.
@ -1599,42 +1599,69 @@ Package babel Info: Redefining german shorthand "|
(babel) in language on input line 117. (babel) in language on input line 117.
Package babel Info: Redefining german shorthand "~ Package babel Info: Redefining german shorthand "~
(babel) in language on input line 117. (babel) in language on input line 117.
Package babel Info: Redefining german shorthand "f
(babel) in language on input line 124.
Package babel Info: Redefining german shorthand "|
(babel) in language on input line 124.
Package babel Info: Redefining german shorthand "~
(babel) in language on input line 124.
Package babel Info: Redefining german shorthand "f
(babel) in language on input line 124.
Package babel Info: Redefining german shorthand "|
(babel) in language on input line 124.
Package babel Info: Redefining german shorthand "~
(babel) in language on input line 124.
[18]
Package babel Info: Redefining german shorthand "f
(babel) in language on input line 126.
Package babel Info: Redefining german shorthand "|
(babel) in language on input line 126.
Package babel Info: Redefining german shorthand "~
(babel) in language on input line 126.
Overfull \hbox (1.12642pt too wide) in paragraph at lines 127--128 Underfull \hbox (badness 10000) in paragraph at lines 118--122
[]
Package babel Info: Redefining german shorthand "f
(babel) in language on input line 127.
Package babel Info: Redefining german shorthand "|
(babel) in language on input line 127.
Package babel Info: Redefining german shorthand "~
(babel) in language on input line 127.
Package babel Info: Redefining german shorthand "f
(babel) in language on input line 127.
Package babel Info: Redefining german shorthand "|
(babel) in language on input line 127.
Package babel Info: Redefining german shorthand "~
(babel) in language on input line 127.
[18]
Underfull \hbox (badness 10000) in paragraph at lines 128--132
[]
Underfull \hbox (badness 10000) in paragraph at lines 133--137
[]
Package babel Info: Redefining german shorthand "f
(babel) in language on input line 141.
Package babel Info: Redefining german shorthand "|
(babel) in language on input line 141.
Package babel Info: Redefining german shorthand "~
(babel) in language on input line 141.
Overfull \hbox (1.12642pt too wide) in paragraph at lines 142--143
\T1/aer/m/n/12 Tags als ein-ge-logg-ter User abon-nie-ren und ver-wal-ten Front-end und Admin-Backend? \T1/aer/m/n/12 Tags als ein-ge-logg-ter User abon-nie-ren und ver-wal-ten Front-end und Admin-Backend?
[] []
Package babel Info: Redefining german shorthand "f Package babel Info: Redefining german shorthand "f
(babel) in language on input line 129. (babel) in language on input line 144.
Package babel Info: Redefining german shorthand "| Package babel Info: Redefining german shorthand "|
(babel) in language on input line 129. (babel) in language on input line 144.
Package babel Info: Redefining german shorthand "~ Package babel Info: Redefining german shorthand "~
(babel) in language on input line 129. (babel) in language on input line 144.
Package babel Info: Redefining german shorthand "f Package babel Info: Redefining german shorthand "f
(babel) in language on input line 132. (babel) in language on input line 144.
Package babel Info: Redefining german shorthand "| Package babel Info: Redefining german shorthand "|
(babel) in language on input line 132. (babel) in language on input line 144.
Package babel Info: Redefining german shorthand "~ Package babel Info: Redefining german shorthand "~
(babel) in language on input line 132. (babel) in language on input line 144.
[19]
Package babel Info: Redefining german shorthand "f
(babel) in language on input line 144.
Package babel Info: Redefining german shorthand "|
(babel) in language on input line 144.
Package babel Info: Redefining german shorthand "~
(babel) in language on input line 144.
Package babel Info: Redefining german shorthand "f
(babel) in language on input line 147.
Package babel Info: Redefining german shorthand "|
(babel) in language on input line 147.
Package babel Info: Redefining german shorthand "~
(babel) in language on input line 147.
) )
Package babel Info: Redefining german shorthand "f Package babel Info: Redefining german shorthand "f
(babel) in language on input line 59. (babel) in language on input line 59.
@ -1648,7 +1675,7 @@ Package babel Info: Redefining german shorthand "|
(babel) in language on input line 59. (babel) in language on input line 59.
Package babel Info: Redefining german shorthand "~ Package babel Info: Redefining german shorthand "~
(babel) in language on input line 59. (babel) in language on input line 59.
[19] [20]
\openout2 = `chapters/ergebnis.aux'. \openout2 = `chapters/ergebnis.aux'.
(./chapters/ergebnis.tex (./chapters/ergebnis.tex
@ -1682,7 +1709,7 @@ Package babel Info: Redefining german shorthand "|
(babel) in language on input line 60. (babel) in language on input line 60.
Package babel Info: Redefining german shorthand "~ Package babel Info: Redefining german shorthand "~
(babel) in language on input line 60. (babel) in language on input line 60.
[20 [21
@ -1714,7 +1741,7 @@ Package babel Info: Redefining german shorthand "|
(babel) in language on input line 62. (babel) in language on input line 62.
Package babel Info: Redefining german shorthand "~ Package babel Info: Redefining german shorthand "~
(babel) in language on input line 62. (babel) in language on input line 62.
[21 [22
@ -1743,74 +1770,105 @@ Underfull \hbox (badness 10000) in paragraph at lines 22--27
\T1/aer/m/n/12 https://www.datacamp.com/community/tutorials/pep8-tutorial-python- \T1/aer/m/n/12 https://www.datacamp.com/community/tutorials/pep8-tutorial-python-
[] []
Missing character: There is no in font aer12!
Underfull \hbox (badness 2717) in paragraph at lines 62--67 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 48--53
\T1/aer/m/n/12 https://docs.djangoproject.com/en/dev/topics/forms/modelforms/#the-
[]
Missing character: There is no in font aer12!
Package babel Info: Redefining german shorthand "f
(babel) in language on input line 74.
Package babel Info: Redefining german shorthand "|
(babel) in language on input line 74.
Package babel Info: Redefining german shorthand "~
(babel) in language on input line 74.
Package babel Info: Redefining german shorthand "f
(babel) in language on input line 74.
Package babel Info: Redefining german shorthand "|
(babel) in language on input line 74.
Package babel Info: Redefining german shorthand "~
(babel) in language on input line 74.
[23
]
Underfull \hbox (badness 2717) in paragraph at lines 75--80
[]\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!
Missing character: There is no ̈ in font aer12! Missing character: There is no ̈ in font aer12!
Package babel Info: Redefining german shorthand "f
(babel) in language on input line 75.
Package babel Info: Redefining german shorthand "|
(babel) in language on input line 75.
Package babel Info: Redefining german shorthand "~
(babel) in language on input line 75.
Package babel Info: Redefining german shorthand "f
(babel) in language on input line 75.
Package babel Info: Redefining german shorthand "|
(babel) in language on input line 75.
Package babel Info: Redefining german shorthand "~
(babel) in language on input line 75.
[22
]
Missing character: There is no in font aer12! Missing character: There is no in font aer12!
Underfull \hbox (badness 10000) in paragraph at lines 83--89 Underfull \hbox (badness 10000) in paragraph at lines 96--102
\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 91--95 Underfull \hbox (badness 10000) in paragraph at lines 104--108
[]\T1/aer/m/n/12 Selwin Ong. django-post_office git re-po-si-to-ry. 2018. []\T1/aer/m/n/12 Selwin Ong. django-post_office git re-po-si-to-ry. 2018.
[] []
Underfull \hbox (badness 10000) in paragraph at lines 97--102 Underfull \hbox (badness 10000) in paragraph at lines 110--115
[]\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 97--102 Underfull \hbox (badness 10000) in paragraph at lines 110--115
\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 104--108 Underfull \hbox (badness 10000) in paragraph at lines 117--122
[]\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 117--122
\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 124--128
[]\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 110--116 Underfull \hbox (badness 10000) in paragraph at lines 130--136
[]\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 110--116 Underfull \hbox (badness 10000) in paragraph at lines 130--136
\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 110--116 Underfull \hbox (badness 10000) in paragraph at lines 130--136
\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 babel Info: Redefining german shorthand "f
(babel) in language on input line 149.
Package babel Info: Redefining german shorthand "|
(babel) in language on input line 149.
Package babel Info: Redefining german shorthand "~
(babel) in language on input line 149.
Package babel Info: Redefining german shorthand "f
(babel) in language on input line 149.
Package babel Info: Redefining german shorthand "|
(babel) in language on input line 149.
Package babel Info: Redefining german shorthand "~
(babel) in language on input line 149.
[24])
Package atveryend Info: Empty hook `BeforeClearDocument' on input line 77. Package atveryend Info: Empty hook `BeforeClearDocument' on input line 77.
Package babel Info: Redefining german shorthand "f Package babel Info: Redefining german shorthand "f
(babel) in language on input line 77. (babel) in language on input line 77.
@ -1824,7 +1882,7 @@ Package babel Info: Redefining german shorthand "|
(babel) in language on input line 77. (babel) in language on input line 77.
Package babel Info: Redefining german shorthand "~ Package babel Info: Redefining german shorthand "~
(babel) in language on input line 77. (babel) in language on input line 77.
[23] [25]
Package atveryend Info: Empty hook `AfterLastShipout' on input line 77. Package atveryend Info: Empty hook `AfterLastShipout' on input line 77.
(/Users/Esthi/thesis_ek/doc/bachelorarbeit_EstherKleinhenz/.texpadtmp/bachelorabeit_EstherKleinhenz.aux (/Users/Esthi/thesis_ek/doc/bachelorarbeit_EstherKleinhenz/.texpadtmp/titlepage/titlepage.aux) (/Users/Esthi/thesis_ek/doc/bachelorarbeit_EstherKleinhenz/.texpadtmp/abstract/abstract.aux) (/Users/Esthi/thesis_ek/doc/bachelorarbeit_EstherKleinhenz/.texpadtmp/chapters/einleitung.aux) (/Users/Esthi/thesis_ek/doc/bachelorarbeit_EstherKleinhenz/.texpadtmp/chapters/framework.aux) (/Users/Esthi/thesis_ek/doc/bachelorarbeit_EstherKleinhenz/.texpadtmp/chapters/prototyp.aux) (/Users/Esthi/thesis_ek/doc/bachelorarbeit_EstherKleinhenz/.texpadtmp/chapters/ergebnis.aux) (/Users/Esthi/thesis_ek/doc/bachelorarbeit_EstherKleinhenz/.texpadtmp/chapters/ausblick.aux) (/Users/Esthi/thesis_ek/doc/bachelorarbeit_EstherKleinhenz/.texpadtmp/chapters/fazit.aux)) (/Users/Esthi/thesis_ek/doc/bachelorarbeit_EstherKleinhenz/.texpadtmp/bachelorabeit_EstherKleinhenz.aux (/Users/Esthi/thesis_ek/doc/bachelorarbeit_EstherKleinhenz/.texpadtmp/titlepage/titlepage.aux) (/Users/Esthi/thesis_ek/doc/bachelorarbeit_EstherKleinhenz/.texpadtmp/abstract/abstract.aux) (/Users/Esthi/thesis_ek/doc/bachelorarbeit_EstherKleinhenz/.texpadtmp/chapters/einleitung.aux) (/Users/Esthi/thesis_ek/doc/bachelorarbeit_EstherKleinhenz/.texpadtmp/chapters/framework.aux) (/Users/Esthi/thesis_ek/doc/bachelorarbeit_EstherKleinhenz/.texpadtmp/chapters/prototyp.aux) (/Users/Esthi/thesis_ek/doc/bachelorarbeit_EstherKleinhenz/.texpadtmp/chapters/ergebnis.aux) (/Users/Esthi/thesis_ek/doc/bachelorarbeit_EstherKleinhenz/.texpadtmp/chapters/ausblick.aux) (/Users/Esthi/thesis_ek/doc/bachelorarbeit_EstherKleinhenz/.texpadtmp/chapters/fazit.aux))
Package atveryend Info: Empty hook `AtVeryEndDocument' on input line 77. Package atveryend Info: Empty hook `AtVeryEndDocument' on input line 77.
@ -1839,12 +1897,12 @@ Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 77.
) )
(\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:
26616 strings out of 492970 26626 strings out of 492970
477449 string characters out of 6133939 477603 string characters out of 6133939
547177 words of memory out of 5000000 547235 words of memory out of 5000000
30225 multiletter control sequences out of 15000+600000 30235 multiletter control sequences out of 15000+600000
555998 words of font info for 62 fonts, out of 8000000 for 9000 555998 words of font info for 62 fonts, out of 8000000 for 9000
1348 hyphenation exceptions out of 8191 1348 hyphenation exceptions out of 8191
58i,12n,50p,10437b,958s stack positions out of 5000i,500n,10000p,200000b,80000s 58i,12n,50p,10437b,958s stack positions out of 5000i,500n,10000p,200000b,80000s
Output written on /Users/Esthi/thesis_ek/doc/bachelorarbeit_EstherKleinhenz/.texpadtmp/bachelorabeit_EstherKleinhenz.pdf (28 pages). Output written on /Users/Esthi/thesis_ek/doc/bachelorarbeit_EstherKleinhenz/.texpadtmp/bachelorabeit_EstherKleinhenz.pdf (30 pages).

View File

@ -23,10 +23,10 @@
\contentsline {subsection}{\numberline {3.2.3}Berechtigung der User}{17}{subsection.3.2.3} \contentsline {subsection}{\numberline {3.2.3}Berechtigung der User}{17}{subsection.3.2.3}
\contentsline {section}{\numberline {3.3}Funktionen}{18}{section.3.3} \contentsline {section}{\numberline {3.3}Funktionen}{18}{section.3.3}
\contentsline {subsection}{\numberline {3.3.1}Verwalten}{18}{subsection.3.3.1} \contentsline {subsection}{\numberline {3.3.1}Verwalten}{18}{subsection.3.3.1}
\contentsline {subsection}{\numberline {3.3.2}Abonnieren}{19}{subsection.3.3.2} \contentsline {subsection}{\numberline {3.3.2}Abonnieren}{20}{subsection.3.3.2}
\contentsline {subsection}{\numberline {3.3.3}Filtern}{19}{subsection.3.3.3} \contentsline {subsection}{\numberline {3.3.3}Filtern}{20}{subsection.3.3.3}
\contentsline {subsection}{\numberline {3.3.4}Benachrichtigung}{19}{subsection.3.3.4} \contentsline {subsection}{\numberline {3.3.4}Benachrichtigung}{20}{subsection.3.3.4}
\contentsline {chapter}{\numberline {4}Ergebnis}{20}{chapter.4} \contentsline {chapter}{\numberline {4}Ergebnis}{21}{chapter.4}
\contentsline {subsection}{\numberline {4.0.1}Evaluierung}{20}{subsection.4.0.1} \contentsline {subsection}{\numberline {4.0.1}Evaluierung}{21}{subsection.4.0.1}
\contentsline {chapter}{\numberline {5}Zusammenfassung und Ausblick}{21}{chapter.5} \contentsline {chapter}{\numberline {5}Zusammenfassung und Ausblick}{22}{chapter.5}
\contentsline {chapter}{Referenzen}{22}{chapter*.15} \contentsline {chapter}{Referenzen}{23}{chapter*.15}

View File

@ -1,7 +1,7 @@
\relax \relax
\providecommand\hyper@newdestlabel[2]{} \providecommand\hyper@newdestlabel[2]{}
\@setckpt{chapters/ausblick}{ \@setckpt{chapters/ausblick}{
\setcounter{page}{21} \setcounter{page}{22}
\setcounter{equation}{0} \setcounter{equation}{0}
\setcounter{enumi}{0} \setcounter{enumi}{0}
\setcounter{enumii}{0} \setcounter{enumii}{0}

View File

@ -1,12 +1,12 @@
\relax \relax
\providecommand\hyper@newdestlabel[2]{} \providecommand\hyper@newdestlabel[2]{}
\@writefile{toc}{\contentsline {chapter}{\numberline {4}Ergebnis}{20}{chapter.4}} \@writefile{toc}{\contentsline {chapter}{\numberline {4}Ergebnis}{21}{chapter.4}}
\@writefile{lof}{\addvspace {10\p@ }} \@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }} \@writefile{lot}{\addvspace {10\p@ }}
\newlabel{ch:ergebnis}{{4}{20}{Ergebnis}{chapter.4}{}} \newlabel{ch:ergebnis}{{4}{21}{Ergebnis}{chapter.4}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {4.0.1}Evaluierung}{20}{subsection.4.0.1}} \@writefile{toc}{\contentsline {subsection}{\numberline {4.0.1}Evaluierung}{21}{subsection.4.0.1}}
\@setckpt{chapters/ergebnis}{ \@setckpt{chapters/ergebnis}{
\setcounter{page}{21} \setcounter{page}{22}
\setcounter{equation}{0} \setcounter{equation}{0}
\setcounter{enumi}{0} \setcounter{enumi}{0}
\setcounter{enumii}{0} \setcounter{enumii}{0}

View File

@ -1,11 +1,11 @@
\relax \relax
\providecommand\hyper@newdestlabel[2]{} \providecommand\hyper@newdestlabel[2]{}
\@writefile{toc}{\contentsline {chapter}{\numberline {5}Zusammenfassung und Ausblick}{21}{chapter.5}} \@writefile{toc}{\contentsline {chapter}{\numberline {5}Zusammenfassung und Ausblick}{22}{chapter.5}}
\@writefile{lof}{\addvspace {10\p@ }} \@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }} \@writefile{lot}{\addvspace {10\p@ }}
\newlabel{ch:zusammenfassung}{{5}{21}{Zusammenfassung und Ausblick}{chapter.5}{}} \newlabel{ch:zusammenfassung}{{5}{22}{Zusammenfassung und Ausblick}{chapter.5}{}}
\@setckpt{chapters/fazit}{ \@setckpt{chapters/fazit}{
\setcounter{page}{22} \setcounter{page}{23}
\setcounter{equation}{0} \setcounter{equation}{0}
\setcounter{enumi}{0} \setcounter{enumi}{0}
\setcounter{enumii}{0} \setcounter{enumii}{0}

View File

@ -15,11 +15,11 @@
\@writefile{toc}{\contentsline {section}{\numberline {3.3}Funktionen}{18}{section.3.3}} \@writefile{toc}{\contentsline {section}{\numberline {3.3}Funktionen}{18}{section.3.3}}
\@writefile{lof}{\contentsline {figure}{\numberline {3.4}{\ignorespaces User Stories\relax }}{18}{figure.caption.14}} \@writefile{lof}{\contentsline {figure}{\numberline {3.4}{\ignorespaces User Stories\relax }}{18}{figure.caption.14}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3.1}Verwalten}{18}{subsection.3.3.1}} \@writefile{toc}{\contentsline {subsection}{\numberline {3.3.1}Verwalten}{18}{subsection.3.3.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3.2}Abonnieren}{19}{subsection.3.3.2}} \@writefile{toc}{\contentsline {subsection}{\numberline {3.3.2}Abonnieren}{20}{subsection.3.3.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3.3}Filtern}{19}{subsection.3.3.3}} \@writefile{toc}{\contentsline {subsection}{\numberline {3.3.3}Filtern}{20}{subsection.3.3.3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3.4}Benachrichtigung}{19}{subsection.3.3.4}} \@writefile{toc}{\contentsline {subsection}{\numberline {3.3.4}Benachrichtigung}{20}{subsection.3.3.4}}
\@setckpt{chapters/prototyp}{ \@setckpt{chapters/prototyp}{
\setcounter{page}{20} \setcounter{page}{21}
\setcounter{equation}{0} \setcounter{equation}{0}
\setcounter{enumi}{0} \setcounter{enumi}{0}
\setcounter{enumii}{0} \setcounter{enumii}{0}

View File

@ -115,13 +115,27 @@ Um die wichtigsten Funktionen des Prototypen festlegen zu können werden User St
\end{figure} \end{figure}
\subsection{Verwalten} \subsection{Verwalten}
Das Verwalten der Artikel soll von berechtigten Nutzern hauptsächlich im Front-end stattfinden. Der Vorgang des Erstellens, des Löschens und des Editierens der einzelnen Einträge wird im Folgenden konkretisiert. Das Verwalten der Artikel soll von berechtigten Nutzern im Front-end stattfinden, hingegen die prozessuale Logik im Code-Back-end passiert. Der Vorgang des Erstellens, des Löschens und des Editierens der einzelnen Einträge wird im Folgenden konkretisiert.
\\
\\
Einen neuen Artikel erstellen:
Ein neuer Artikel wird erstellt. Das \glqq +\grqq\ in der Menüleiste leitet den Benutzer zu einer Unterseite. Hier können alle Felder befüllt werden, die im PostForm-Formular in der Datei forms.py festgelegt wurden. Dazu gehören der Titel und der Text, die als Pflichtfelder gelten. Das Feld \glqq Tags \grqq\ muss ebenfalls mindestens einen Wert enthalten um die Validierung der Eingaben sichern zu können. Eine Ausnahme bildet das Datum der Veröffentlichung. Bleibt das Feld leer so wird der Post automatisch der Liste der Entwürfe beigefügt. Das \glqq +\grqq\ in der Menüleiste leitet den Benutzer zu einer Unterseite. Hier können alle Felder befüllt werden, die im PostForm-Formular in der Datei forms.py festgelegt wurden. Dazu gehören der Titel und der Text, die als Pflichtfelder gelten. Das Feld \glqq Tags \grqq\ muss ebenfalls mindestens einen Wert enthalten um die Validierung der Eingaben sichern zu können. Eine Ausnahme bildet das Datum der Veröffentlichung. Bleibt das Feld leer so wird der Post automatisch der Liste der Entwürfe beigefügt.
Die eindeutige Zuordnung der Eingabe im Front-end zur Verarbeitung der verschiedenen Artikel im Back-end ist mit einem \textit{Primary Key} realisiert. In der View \glqq post\_new \grqq\ wird zunächst die Validität aller Eingaben geprüft. Falls dies der Fall ist, wird der Post als Objekt zurückgegeben, jedoch durch das optionale \textit{Keywort} \glqq commit=false \grqq\ noch nicht in der Datenbank abgelegt. 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 \textit{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. Speichert der Benutzer nun den Artikel, so werden im Back-end die Daten wir folgt verarbeitet. In der View \glqq post\_new \grqq\ wird zunächst die Validität aller Eingaben geprüft. Falls dies der Fall ist, wird der Post als Objekt zurückgegeben, jedoch durch das optionale \textit{Keywort} \glqq commit=false \grqq\ noch nicht in der Datenbank abgelegt. 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 \textit{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 \textit{PostModel} die \textit{ManyToMany} Konnektivität mit dem Modell des TaggabelManagers. Um die Eingabe des Tag-Felds trotzdem im neuen Artikel speichern zu können, wird zunächst das Objekt gespeichert, um nachdem explizit das von Django zur Verfügung gestellte \glqq form.save\_m2m() \grqq\ aufrufen zu können. Im Prototyp nutzt das \textit{PostModel} die \textit{ManyToMany} Konnektivität mit dem Modell des TaggabelManagers. Um die Eingabe des Tag-Felds trotzdem im neuen Artikel speichern zu können, wird zunächst das Objekt gespeichert, um nachdem explizit das von Django zur Verfügung gestellte \glqq form.save\_m2m() \grqq\ aufrufen zu können. Dieser Befehl zwingt die Daten der \textit{ManyToMany} Relation zu speichern.
--- pk erklären
Die eindeutige Zuordnung der Eingabe im Front-end zur Verarbeitung der Artikel im Back-end ist mit einem \textit{Primary Key} realisiert. Das \textit{PostModel} bekommt beim Anlegen keinen solchen Schlüssel zu einem Feld zugewiesen. Ist das der Fall, erstellt Django automatisiert beim Speichern der Tabelle diesen als \textit{AutoField} im Feld \glqq Id \grqq\ und zählt bei jedem neu Erstellen eines Objekts hoch. Somit sind alle Objekte eindeutig zuordenbar und können mit dem Kommando \glqq post.pk \grqq\ jederzeit aufgerufen werden.
\\
\\
Einen bereits vorhandenen Artikel löschen:
In der Detailansicht eines Artikels ist es möglich diesen durch klicken auf den Button \glqq Löschen \grqq\ zu entfernen. Die View \glqq post\_remove \grqq\ selektiert über den im Template mitgegebenen \textit{Primary Key} das Objekt und speichert dies in der Variable \glqq post\grqq\. Um dem Benutzer nochmals mitteilen zu können, welchen Artikel er entfernt hat, wird vor dem Löschen eine Nachricht mit dem Titel dessen generiert. Nachdem wird dieser gelöscht (post.remove()) und eine Umleitung am Ende der View-Definition schickt den Benutzer auf die Seite der Artikelliste. Hier wird die vorher erstellte Nachricht aus informellen Gründen eingebunden.
\\
\\
Einen bereits vorhandenen Artikel bearbeiten:
Ähnlich wie beim Löschen eines Artikel, kann man diesen in der Detailansicht bearbeiten. Mit dem Betätigen des Bearbeiten-Buttons wird der User auf den Artikel-Editor weitergeleitet.
\subsection{Abonnieren} \subsection{Abonnieren}

View File

@ -124,7 +124,7 @@
note = "https://github.com/twbs/bootstrap" note = "https://github.com/twbs/bootstrap"
} }
@article{Otto, @article{Otto-2,
author = "Mark Otto", author = "Mark Otto",
title = "Say hello to Bootstrap 2.0", title = "Say hello to Bootstrap 2.0",
year = "2012", year = "2012",
@ -138,11 +138,11 @@
note = "https://docs.djangoproject.com/en/2.1/ref/contrib/auth/" note = "https://docs.djangoproject.com/en/2.1/ref/contrib/auth/"
} }
@article{Django, @article{Djangogirls,
author = "Djangogirlsgirls", author = "Djangogirls",
title = "Creating a blog post model", title = "Creating a blog post model",
year = "2018", year = "2018",
note = "https://tutorial.djangogirls.org/en/django_models/" note = "https://tutorial.djangogirls.org/en/django\_models/"
} }
@article{Microsoft, @article{Microsoft,
@ -159,5 +159,12 @@
note = "https://www.pcmag.com/encyclopedia/term/58231/user-permissions" note = "https://www.pcmag.com/encyclopedia/term/58231/user-permissions"
} }
@article{Django-2,
author = "Django Software Foundation",
title = "Modelforms - The save() methode",
year = "2018",
note = "https://docs.djangoproject.com/en/dev/topics/forms/modelforms/\#the-save-method"
}