Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
protokollsystem
proto3
Commits
3aa5cf16
Commit
3aa5cf16
authored
Mar 04, 2017
by
Administrator
Browse files
Compatibility to python 3.5
parent
76cd4c23
Changes
3
Hide whitespace changes
Inline
Side-by-side
server.py
View file @
3aa5cf16
...
...
@@ -1223,7 +1223,7 @@ def make_scheduler():
def
uwsgi_timer
(
signum
):
if
signum
==
0
:
check_and_send_reminders
()
except
ModuleNotFound
Error
:
except
Import
Error
:
print
(
"uwsgi not found, falling back to apscheduler for cron-like tasks"
)
def
make_scheduler
(
app
,
config
,
function
):
scheduler
=
BackgroundScheduler
()
...
...
utils.py
View file @
3aa5cf16
...
...
@@ -176,7 +176,6 @@ def check_ip_in_networks(networks_string):
address
=
ipaddress
.
ip_address
(
request
.
remote_addr
)
if
address
==
ipaddress
.
ip_address
(
"127.0.0.1"
)
and
"X-Real-Ip"
in
request
.
headers
:
address
=
ipaddress
.
ip_address
(
request
.
headers
[
"X-Real-Ip"
])
print
(
address
)
try
:
for
network_string
in
networks_string
.
split
(
","
):
network
=
ipaddress
.
ip_network
(
network_string
.
strip
())
...
...
views/forms.py
View file @
3aa5cf16
...
...
@@ -69,13 +69,11 @@ class IPNetworkField(Field):
def
_value
(
self
):
if
self
.
raw_data
:
print
(
"raw_data in _value"
,
self
.
raw_data
)
return
" "
.
join
(
self
.
raw_data
)
else
:
return
self
.
data
and
str
(
self
.
data
)
or
""
def
process_formdata
(
self
,
valuelist
):
print
(
"valuelist in process_formdata"
,
valuelist
)
if
valuelist
:
data_str
=
valuelist
[
0
]
result_parts
=
[]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment