fix some minor issues found by pycharm code checker
This commit is contained in:
parent
271666876d
commit
758a38f95e
@ -19,6 +19,7 @@ Other changes:
|
|||||||
# alternatively:
|
# alternatively:
|
||||||
from nsupdate.settings.prod import * # for production
|
from nsupdate.settings.prod import * # for production
|
||||||
# after that, override whatever you need to override.
|
# after that, override whatever you need to override.
|
||||||
|
|
||||||
* improved docs about a sane settings setup
|
* improved docs about a sane settings setup
|
||||||
* document postgreSQL setup
|
* document postgreSQL setup
|
||||||
* also support Python 2.6.x
|
* also support Python 2.6.x
|
||||||
|
@ -38,14 +38,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function now_str() {
|
function now_str() {
|
||||||
dt = new Date();
|
var dt = new Date();
|
||||||
return format_dt(dt);
|
return format_dt(dt);
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkIP() {
|
function checkIP() {
|
||||||
$.get("{% url 'myip' %}")
|
$.get("{% url 'myip' %}")
|
||||||
.done(function( data ) {
|
.done(function( data ) {
|
||||||
ip = data;
|
var ip = data;
|
||||||
$('#myip').text(ip);
|
$('#myip').text(ip);
|
||||||
$('#myip_timestamp').text(now_str());
|
$('#myip_timestamp').text(now_str());
|
||||||
if(ip != last_ip) {
|
if(ip != last_ip) {
|
||||||
|
@ -463,6 +463,7 @@ def csrf_failure_view(request, reason):
|
|||||||
Django's CSRF middleware's builtin view doesn't tell the user that he needs to have cookies enabled.
|
Django's CSRF middleware's builtin view doesn't tell the user that he needs to have cookies enabled.
|
||||||
|
|
||||||
:param request: django request object
|
:param request: django request object
|
||||||
|
:param reason: why the csrf check failed
|
||||||
:return: HttpResponse object
|
:return: HttpResponse object
|
||||||
"""
|
"""
|
||||||
if reason == "CSRF cookie not set.":
|
if reason == "CSRF cookie not set.":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user