mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-14 06:11:16 +00:00
Remove root function to reduce redirects
This commit is contained in:
@@ -38,7 +38,7 @@ urlpatterns = patterns('',
|
||||
|
||||
(r'^accounts/', include('seahub.base.registration_urls')),
|
||||
|
||||
(r'^$', root),
|
||||
(r'^$', myhome),
|
||||
#url(r'^home/$', direct_to_template, { 'template': 'home.html' } ),
|
||||
url(r'^robots\.txt$', TemplateView.as_view(template_name='robots.txt', content_type='text/plain')),
|
||||
url(r'^home/my/$', myhome, name='myhome'),
|
||||
|
@@ -68,12 +68,6 @@ from seahub.settings import FILE_PREVIEW_MAX_SIZE, INIT_PASSWD, USE_PDFJS, \
|
||||
# Get an instance of a logger
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
def root(request):
|
||||
if request.user.is_authenticated():
|
||||
return HttpResponseRedirect(reverse(myhome))
|
||||
else:
|
||||
return HttpResponseRedirect(settings.LOGIN_URL)
|
||||
|
||||
def validate_owner(request, repo_id):
|
||||
"""
|
||||
Check whether user in the request owns the repo.
|
||||
|
Reference in New Issue
Block a user