File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 1
1
"""Project URLS for public users."""
2
2
3
3
from django .conf .urls import url
4
+ from django .views .generic .base import RedirectView
4
5
5
6
from readthedocs .builds import views as build_views
6
7
from readthedocs .constants import pattern_opts
10
11
11
12
12
13
urlpatterns = [
14
+ url (
15
+ r'^$' ,
16
+ RedirectView .as_view (pattern_name = 'projects_dashboard' , permanent = True ),
17
+ name = 'projects_dashboard_redirect' ,
18
+ ),
13
19
url (
14
20
r'^(?P<invalid_project_slug>{project_slug}_{project_slug})/' .format (** pattern_opts ),
15
21
public .project_redirect ,
Original file line number Diff line number Diff line change @@ -177,12 +177,14 @@ def setUp(self):
177
177
class PublicProjectMixin (ProjectMixin ):
178
178
179
179
request_data = {
180
+ '/projects/' : {},
180
181
'/projects/search/autocomplete/' : {'data' : {'term' : 'pip' }},
181
182
'/projects/autocomplete/version/pip/' : {'data' : {'term' : 'pip' }},
182
183
'/projects/pip/autocomplete/file/' : {'data' : {'term' : 'pip' }},
183
184
}
184
185
response_data = {
185
186
# Public
187
+ '/projects/' : {'status_code' : 301 },
186
188
'/projects/pip/downloads/pdf/latest/' : {'status_code' : 302 },
187
189
'/projects/pip/badge/' : {'status_code' : 200 },
188
190
'/projects/invalid_slug/' : {'status_code' : 302 },
You can’t perform that action at this time.
0 commit comments