added new js file and make the published date editable on webiste
This commit is contained in:
parent
2cb1629a81
commit
145fd921d9
@ -1,9 +1,8 @@
|
|||||||
from django import forms
|
from django import forms
|
||||||
from .models import Post, CustomUser
|
from .models import Post, CustomUser
|
||||||
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
|
|
||||||
|
|
||||||
class PostForm(forms.ModelForm):
|
class PostForm(forms.ModelForm):
|
||||||
|
published_date = forms.DateField(widget=forms.widgets.DateInput(format="%d. %h %Y, %M:%S"))
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Post
|
model = Post
|
||||||
fields = ('title', 'text')
|
fields = ('title', 'text', 'published_date', 'tags')
|
0
application/static/js/app.js
Normal file
0
application/static/js/app.js
Normal file
@ -8,8 +8,6 @@
|
|||||||
<title> {% block title %}Seitenname{% endblock %}</title>
|
<title> {% block title %}Seitenname{% endblock %}</title>
|
||||||
<link href="{% static 'css/application.css' %}" rel="stylesheet">
|
<link href="{% static 'css/application.css' %}" rel="stylesheet">
|
||||||
<link href="{% static 'bootstrap/css/bootstrap.css' %}" rel="stylesheet">
|
<link href="{% static 'bootstrap/css/bootstrap.css' %}" rel="stylesheet">
|
||||||
{% include "taggit_templatetags2/tagcanvas_include_js_static.html" %}
|
|
||||||
{% include_tagcanvas 'tag-cloud' 'width px' 'height px' 'post_list.html' 'application' %}
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@ -62,7 +60,8 @@
|
|||||||
<li>
|
<li>
|
||||||
<form class="form" role="form" method="post" action="{% url 'login' %}" accept-charset="UTF-8" id="login-nav">
|
<form class="form" role="form" method="post" action="{% url 'login' %}" accept-charset="UTF-8" id="login-nav">
|
||||||
{% csrf_token %} {% if next %}
|
{% csrf_token %} {% if next %}
|
||||||
<input type="hidden" name="next" value="{{ next }}" /> {% endif %}
|
<input type="hidden" name="next" value="{{ next }}" />
|
||||||
|
{% endif %}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="sr-only" for="username">Benutzername</label>
|
<label class="sr-only" for="username">Benutzername</label>
|
||||||
<input type="text" class="form-control" id="username" name="username" placeholder="Benutzername" required>
|
<input type="text" class="form-control" id="username" name="username" placeholder="Benutzername" required>
|
||||||
@ -93,6 +92,7 @@
|
|||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||||
<script src="{% static 'bootstrap/js/jquery-1.11.1.js' %} "></script>
|
<script src="{% static 'bootstrap/js/jquery-1.11.1.js' %} "></script>
|
||||||
<script src="{% static 'bootstrap/jsjquery.tagcanvas.min.js' %} " type="text/javascript"></script>
|
<script src="{% static 'bootstrap/jsjquery.tagcanvas.min.js' %} " type="text/javascript"></script>
|
||||||
|
<script src="{% static 'js/app.js' %}"></script>
|
||||||
<script src="{% static 'bootstrap/js/bootstrap.bundle.js' %}"></script>
|
<script src="{% static 'bootstrap/js/bootstrap.bundle.js' %}"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
@ -1,4 +1,10 @@
|
|||||||
{% extends "base.html" %} {% block content %}
|
{% extends "base.html" %} {% block content %}
|
||||||
|
|
||||||
hi
|
<div id="tag-cloud">
|
||||||
|
<ul>
|
||||||
|
{% for tag in tags %}
|
||||||
|
<li>{{tag}} ({{tag.num_times}})</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -18,7 +18,8 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% get_tagcloud as tags for 'application' %}
|
{% include "taggit_templatetags2/tagcanvas_include_js_static.html" %}
|
||||||
|
|
||||||
<div id="tag-cloud">
|
<div id="tag-cloud">
|
||||||
<ul>
|
<ul>
|
||||||
{% for tag in tags %}
|
{% for tag in tags %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user