Commit bcc065eb authored by ibuler's avatar ibuler

[Compat] compat py3 change bootstrap form to bootstrap3

parent a320b9e0
......@@ -4,15 +4,15 @@
{% block modal_class %}modal-lg{% endblock %}
{% block modal_title%}{% trans "Accept terminal registration" %}{% endblock %}
{% block modal_body %}
{% load bootstrap %}
{% load bootstrap3 %}
<form action="{% url 'applications:terminal-modal-accept' pk="99991937" %}" method="post" class="form-horizontal" id="form_terminal_accept" enctype="multipart/form-data">
{% csrf_token %}
<p class="alert alert-danger" id="modal-error" style="display: none"></p>
{{ form.name|bootstrap_horizontal }}
{{ form.remote_addr|bootstrap_horizontal }}
{{ form.type|bootstrap_horizontal }}
{{ form.url|bootstrap_horizontal }}
{{ form.comment|bootstrap_horizontal }}
{% bootstrap_field form.name layout="horizontal" %}
{% bootstrap_field form.remote_addr layout="horizontal" %}
{% bootstrap_field form.type layout="horizontal" %}
{% bootstrap_field form.url layout="horizontal" %}
{% bootstrap_field form.comment layout="horizontal" %}
</form>
{% endblock %}
......
{% extends 'base.html' %}
{% load i18n %}
{% load static %}
{% load bootstrap %}
{% load bootstrap3 %}
{% block custom_head_css_js %}
<link href="{% static "css/plugins/select2/select2.min.css" %}" rel="stylesheet">
<script src="{% static "js/plugins/select2/select2.full.min.js" %}"></script>
......@@ -31,14 +31,14 @@
<form method="post" class="form-horizontal" action="" enctype="multipart/form-data">
{% csrf_token %}
<h3>{% trans 'Info' %}</h3>
{{ form.name|bootstrap_horizontal }}
{{ form.remote_addr|bootstrap_horizontal }}
{{ form.type|bootstrap_horizontal }}
{{ form.url|bootstrap_horizontal }}
{% bootstrap_field form.name layout="horizontal" %}
{% bootstrap_field form.remote_addr layout="horizontal" %}
{% bootstrap_field form.type layout="horizontal" %}
{% bootstrap_field form.url layout="horizontal" %}
<div class="hr-line-dashed"></div>
<h3>{% trans 'Other' %}</h3>
{{ form.comment|bootstrap_horizontal }}
{% bootstrap_field form.comment layout="horizontal" %}
<div class="hr-line-dashed"></div>
<div class="form-group">
<div class="col-sm-4 col-sm-offset-2">
......
......@@ -4,7 +4,7 @@
{% block modal_class %}modal-lg{% endblock %}
{% block modal_title%}{% trans "Update Asset" %}{% endblock %}
{% block modal_body %}
{% load bootstrap %}
{% load bootstrap3 %}
<p class="text-success text-center">{% trans "Hint: only change the field you want to update." %}</p>
<div class="ydxbd" id="ydxbd" style="display: block;">
<div>
......
......@@ -4,7 +4,7 @@
{% block modal_class %}modal-lg{% endblock %}
{% block modal_title%}{% trans "Update Asset Group" %}{% endblock %}
{% block modal_body %}
{% load bootstrap %}
{% load bootstrap3 %}
<p class="text-success text-center">{% trans "Hint: only change the field you want to update." %}</p>
<form method="post" class="form-horizontal" action="" id="fm_asset_group_bulk_update">
......
{% extends 'base.html' %}
{% load i18n %}
{% load static %}
{% load bootstrap %}
{% load bootstrap3 %}
{% block custom_head_css_js %}
<link href="{% static "css/plugins/select2/select2.min.css" %}" rel="stylesheet">
<script src="{% static "js/plugins/select2/select2.full.min.js" %}"></script>
......@@ -40,14 +40,14 @@
</div>
{% endif %}
<h3>{% trans 'Basic' %}</h3>
{{ form.name|bootstrap_horizontal }}
{{ form.username|bootstrap_horizontal }}
{{ form.protocol|bootstrap_horizontal }}
{% bootstrap_field form.name layout="horizontal" %}
{% bootstrap_field form.username layout="horizontal" %}
{% bootstrap_field form.protocol layout="horizontal" %}
<h3>{% trans 'Auth' %}</h3>
{{ form.auth_method|bootstrap_horizontal }}
{% bootstrap_field form.auth_method layout="horizontal" %}
{% block auth %}
<div class="password-auth hidden">
{{ form.password|bootstrap_horizontal }}
{% bootstrap_field form.password layout="horizontal" %}
</div>
<div class="public-key-auth">
<div class="form-group">
......@@ -57,7 +57,7 @@
</div>
</div>
<div>
{{ form.private_key_file|bootstrap_horizontal }}
{% bootstrap_field form.private_key_file layout="horizontal" %}
</div>
</div>
{% endblock %}
......@@ -68,9 +68,9 @@
</div>
</div>
<h3>{% trans 'Other' %}</h3>
{{ form.sudo|bootstrap_horizontal }}
{{ form.shell|bootstrap_horizontal }}
{{ form.comment|bootstrap_horizontal }}
{% bootstrap_field form.sudo layout="horizontal" %}
{% bootstrap_field form.shell layout="horizontal" %}
{% bootstrap_field form.comment layout="horizontal" %}
<div class="form-group">
<div class="col-sm-4 col-sm-offset-2">
<button class="btn btn-white" type="reset">{% trans 'Reset' %}</button>
......
{% extends 'base.html' %}
{% load i18n %}
{% load static %}
{% load bootstrap %}
{% load bootstrap3 %}
{% block custom_head_css_js %}
<link href="{% static "css/plugins/select2/select2.min.css" %}" rel="stylesheet">
<script src="{% static "js/plugins/select2/select2.full.min.js" %}"></script>
......@@ -34,12 +34,12 @@
{% endif %}
<form enctype="multipart/form-data" method="post" class="form-horizontal" action="" >
{% csrf_token %}
{{ form.name|bootstrap_horizontal }}
{{ form.username|bootstrap_horizontal }}
{{ form.password|bootstrap_horizontal }}
{{ form.private_key_file|bootstrap_horizontal }}
{{ form.assets|bootstrap_horizontal }}
{{ form.comment|bootstrap_horizontal }}
{% bootstrap_field form.name layout="horizontal" %}
{% bootstrap_field form.username layout="horizontal" %}
{% bootstrap_field form.password layout="horizontal" %}
{% bootstrap_field form.private_key_file layout="horizontal" %}
{% bootstrap_field form.assets layout="horizontal" %}
{% bootstrap_field form.comment layout="horizontal" %}
<div class="form-group">
<div class="col-sm-4 col-sm-offset-2">
......
{% extends '_base_create_update.html' %}
{% load static %}
{% load bootstrap %}
{% load bootstrap3 %}
{% load i18n %}
{% block form %}
......@@ -12,26 +12,26 @@
{% endif %}
{% csrf_token %}
<h3>{% trans 'Basic' %}</h3>
{{ form.hostname|bootstrap_horizontal }}
{{ form.ip|bootstrap_horizontal }}
{{ form.public_ip|bootstrap_horizontal }}
{{ form.port|bootstrap_horizontal }}
{{ form.type|bootstrap_horizontal }}
{{ form.env|bootstrap_horizontal }}
{% bootstrap_field form.hostname layout="horizontal" %}
{% bootstrap_field form.ip layout="horizontal" %}
{% bootstrap_field form.public_ip layout="horizontal" %}
{% bootstrap_field form.port layout="horizontal" %}
{% bootstrap_field form.type layout="horizontal" %}
{% bootstrap_field form.env layout="horizontal" %}
<div class="hr-line-dashed"></div>
<h3>{% trans 'Group' %}</h3>
{{ form.idc|bootstrap_horizontal }}
{{ form.groups|bootstrap_horizontal }}
{% bootstrap_field form.idc layout="horizontal" %}
{% bootstrap_field form.groups layout="horizontal" %}
<div class="hr-line-dashed"></div>
<h3>{% trans 'Asset user' %}</h3>
{{ form.admin_user|bootstrap_horizontal }}
{% bootstrap_field form.admin_user layout="horizontal" %}
<div class="hr-line-dashed"></div>
<h3>{% trans 'Other' %}</h3>
{{ form.comment|bootstrap_horizontal }}
{{ form.is_active|bootstrap_horizontal }}
{% bootstrap_field form.comment layout="horizontal" %}
{% bootstrap_field form.is_active layout="horizontal" %}
<div class="hr-line-dashed"></div>
......
......@@ -2,7 +2,6 @@
{% load i18n %}
{% load static %}
{% load bootstrap3 %}
{#{% load bootstrap %}#}
{% block custom_head_css_js %}
<link href="{% static 'css/plugins/select2/select2.min.css' %}" rel="stylesheet">
<script src="{% static 'js/plugins/select2/select2.full.min.js' %}"></script>
......@@ -35,15 +34,13 @@
<form id="groupForm" method="post" class="form-horizontal">
{% csrf_token %}
<h3 class="widget-head-color-box">资产组信息</h3>
{% bootstrap_field form.name layout="horizontal" %}
{% bootstrap_field form.comment layout="horizontal" %}
{# {{ form.name|bootstrap_horizontal }}#}
{# {{ form.comment|bootstrap_horizontal }}#}
{% bootstrap_field form.name layout="horizontal" %}
{% bootstrap_field form.comment layout="horizontal" %}
<div class="hr-line-dashed"></div>
<h3 class="widget-head-color-box">用户选择的资产</h3>
<div class="form-group">
<label class="col-sm-3 control-label" id="asset_on_count">已选({{ assets_count }})</label>
<div class="col-sm-8" id="asset_sed">
<label class="col-sm-2 control-label" id="asset_on_count">已选({{ assets_count }})</label>
<div class="col-sm-9" id="asset_sed">
<div class="form-asset-on" id="add_asset">
<p id="asset_on_p">
{% for asset in assets_on_list %}
......@@ -54,8 +51,6 @@
</div>
</div>
<div class="hr-line-dashed"></div>
{# <h3 class="widget-head-color-box">资产用户</h3>#}
{# {{ form.system_users|bootstrap_horizontal }}#}
<div class="form-group">
<div class="col-sm-4 col-sm-offset-5">
<button class="btn btn-white" type="reset"> 重置 </button>
......
{% extends '_base_create_update.html' %}
{% load static %}
{% load bootstrap %}
{% load bootstrap3 %}
{% load i18n %}
{% block form %}
<div style="display:none" id="ridd">
{{ form.port|bootstrap_horizontal }}
{{ form.type|bootstrap_horizontal }}
{{ form.idc|bootstrap_horizontal }}
{{ form.groups|bootstrap_horizontal }}
{{ form.admin_user|bootstrap_horizontal }}
{{ form.system_users|bootstrap_horizontal }}
{{ form.brand|bootstrap_horizontal }}
{{ form.cpu|bootstrap_horizontal }}
{{ form.memory|bootstrap_horizontal }}
{{ form.disk|bootstrap_horizontal }}
{{ form.os|bootstrap_horizontal }}
{{ form.cabinet_no|bootstrap_horizontal }}
{{ form.cabinet_pos|bootstrap_horizontal }}
{{ form.status|bootstrap_horizontal }}
{{ form.env|bootstrap_horizontal }}
{{ form.tags|bootstrap_horizontal }}
{{ form.comment|bootstrap_horizontal }}
{% bootstrap_field form.port layout="horizontal" %}
{% bootstrap_field form.type layout="horizontal" %}
{% bootstrap_field form.idc layout="horizontal" %}
{% bootstrap_field form.groups layout="horizontal" %}
{% bootstrap_field form.admin_user layout="horizontal" %}
{% bootstrap_field form.system_users layout="horizontal" %}
{% bootstrap_field form.brand layout="horizontal" %}
{% bootstrap_field form.cpu layout="horizontal" %}
{% bootstrap_field form.memory layout="horizontal" %}
{% bootstrap_field form.disk layout="horizontal" %}
{% bootstrap_field form.os layout="horizontal" %}
{% bootstrap_field form.cabinet_no layout="horizontal" %}
{% bootstrap_field form.cabinet_pos layout="horizontal" %}
{% bootstrap_field form.status layout="horizontal" %}
{% bootstrap_field form.env layout="horizontal" %}
{% bootstrap_field form.tags layout="horizontal" %}
{% bootstrap_field form.comment layout="horizontal" %}
</div>
<div class="hr-line-dashed"></div>
<form action="" class="form-horizontal">
......
{% extends '_base_create_update.html' %}
{% load static %}
{% load bootstrap %}
{% load bootstrap3 %}
{% load i18n %}
{% block custom_head_css_js_create %}
......@@ -17,37 +17,37 @@
{% endif %}
{% csrf_token %}
<h3>{% trans 'Basic' %}</h3>
{{ form.hostname|bootstrap_horizontal }}
{{ form.ip|bootstrap_horizontal }}
{{ form.public_ip|bootstrap_horizontal }}
{{ form.port|bootstrap_horizontal }}
{{ form.type|bootstrap_horizontal }}
{% bootstrap_field form.hostname layout="horizontal" %}
{% bootstrap_field form.ip layout="horizontal" %}
{% bootstrap_field form.public_ip layout="horizontal" %}
{% bootstrap_field form.port layout="horizontal" %}
{% bootstrap_field form.type layout="horizontal" %}
<div class="hr-line-dashed"></div>
<h3>{% trans 'Group' %}</h3>
{{ form.idc|bootstrap_horizontal }}
{{ form.groups|bootstrap_horizontal }}
{% bootstrap_field form.idc layout="horizontal" %}
{% bootstrap_field form.groups layout="horizontal" %}
<div class="hr-line-dashed"></div>
<h3>{% trans 'Asset user' %}</h3>
{{ form.admin_user|bootstrap_horizontal }}
{% bootstrap_field form.admin_user layout="horizontal" %}
<div class="hr-line-dashed"></div>
<h3>{% trans 'Configuration' %}</h3>
{{ form.number|bootstrap_horizontal }}
{{ form.remote_card_ip|bootstrap_horizontal }}
{% bootstrap_field form.number layout="horizontal" %}
{% bootstrap_field form.remote_card_ip layout="horizontal" %}
<div class="hr-line-dashed"></div>
<h3>{% trans 'Location' %}</h3>
{{ form.cabinet_no|bootstrap_horizontal }}
{{ form.cabinet_pos|bootstrap_horizontal }}
{% bootstrap_field form.cabinet_no layout="horizontal" %}
{% bootstrap_field form.cabinet_pos layout="horizontal" %}
<div class="hr-line-dashed"></div>
<h3>{% trans 'Other' %}</h3>
{{ form.status|bootstrap_horizontal }}
{{ form.env|bootstrap_horizontal }}
{{ form.comment|bootstrap_horizontal }}
{{ form.is_active|bootstrap_horizontal }}
{% bootstrap_field form.status layout="horizontal" %}
{% bootstrap_field form.env layout="horizontal" %}
{% bootstrap_field form.comment layout="horizontal" %}
{% bootstrap_field form.is_active layout="horizontal" %}
<div class="hr-line-dashed"></div>
<div class="form-group">
......
{% extends 'base.html' %}
{% load i18n %}
{% load static %}
{% load bootstrap %}
{% load bootstrap3 %}
{% block custom_head_css_js %}
<link href="{% static "css/plugins/select2/select2.min.css" %}" rel="stylesheet">
<script src="{% static "js/plugins/select2/select2.full.min.js" %}"></script>
......@@ -34,16 +34,16 @@
<form id="IDCForm" method="post" class="form-horizontal">
{% csrf_token %}
<h3 class="widget-head-color-box">基本信息</h3>
{{ form.name|bootstrap_horizontal }}
{{ form.address|bootstrap_horizontal }}
{{ form.contact|bootstrap_horizontal }}
{{ form.phone|bootstrap_horizontal }}
{% bootstrap_field form.name layout="horizontal" %}
{% bootstrap_field form.address layout="horizontal" %}
{% bootstrap_field form.contact layout="horizontal" %}
{% bootstrap_field form.phone layout="horizontal" %}
<div class="hr-line-dashed"></div>
<h3 class="widget-head-color-box">IP段</h3>
{{ form.operator|bootstrap_horizontal }}
{{ form.intranet|bootstrap_horizontal }}
{{ form.extranet|bootstrap_horizontal }}
{% bootstrap_field form.operator layout="horizontal" %}
{% bootstrap_field form.intranet layout="horizontal" %}
{% bootstrap_field form.extranet layout="horizontal" %}
<div class="hr-line-dashed"></div>
<div class="form-group">
......
{% extends 'assets/_system_user.html' %}
{% load i18n %}
{% load static %}
{% load bootstrap %}
{% load bootstrap3 %}
{% block auth %}
<div class="password-auth hidden">
{{ form.password|bootstrap_horizontal }}
{% bootstrap_field form.password layout="horizontal" %}
</div>
<div class="public-key-auth">
<div>
{{ form.private_key_file|bootstrap_horizontal }}
{% bootstrap_field form.private_key_file layout="horizontal" %}
</div>
</div>
{% endblock %}
# ~*~ coding: utf-8 ~*~
#
from __future__ import unicode_literals
import requests
import ipaddress
......@@ -10,7 +9,7 @@ from .models import LoginLog
def validate_ip(ip):
try:
ipaddress.ip_address(ip.decode('utf-8'))
ipaddress.ip_address(ip)
return True
except ValueError:
print('valid error')
......@@ -35,7 +34,6 @@ def get_ip_city(ip, timeout=10):
url = 'http://int.dpool.sina.com.cn/iplookup/iplookup.php?ip=%s&format=json' % ip
try:
r = requests.get(url, timeout=timeout)
print(r)
except requests.Timeout:
r = None
city = 'Unknown'
......
......@@ -59,7 +59,6 @@ INSTALLED_APPS = [
'common.apps.CommonConfig',
'applications.apps.ApplicationsConfig',
'rest_framework',
'bootstrapform',
'bootstrap3',
'captcha',
'django.contrib.auth',
......@@ -334,3 +333,13 @@ CAPTCHA_TEST_MODE = CONFIG.CAPTCHA_TEST_MODE
COMMAND_STORE_BACKEND = 'audits.backends.command.db'
RECORD_STORE_BACKEND = 'audits.backends.record.db'
# Django bootstrap3 setting, more see http://django-bootstrap3.readthedocs.io/en/latest/settings.html
BOOTSTRAP3 = {
'horizontal_label_class': 'col-md-2',
# Field class to use in horizontal forms
'horizontal_field_class': 'col-md-9',
# Set placeholder attributes to label if no placeholder is provided
'set_placeholder': True,
}
\ No newline at end of file
{% extends 'base.html' %}
{% load i18n %}
{% load static %}
{% load bootstrap %}
{% load bootstrap3 %}
{% block custom_head_css_js %}
<link href="{% static "css/plugins/select2/select2.min.css" %}" rel="stylesheet">
<script src="{% static "js/plugins/select2/select2.full.min.js" %}"></script>
......@@ -31,15 +31,15 @@
<form method="post" class="form-horizontal" action="" >
{% csrf_token %}
<h3>{% trans 'Name' %}</h3>
{{ form.name|bootstrap_horizontal }}
{% bootstrap_field form.name layout="horizontal" %}
<div class="hr-line-dashed"></div>
<h3>{% trans 'User' %}</h3>
{{ form.users|bootstrap_horizontal }}
{{ form.user_groups|bootstrap_horizontal }}
{% bootstrap_field form.users layout="horizontal" %}
{% bootstrap_field form.user_groups layout="horizontal" %}
<div class="hr-line-dashed"></div>
<h3>{% trans 'Asset' %}</h3>
{{ form.assets|bootstrap_horizontal|safe }}
{{ form.asset_groups|bootstrap_horizontal }}
{% bootstrap_field form.asset_groups layout="horizontal" %}
{{ form.system_users |bootstrap_horizontal }}
<div class="hr-line-dashed"></div>
<h3>{% trans 'Other' %}</h3>
......@@ -60,7 +60,7 @@
<span class="help-block ">{{ form.date_expired.errors }}</span>
</div>
</div>
{{ form.comment|bootstrap_horizontal }}
{% bootstrap_field form.comment layout="horizontal" %}
<div class="form-group">
<div class="col-sm-4 col-sm-offset-2">
......
{% extends '_base_create_update.html' %}
{% load i18n %}
{% load static %}
{% load bootstrap %}
{% load bootstrap3 %}
{% block form %}
{% if form.non_field_errors %}
<div class="alert alert-danger">
......@@ -11,17 +11,17 @@
<form method="post" class="form-horizontal" action="" enctype="multipart/form-data">
{% csrf_token %}
<h3>{% trans 'Account' %}</h3>
{{ form.username|bootstrap_horizontal }}
{{ form.name|bootstrap_horizontal }}
{{ form.email|bootstrap_horizontal }}
{{ form.groups|bootstrap_horizontal }}
{% bootstrap_field form.username layout="horizontal" %}
{% bootstrap_field form.name layout="horizontal" %}
{% bootstrap_field form.email layout="horizontal" %}
{% bootstrap_field form.groups layout="horizontal" %}
<div class="hr-line-dashed"></div>
{% block password %} {% endblock %}
<div class="hr-line-dashed"></div>
<h3>{% trans 'Security and Role' %}</h3>
{{ form.role|bootstrap_horizontal }}
{% bootstrap_field form.role layout="horizontal" %}
<div class="form-group {% if form.date_expired.errors %} has-error {% endif %}" id="date_5">
<label for="{{ form.date_expired.id_for_label }}" class="col-sm-2 control-label">{{ form.date_expired.label }}</label>
<div class="col-sm-9">
......@@ -40,9 +40,9 @@
</div>
<div class="hr-line-dashed"></div>
<h3>{% trans 'Profile' %}</h3>
{{ form.phone|bootstrap_horizontal }}
{{ form.wechat|bootstrap_horizontal }}
{{ form.comment|bootstrap_horizontal }}
{% bootstrap_field form.phone layout="horizontal" %}
{% bootstrap_field form.wechat layout="horizontal" %}
{% bootstrap_field form.comment layout="horizontal" %}
<div class="hr-line-dashed"></div>
<div class="form-group">
<div class="col-sm-4 col-sm-offset-2">
......
{% extends 'base.html' %}
{% load static %}
{% load i18n %}
{% load bootstrap %}
{% load bootstrap3 %}
{% block custom_head_css_js %}
......
{% extends 'base.html' %}
{% load static %}
{% load i18n %}
{% load bootstrap %}
{% load bootstrap3 %}
{% block custom_head_css_js %}
......
{% extends 'base.html' %}
{% load bootstrap %}
{% load bootstrap3 %}
{% load static %}
{% load i18n %}
......
{% extends 'users/_user.html' %}
{% load i18n %}
{% load bootstrap %}
{% load bootstrap3 %}
{% block user_template_title %}{% trans "Create user" %}{% endblock %}
{#{% block username %}#}
{# {{ form.username|bootstrap_horizontal }}#}
{# {% bootstrap_field form.username layout="horizontal" %}#}
{#{% endblock %}#}
{% block password %}
<h3>{% trans 'Password' %}</h3>
......
{% extends 'base.html' %}
{% load bootstrap %}
{% load bootstrap3 %}
{% load static %}
{% load i18n %}
......
{% extends 'base.html' %}
{% load bootstrap %}
{% load bootstrap3 %}
{% load static %}
{% load i18n %}
......
{% extends 'base.html' %}
{% load static %}
{% load i18n %}
{% load bootstrap %}
{% load bootstrap3 %}
{% block custom_head_css_js %}
<link href="{% static "css/plugins/select2/select2.min.css" %}" rel="stylesheet">
<script src="{% static "js/plugins/select2/select2.full.min.js" %}"></script>
......@@ -23,7 +23,7 @@
{% endif %}
<form method="post" class="form-horizontal" action="" >
{% csrf_token %}
{{ form.name|bootstrap_horizontal }}
{% bootstrap_field form.name layout="horizontal" %}
<div class="form-group">
<label for="users" class="col-sm-2 control-label">{% trans 'Users' %}</label>
<div class="col-sm-9">
......@@ -38,7 +38,7 @@
</select>
</div>
</div>
{{ form.comment|bootstrap_horizontal }}
{% bootstrap_field form.comment layout="horizontal" %}
<div class="form-group">
<div class="col-sm-4 col-sm-offset-2">
<button class="btn btn-white" type="reset">{% trans 'Cancel' %}</button>
......
{% extends 'base.html' %}
{% load bootstrap %}
{% load bootstrap3 %}
{% load static %}
{% load i18n %}
......
{% extends 'base.html' %}
{% load static %}
{% load i18n %}
{% load bootstrap %}
{% load bootstrap3 %}
{% block custom_head_css_js %}
<link href="{% static "css/plugins/cropper/cropper.min.css" %}" rel="stylesheet">
......@@ -48,9 +48,9 @@
<div class="wrapper wrapper-content animated fadeInRight">
<form method="post" class="form-horizontal" action="" enctype="multipart/form-data">
{% csrf_token %}
{{ form.old_password|bootstrap_horizontal}}
{{ form.new_password|bootstrap_horizontal }}
{{ form.confirm_password|bootstrap_horizontal }}
{% bootstrap_field form.old_password layout="horizontal" %}
{% bootstrap_field form.new_password layout="horizontal" %}
{% bootstrap_field form.confirm_password layout="horizontal" %}
<div class="hr-line-dashed"></div>
<div class="form-group">
......
{% extends 'base.html' %}
{% load static %}
{% load i18n %}
{% load bootstrap %}
{% load bootstrap3 %}
{% block custom_head_css_js %}
<link href="{% static "css/plugins/cropper/cropper.min.css" %}" rel="stylesheet">
......@@ -49,14 +49,14 @@
<form method="post" class="form-horizontal" action="" enctype="multipart/form-data">
{% csrf_token %}
<h3>{% trans 'Account' %}</h3>
{{ form.username|bootstrap_horizontal }}
{{ form.name|bootstrap_horizontal }}
{{ form.email|bootstrap_horizontal }}
{% bootstrap_field form.username layout="horizontal" %}
{% bootstrap_field form.name layout="horizontal" %}
{% bootstrap_field form.email layout="horizontal" %}
<div class="hr-line-dashed"></div>
<h3>{% trans 'Profile' %}</h3>
{{ form.phone|bootstrap_horizontal }}
{{ form.wechat|bootstrap_horizontal }}
{% bootstrap_field form.phone layout="horizontal" %}
{% bootstrap_field form.wechat layout="horizontal" %}
<div class="hr-line-dashed"></div>
<div class="form-group">
<div class="col-sm-4 col-sm-offset-2">
......
{% extends 'base.html' %}
{% load static %}
{% load i18n %}
{% load bootstrap %}
{% load bootstrap3 %}
{% block custom_head_css_js %}
<link href="{% static "css/plugins/cropper/cropper.min.css" %}" rel="stylesheet">
......@@ -62,7 +62,7 @@
</div>
</div>
<h3>{% trans 'Update public key' %}</h3>
{{ form.public_key|bootstrap_horizontal}}
{% bootstrap_field form.public_key layout="horizontal" %}
<div class="hr-line-dashed"></div>
<div class="form-group">
<div class="col-sm-4 col-sm-offset-2">
......
Django==1.10
django-bootstrap-form==3.2.1
logging==0.4.9.6
Pillow==4.0.0
djangorestframework==3.5.3
ForgeryPy==0.1
Django
django-bootstrap3
Pillow
djangorestframework
ForgeryPy
openpyxl==2.4.0
celery==3.1.23
paramiko==2.1.1
ansible==2.2.2.0
django-simple-captcha==0.5.2
django-formtools==1.0
sshpubkeys==2.2.0
djangorestframework-bulk==0.2.1
django-redis-cache==1.7.1
requests==2.11.1
itsdangerous==0.24
#python-gssapi==0.6.4
tornado==4.4.2
eventlet==0.20.1
django-filter==1.0.0
passlib==1.7.1
celery
paramiko
ansible
django-simple-captcha
django-formtools
sshpubkeys
djangorestframework-bulk
django-redis-cache
requests
itsdangerous
eventlet
django-filter
passlib
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment