Commit 98d6043f authored by ibuler's avatar ibuler

merged

parent 3bf0d4aa
# ~*~ coding: utf-8 ~*~ # ~*~ coding: utf-8 ~*~
from django import template from django import template
from django.utils import timezone from django.utils import timezone
register = template.Library() register = template.Library()
@register.filter @register.filter
def join_queryset_attr(queryset, attr, delimiter=', '): def join_queryset_attr(queryset, attr, delimiter=', '):
return delimiter.join([getattr(obj, attr, '') for obj in queryset]) return delimiter.join([getattr(obj, attr, '') for obj in queryset])
@register.filter @register.filter
def is_expired(datetime): def is_expired(datetime):
if datetime > timezone.now(): if datetime > timezone.now():
return False return False
else: else:
return True return True
# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-08-16 14:52
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0004_auto_20160815_2257'),
]
operations = [
migrations.AlterField(
model_name='user',
name='comment',
field=models.TextField(blank=True, max_length=200, verbose_name='\u63cf\u8ff0'),
),
]
{% extends 'users/_user.html' %} {% extends 'users/_user.html' %}
{% block password %} {% block password %}
<h3>密码</h3> <h3>密码</h3>
<div class="form-group"> <div class="form-group">
<label for="password" class="col-sm-2 control-label">密码</label> <label for="password" class="col-sm-2 control-label">密码</label>
<div class="col-sm-9 controls" > <div class="col-sm-9 controls" >
<input id="password" name="password" type="password" class="form-control"> <input id="password" name="password" type="password" class="form-control">
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
\ No newline at end of file
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