Commit 6c762b86 authored by ibuler's avatar ibuler

bugfix

parent c424cad2
......@@ -842,7 +842,7 @@ def showPerm(request):
user = User.objects.get(username=username)
for asset_id in assets_del:
asset = Assets.objects.get(id=asset_id)
asset = Assets.objects.get(id=int(asset_id))
asset_user_del = AssetsUser.objects.get(uid=user, aid=asset)
asset_user_del.delete()
return HttpResponseRedirect('/showPerm/?username=%s' % username)
......@@ -1080,7 +1080,7 @@ def downFile(request):
def logView(request):
thirtyDayAgo = (datetime.datetime.now() - datetime.timedelta(30))
thirtyDayAgoStamp = int(time.mktime(thirtyDayAgo.timetuple()))
logs_all = Logs.objects.filter(start_time__gt=thirtyDayAgoStamp)
logs_all = Logs.objects.filter(start_time__gt=thirtyDayAgoStamp).order_by("-id")
paginator = Paginator(logs_all, 20)
try:
......
......@@ -28,9 +28,9 @@
<div class="form-group">
<label for="idc" class="col-sm-2 control-label">IDC<span style="color: red"> *</span></label>
<div class="col-sm-4">
<select name="idc" id="idc">
<select name="idc" id="idc" class="form-control">
{% for idc in idcs %}
<option value="{{ idc.id }}}}">{{ idc.name }}</option>
<option value="{{ idc.id }}">{{ idc.name }}</option>
{% endfor %}
</select>
</div>
......
......@@ -26,7 +26,7 @@
{% endfor %}
</tbody>
</table>
<button class="btn btn-primary">删除</button></td>
<button class="btn btn-success">删除</button></td>
</form>
{% 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