Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
df34da69
authored
Oct 04, 2017
by
Czémán Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard, requests: eleminate more RequestContexts
parent
98e0ef2b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
9 deletions
+8
-9
circle/dashboard/views/node.py
+6
-4
circle/dashboard/views/store.py
+1
-2
circle/request/forms.py
+1
-3
No files found.
circle/dashboard/views/node.py
View file @
df34da69
...
...
@@ -27,7 +27,6 @@ from django.db.models import Count
from
django.forms.models
import
inlineformset_factory
from
django.http
import
HttpResponse
from
django.shortcuts
import
redirect
from
django.template
import
RequestContext
from
django.template.loader
import
render_to_string
from
django.utils.translation
import
ugettext
as
_
from
django.views.generic
import
DetailView
,
TemplateView
,
View
...
...
@@ -330,9 +329,12 @@ class NodeActivityView(LoginRequiredMixin, SuperuserRequiredMixin, View):
response
=
{
'activities'
:
render_to_string
(
"dashboard/node-detail/_activity-timeline.html"
,
RequestContext
(
request
,
{
'activities'
:
activities
,
'show_show_all'
:
show_show_all
}
)
.
flatten
())
{
'activities'
:
activities
,
'show_show_all'
:
show_show_all
},
request
)
}
return
HttpResponse
(
...
...
circle/dashboard/views/store.py
View file @
df34da69
...
...
@@ -29,7 +29,6 @@ from django.core.exceptions import SuspiciousOperation
from
django.core.urlresolvers
import
reverse
from
django.http
import
HttpResponse
from
django.shortcuts
import
redirect
,
render_to_response
,
render
from
django.template
import
RequestContext
from
django.utils.translation
import
ugettext
as
_
from
django.views.decorators.http
import
require_GET
,
require_POST
from
django.views.generic
import
TemplateView
...
...
@@ -65,7 +64,7 @@ class StoreList(LoginRequiredMixin, TemplateView):
context
=
self
.
get_context_data
(
**
kwargs
)
return
render_to_response
(
"dashboard/store/_list-box.html"
,
RequestContext
(
self
.
request
,
context
)
.
flatten
(),
context
,
self
.
request
)
else
:
return
super
(
StoreList
,
self
)
.
get
(
*
args
,
**
kwargs
)
...
...
circle/request/forms.py
View file @
df34da69
...
...
@@ -19,7 +19,6 @@ from django.forms import (
Textarea
,
ValidationError
)
from
django.utils.translation
import
ugettext_lazy
as
_
from
django.template
import
RequestContext
from
django.template.loader
import
render_to_string
from
sizefield.widgets
import
FileSizeWidget
...
...
@@ -68,8 +67,7 @@ class InitialFromFileMixin(object):
super
(
InitialFromFileMixin
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
self
.
initial
[
'message'
]
=
render_to_string
(
self
.
initial_template
,
RequestContext
(
request
,
{})
.
flatten
(),
self
.
initial_template
,
{},
request
)
def
clean_message
(
self
):
...
...
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