HCG1 installation
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-cn">
|
||||
{% load static %}
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<!--手机html -->
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"/>
|
||||
<link rel="stylesheet" href="{% static 'popup_field/button.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'layui/css/layui.css' %}">
|
||||
{% block css %} {% endblock %}
|
||||
|
||||
<script src="{% static 'jquery/jquery-2.1.3.min.js' %}"></script>
|
||||
<script src="{% static 'layui/layui.js' %}"></script>
|
||||
</head>
|
||||
|
||||
<body style="background: white">
|
||||
<div class="layui-container" style="margin: 4px">
|
||||
<form class="layui-form" enctype="multipart/form-data" action="{% url 'post_create' %}" method="post">
|
||||
{% include 'post/form.html' %}
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn">新增</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<blockquote class="layui-elem-quote" style="margin-top: 200px">
|
||||
<a style="color: #1E9FFF" href="https://github.com/yinkh/django-popup-field"
|
||||
target="_blank">django-popup-field</a>
|
||||
is a popup field for django which can create\update\delete ForeignKey and ManyToManyField instance by popup
|
||||
windows.
|
||||
<br>
|
||||
<b>View on <a style="color: #1E9FFF" href="https://github.com/yinkh/django-popup-field"
|
||||
target="_blank">Github</a></b>
|
||||
</blockquote>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
{% block js %}{% endblock %}
|
||||
</html>
|
||||
@@ -0,0 +1,30 @@
|
||||
{% csrf_token %}
|
||||
{{ form.media }}
|
||||
{% for field in form %}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label {% if field.field.required %}required{% endif %}"
|
||||
style="text-align: left">
|
||||
{{ field.label_tag }}
|
||||
</label>
|
||||
|
||||
<div class="layui-input-block ">
|
||||
{{ field }}
|
||||
|
||||
{% if field.help_text %}
|
||||
<p class="help_text">{{ field.help_text|safe }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% if field.errors %}
|
||||
{% for error in field.errors %}
|
||||
<p style="margin-top: 6px" class="text-danger">{{ error|safe }}</p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<script>
|
||||
layui.use(['form'], function () {
|
||||
var form = layui.form
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user