Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
flowspy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
itminedu
flowspy
Commits
c00eba1c
Commit
c00eba1c
authored
Feb 09, 2012
by
Leonidas Poulopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced simplejson imports with json
parent
e7a73512
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
flowspec/views.py
flowspec/views.py
+2
-3
poller/views.py
poller/views.py
+1
-2
No files found.
flowspec/views.py
View file @
c00eba1c
...
...
@@ -15,7 +15,6 @@ from django.shortcuts import get_object_or_404, render_to_response
from
django.core.context_processors
import
request
from
django.template.context
import
RequestContext
from
django.template.loader
import
get_template
,
render_to_string
from
django.utils
import
simplejson
from
django.core.urlresolvers
import
reverse
from
django.contrib
import
messages
from
flowspy.accounts.models
import
*
...
...
@@ -313,7 +312,7 @@ def add_rate_limit(request):
response_data
=
{}
response_data
[
'pk'
]
=
"%s"
%
then
.
pk
response_data
[
'value'
]
=
"%s:%s"
%
(
then
.
action
,
then
.
action_value
)
return
HttpResponse
(
simple
json
.
dumps
(
response_data
),
mimetype
=
'application/json'
)
return
HttpResponse
(
json
.
dumps
(
response_data
),
mimetype
=
'application/json'
)
else
:
return
render_to_response
(
'add_rate_limit.html'
,
{
'form'
:
form
,},
context_instance
=
RequestContext
(
request
))
...
...
@@ -333,7 +332,7 @@ def add_port(request):
response_data
=
{}
response_data
[
'value'
]
=
"%s"
%
port
.
pk
response_data
[
'text'
]
=
"%s"
%
port
.
port
return
HttpResponse
(
simple
json
.
dumps
(
response_data
),
mimetype
=
'application/json'
)
return
HttpResponse
(
json
.
dumps
(
response_data
),
mimetype
=
'application/json'
)
else
:
return
render_to_response
(
'add_port.html'
,
{
'form'
:
form
,},
context_instance
=
RequestContext
(
request
))
...
...
poller/views.py
View file @
c00eba1c
...
...
@@ -4,7 +4,6 @@ from gevent.pool import Pool
import
json
import
uuid
import
simplejson
import
datetime
from
django.shortcuts
import
render_to_response
from
django.template.loader
import
render_to_string
...
...
@@ -34,7 +33,7 @@ def create_message(body, user):
def
json_response
(
value
,
**
kwargs
):
kwargs
.
setdefault
(
'content_type'
,
'text/javascript; charset=UTF-8'
)
return
HttpResponse
(
simple
json
.
dumps
(
value
),
**
kwargs
)
return
HttpResponse
(
json
.
dumps
(
value
),
**
kwargs
)
class
Msgs
(
object
):
cache_size
=
500
...
...
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