Revert to 9438fa3e14
This commit is contained in:
parent
9438fa3e14
commit
5f40da64c9
5 changed files with 106 additions and 0 deletions
18
judge/migrations/0132_auto_20220915_1837.py
Normal file
18
judge/migrations/0132_auto_20220915_1837.py
Normal file
File diff suppressed because one or more lines are too long
14
judge/migrations/0133_merge_20220916_0636.py
Normal file
14
judge/migrations/0133_merge_20220916_0636.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Generated by Django 2.2.28 on 2022-09-15 23:36
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('judge', '0132_auto_20220915_1837'),
|
||||
('judge', '0132_auto_20220915_1349'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
]
|
18
judge/migrations/0134_blogpost_is_delete.py
Normal file
18
judge/migrations/0134_blogpost_is_delete.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 2.2.28 on 2022-10-06 16:08
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('judge', '0133_merge_20220916_0636'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='blogpost',
|
||||
name='is_delete',
|
||||
field=models.BooleanField(default=False, verbose_name='is delete'),
|
||||
),
|
||||
]
|
17
judge/migrations/0135_remove_blogpost_is_delete.py
Normal file
17
judge/migrations/0135_remove_blogpost_is_delete.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Generated by Django 2.2.28 on 2022-10-06 17:03
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('judge', '0134_blogpost_is_delete'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='blogpost',
|
||||
name='is_delete',
|
||||
),
|
||||
]
|
39
templates/organization/blog/edit.html
Normal file
39
templates/organization/blog/edit.html
Normal file
|
@ -0,0 +1,39 @@
|
|||
{% extends "organization/home-base.html" %}
|
||||
|
||||
{% block three_col_js %}
|
||||
{{ form.media.js }}
|
||||
{% include "organization/home-js.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block three_col_media %}
|
||||
{{ form.media.css }}
|
||||
{% endblock %}
|
||||
|
||||
{% block middle_content %}
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
{% if form.errors %}
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<a href="#" class="close">x</a>
|
||||
{{ form.non_field_errors() }}
|
||||
{{ form.errors }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% for field in form %}
|
||||
{% if not field.is_hidden %}
|
||||
<div style="margin-bottom: 1em;">
|
||||
{{ field.errors }}
|
||||
<label for="{{field.id_for_label }}"><b>{{ field.label }}{% if field.field.required %}<span style="color:red"> * </span>{% endif %}:</b> </label>
|
||||
<div class="org-field-wrapper" id="org-field-wrapper-{{field.html_name }}">
|
||||
{{ field }}
|
||||
</div>
|
||||
{% if field.help_text %}
|
||||
<i style="display: block">{{ field.help_text|safe }}</i>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<button type="submit" style="display: inline;" name="action" value="Save" >{{ _('Save') }} </button>
|
||||
<button type="submit" style="background-color: red; float: right;" name="action" value="Delete" > {{ _('Delete') }} </button>
|
||||
</form>
|
||||
{% endblock %}
|
Loading…
Reference in a new issue