diff --git a/media/css/seahub.css b/media/css/seahub.css
index 1bf182270b..e4bac47f06 100644
--- a/media/css/seahub.css
+++ b/media/css/seahub.css
@@ -138,6 +138,7 @@ table {
table-layout:fixed;
margin:8px 0 40px;
}
+caption {font-size:1.1em; font-weight:bold; margin-bottom:.6em;}
th {
text-align:left;
font-weight:bold;
@@ -2235,3 +2236,6 @@ textarea:-moz-placeholder {/* for FF */
.search-results-item .time {
color:#666;
}
+#plan-form {
+ width:260px;
+}
\ No newline at end of file
diff --git a/seahub/templates/myhome.html b/seahub/templates/myhome.html
index e16163855a..d0a606b4a1 100644
--- a/seahub/templates/myhome.html
+++ b/seahub/templates/myhome.html
@@ -23,12 +23,12 @@
{% trans "Account" %}
diff --git a/seahub/urls.py b/seahub/urls.py
index 5b3a7016c0..df6481f558 100644
--- a/seahub/urls.py
+++ b/seahub/urls.py
@@ -126,14 +126,10 @@ if settings.SERVE_STATIC:
(r'^%s/(?P
.*)$' % (media_url), 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
)
-try:
- from settings import CLOUD_MODE
-except ImportError:
- CLOUD_MODE = False
-if CLOUD_MODE:
+if getattr(settings, 'CLOUD_MODE', False):
urlpatterns += patterns('',
- # (r'^organizations/', include('seahub.organizations.urls')),
(r'^demo/', demo),
+ (r'^pay/', include('seahub_extra.pay.urls')),
)
else:
urlpatterns += patterns('',
@@ -147,3 +143,4 @@ if getattr(settings, 'ENABLE_FILE_SEARCH', False):
urlpatterns += patterns('',
url(r'^search/$', search, name='search'),
)
+
diff --git a/seahub/utils/__init__.py b/seahub/utils/__init__.py
index 0750e78387..8b669814da 100644
--- a/seahub/utils/__init__.py
+++ b/seahub/utils/__init__.py
@@ -849,7 +849,6 @@ else:
def get_user_traffic_stat(username):
pass
-
def redirect_to_login(request):
from django.conf import settings
login_url = settings.LOGIN_URL
diff --git a/seahub/views/__init__.py b/seahub/views/__init__.py
index 62f9a19456..4cec9aebc1 100644
--- a/seahub/views/__init__.py
+++ b/seahub/views/__init__.py
@@ -820,8 +820,6 @@ def myhome(request):
if stat:
traffic_stat = stat['file_view'] + stat['file_download'] + stat['dir_download']
- plan = getattr(request.user, 'plan', None)
-
return render_to_response('myhome.html', {
"nickname": nickname,
"owned_repos": owned_repos,
@@ -844,7 +842,7 @@ def myhome(request):
"starred_files": starred_files,
"TRAFFIC_STATS_ENABLED": TRAFFIC_STATS_ENABLED,
"traffic_stat": traffic_stat,
- "plan": plan,
+ "ENABLE_PAYMENT": getattr(settings, 'ENABLE_PAYMENT', False),
}, context_instance=RequestContext(request))
@login_required