Please enable JavaScript to use RhodeCode Enterprise
##// END OF EJS Templates
neko259
- Sun, 04 Jan 2015 20:16:08
Show More
boards/views/all_threads.py
0
+1
-1
@@
-33,7
+33,7
b' class AllThreadsView(PostMixin, BaseBoar'
33
33
super ( AllThreadsView , self ) . __init__ ()
34
34
35
35
def get ( self , request , page = DEFAULT_PAGE , form = None ):
36
params = dict ()
36
params = self . get_context_data ( request = request )
37
37
38
38
if not form :
39
39
form = ThreadForm ( error_class = PlainErrorList )
boards/views/base.py
0
+1
-9
@@
-14,15
+14,7
b" CONTEXT_FORM = 'form'"
14
14
class BaseBoardView ( View ):
15
15
16
16
def get_context_data ( self , ** kwargs ):
17
"""
18
This method is deprecated. You need to use dicts instead of context
19
instances in all places it is used now.
20
"""
21
22
request = kwargs [ 'request' ]
23
context = RequestContext ( request )
24
25
return context
17
return dict ()
26
18
27
19
@transaction . atomic
28
20
def _ban_current_user ( self , request ):
boards/views/not_found.py
0
+2
-3
@@
-9,10
+9,9
b' class NotFoundView(BaseBoardView):'
9
9
"""
10
10
11
11
def get ( self , request ):
12
context = self . get_context_data ( request=request)
12
params = self . get_context_data ()
13
13
14
# TODO Use dict here
15
response = render ( request , 'boards/404.html' , context_instance = context )
14
response = render ( request , 'boards/404.html' , params )
16
15
response . status_code = 404
17
16
18
17
return response
boards/views/settings.py
0
+4
-4
@@
-13,7
+13,7
b" CONTEXT_HIDDEN_TAGS = 'hidden_tags'"
13
13
class SettingsView ( BaseBoardView ):
14
14
15
15
def get ( self , request ):
16
context = self . get_context_data ( request=request)
16
params = self . get_context_data ()
17
17
settings_manager = get_settings_manager ( request )
18
18
19
19
selected_theme = settings_manager . get_theme ()
@@
-21,11
+21,11
b' class SettingsView(BaseBoardView):'
21
21
form = SettingsForm ( initial = { FORM_THEME : selected_theme },
22
22
error_class = PlainErrorList )
23
23
24
context[ CONTEXT_FORM ] = form
25
context[ CONTEXT_HIDDEN_TAGS ] = settings_manager . get_hidden_tags ()
24
params [ CONTEXT_FORM ] = form
25
params [ CONTEXT_HIDDEN_TAGS ] = settings_manager . get_hidden_tags ()
26
26
27
27
# TODO Use dict here
28
return render ( request , 'boards/settings.html' , context_instance=context)
28
return render ( request , 'boards/settings.html' , params )
29
29
30
30
def post ( self , request ):
31
31
settings_manager = get_settings_manager ( request )
boards/views/static.py
0
+1
-5
@@
-10,8
+10,4
b' class StaticPageView(BaseBoardView):'
10
10
Show a static page that needs only tags list and a CSS
11
11
"""
12
12
13
context = self . get_context_data ( request = request )
14
15
# TODO Use dict here
16
return render ( request , 'boards/staticpages/' + name + '.html' ,
17
context_instance = context )
13
return render ( request , 'boards/staticpages/' + name + '.html' )
boards/views/tag_threads.py
0
+5
-5
@@
-23,17
+23,17
b' class TagView(AllThreadsView, Dispatcher'
23
23
return tag . get_threads ()
24
24
25
25
def get_context_data ( self , ** kwargs ):
26
context = super ( TagView , self ) . get_context_data ( ** kwargs )
26
params = super ( TagView , self ) . get_context_data ( ** kwargs )
27
27
28
28
settings_manager = get_settings_manager ( kwargs [ 'request' ])
29
29
30
30
tag = get_object_or_404 ( Tag , name = self . tag_name )
31
context[ PARAM_TAG ] = tag
31
params [ PARAM_TAG ] = tag
32
32
33
context[ PARAM_FAV_TAGS ] = settings_manager . get_fav_tags ()
34
context[ PARAM_HIDDEN_TAGS ] = settings_manager . get_hidden_tags ()
33
params [ PARAM_FAV_TAGS ] = settings_manager . get_fav_tags ()
34
params [ PARAM_HIDDEN_TAGS ] = settings_manager . get_hidden_tags ()
35
35
36
return context
36
return params
37
37
38
38
def get ( self , request , tag_name , page = DEFAULT_PAGE , form = None ):
39
39
self . tag_name = tag_name
Site-wide shortcuts
/
Use quick search box
g h
Goto home page
g g
Goto my private gists page
g G
Goto my public gists page
g 0-9
Goto bookmarked items from 0-9
n r
New repository page
n g
New gist page
Repositories
g s
Goto summary page
g c
Goto changelog page
g f
Goto files page
g F
Goto files page with file search activated
g p
Goto pull requests page
g o
Goto repository settings
g O
Goto repository access permissions settings
t s
Toggle sidebar on some pages