This commit is contained in:
cuom1999 2022-10-07 12:40:25 -05:00
parent 9438fa3e14
commit 5f40da64c9
5 changed files with 106 additions and 0 deletions

File diff suppressed because one or more lines are too long

View 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 = [
]

View 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'),
),
]

View 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',
),
]

View 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 %}