add missing files
This commit is contained in:
parent
0b64fd58a1
commit
a936246de9
4 changed files with 99 additions and 0 deletions
|
@ -0,0 +1,51 @@
|
||||||
|
# Generated by Django 4.2.3 on 2023-07-25 18:51
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
dependencies = [
|
||||||
|
("item", "0004_comment_session_key"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="comment",
|
||||||
|
name="email",
|
||||||
|
field=models.CharField(blank=True, max_length=1024),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="comment",
|
||||||
|
name="name",
|
||||||
|
field=models.CharField(blank=True, max_length=1024),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="comment",
|
||||||
|
name="published",
|
||||||
|
field=models.DateTimeField(blank=True, default=None, null=True),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="comment",
|
||||||
|
name="session_key",
|
||||||
|
field=models.CharField(
|
||||||
|
blank=True, default=None, editable=False, max_length=60, null=True
|
||||||
|
),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="comment",
|
||||||
|
name="text",
|
||||||
|
field=models.TextField(default=""),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="item",
|
||||||
|
name="announced",
|
||||||
|
field=models.DateTimeField(
|
||||||
|
blank=True, default=None, editable=False, null=True
|
||||||
|
),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="item",
|
||||||
|
name="description",
|
||||||
|
field=models.TextField(blank=True, default="", editable=False),
|
||||||
|
),
|
||||||
|
]
|
17
app/templates/login.html
Normal file
17
app/templates/login.html
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{% extends "base.html" %}
|
||||||
|
{% block head %}
|
||||||
|
<title>Login - {{ settings.SITENAME }}</title>
|
||||||
|
{% endblock %}
|
||||||
|
{% block content %}
|
||||||
|
<div class="login">
|
||||||
|
<form method="POST">
|
||||||
|
{% csrf_token %}
|
||||||
|
<input name="username" type="text" placeholder="your username" required></input>
|
||||||
|
<input name="password" type="password" placeholder="your password" required></input>
|
||||||
|
<div class="buttons login">
|
||||||
|
<button id="login">Login</button>
|
||||||
|
</div>
|
||||||
|
<div class="error">{{ error }}</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
10
app/templates/page.html
Normal file
10
app/templates/page.html
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{% extends "base.html" %}
|
||||||
|
{% block head %}
|
||||||
|
<title>{{ page.title }} - {{ settings.SITENAME }}</title>
|
||||||
|
{% endblock %}
|
||||||
|
{% block content %}
|
||||||
|
<div class="page">
|
||||||
|
{{ page.content|safe }}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
21
app/views.py
Normal file
21
app/views.py
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
from django.shortcuts import render
|
||||||
|
from django.http import HttpResponse
|
||||||
|
|
||||||
|
|
||||||
|
def robots_txt(request):
|
||||||
|
txt = '''User-agent: *
|
||||||
|
Disallow:
|
||||||
|
'''
|
||||||
|
return HttpResponse(txt, 'text/plain')
|
||||||
|
|
||||||
|
txt = '''User-agent: *
|
||||||
|
Disallow:
|
||||||
|
Sitemap: {}
|
||||||
|
'''.format(request.build_absolute_uri('/sitemap.xml'))
|
||||||
|
return HttpResponse(txt, 'text/plain')
|
||||||
|
|
||||||
|
|
||||||
|
def sitemap_xml(request):
|
||||||
|
sitemap = ''
|
||||||
|
return HttpResponse(sitemap, 'application/xml')
|
||||||
|
|
Loading…
Reference in a new issue