WSGI change.
authorgniibe <gniibe@atom.fsij.org>
Mon, 3 Aug 2009 04:54:09 +0000 (13:54 +0900)
committergniibe <gniibe@atom.fsij.org>
Mon, 3 Aug 2009 04:54:09 +0000 (13:54 +0900)
ChangeLog [new file with mode: 0644]
apache-setting.cfg [new file with mode: 0644]
scripts/fsij-django.wsgi [new file with mode: 0644]
settings.py
templates/meeting_attendance/meeting_detail.html
templates/membership/member_list_top.html
templates/registration/login.html
templates/top_page.html
urls.py

diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..5d12a14
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,12 @@
+2009-08-03  Niibe Yutaka  <gniibe@fsij.org>
+
+       * apache-setting.cfg: New file.
+
+       * urls.py: Remove '/fsij' prefix.
+       * templates/top_page.html: Likewise.
+       * templates/meeting_attendance/meeting_detail.html: Likewise.
+       * templates/registration/login.html: Likewise.
+       * templates/membership/member_list_top.html: Likewise.
+       * settings.py: Likewise.
+
+       * scripts/fsij-django.wsgi: New file.
diff --git a/apache-setting.cfg b/apache-setting.cfg
new file mode 100644 (file)
index 0000000..9d32b79
--- /dev/null
@@ -0,0 +1,12 @@
+Alias /robots.txt /home/fsij/www/members.fsij.org/robots.txt
+Alias /favicon.ico /home/fsij/www/members.fsij.org/favicon.ico
+
+# AliasMatch /([^/]*\.css) /var/www/members.fsij.org/styles/$1
+# Alias /media/ /usr/local/wsgi/static/media/
+
+WSGIScriptAlias / /home/fsij/django/fsij/scripts/fsij-django.wsgi
+
+<Directory /home/fsij/django/fsij/scripts>
+Order allow,deny
+Allow from all
+</Directory>
diff --git a/scripts/fsij-django.wsgi b/scripts/fsij-django.wsgi
new file mode 100644 (file)
index 0000000..8a23463
--- /dev/null
@@ -0,0 +1,15 @@
+import os
+import sys
+
+sys.path.append('/home/fsij/django')
+os.environ['DJANGO_SETTINGS_MODULE'] = 'fsij.settings'
+
+import django.core.handlers.wsgi
+
+def error_return(environ, start_request):
+      return ['Maintenance time.  Please visit again.\n']
+
+if os.path.exists('/home/fsij/django/fsij/stop_service'):
+      application = error_return
+else:
+      application = django.core.handlers.wsgi.WSGIHandler()
index ea8d3e1..fef7af2 100644 (file)
@@ -88,9 +88,9 @@ INSTALLED_APPS = (
     'fsij.trac_placeholder',
 )
 
-LOGIN_URL = '/fsij/login/'
-LOGOUT_URL = '/fsij/logout/'
-LOGIN_REDIRECT_URL = '/fsij/'
+LOGIN_URL = '/login/'
+LOGOUT_URL = '/logout/'
+LOGIN_REDIRECT_URL = '/'
 
 AUTH_PROFILE_MODULE = "membership.Member"
 
index 9e45a8a..5575a24 100644 (file)
@@ -35,7 +35,7 @@
 </div>
 <hr/>
 {%   endif %}
-user: {{ user.username }} <a href="/fsij/logout/">{% trans "logout" %}</a>
+user: {{ user.username }} <a href="/logout/">{% trans "logout" %}</a>
 {% else %}
 <div>
 {%   if meeting_finished %}
@@ -43,7 +43,7 @@ user: {{ user.username }} <a href="/fsij/logout/">{% trans "logout" %}</a>
 {%   else %}
 {% trans "Please login and register for the meeting" %}<p>
 {%   endif %}
-<form method="post" action="/fsij/login/" id="login-form">
+<form method="post" action="/login/" id="login-form">
 <table>
 <tr>
     <td><label>{% trans "username" %}</label></td>
index 3507e55..7d67d69 100644 (file)
@@ -1,4 +1,4 @@
 <frameset rows="25%,*">
-<frame name="list" src="/fsij/membership/list/">
+<frame name="list" src="/membership/list/">
 <frame name="edit" src="">
 </frameset>
index d49c6a2..bb29ed5 100644 (file)
@@ -12,7 +12,7 @@ You don't have permission.<p>
 {% else %}
 Login required.<p>
 
-<form method="post" action="/fsij/login/">
+<form method="post" action="/login/">
   <div class="form-row">
     <label for="id_username">{% trans 'Username:' %}</label> <input type="text" name="username" id="id_username" />
   </div>
@@ -24,5 +24,5 @@ Login required.<p>
   </div>
   <input type="hidden" name="next" value="{{ next }}" />
 </form>
-<a href="/fsij/password_reset/">Forgot your password?</a>
+<a href="/password_reset/">Forgot your password?</a>
 {% endif %}
index 52f759e..9cba36a 100644 (file)
@@ -36,10 +36,10 @@ Google mapでは<a href=http://maps.google.com/maps/ms?msa=0&msid=11469454989933
 <br>
 <hr>
 {% if user.is_authenticated %}
-<p>ユーザ: {{ user.username }} <a href="/fsij/logout/">{% trans "logout" %}</a></p>
+<p>ユーザ: {{ user.username }} <a href="/logout/">{% trans "logout" %}</a></p>
 {% else %}
 <h2>ログイン</h2>
-<form method="post" action="/fsij/login/">
+<form method="post" action="/login/">
   <div class="form-row">
     <label for="id_username">{% trans 'Username:' %}</label> <input type="text" name="username" id="id_username" />
   </div>
@@ -49,7 +49,7 @@ Google mapでは<a href=http://maps.google.com/maps/ms?msa=0&msid=11469454989933
   <div class="submit-row">
     <label>&nbsp;</label><input type="submit" value="{% trans 'login' %}" />
   </div>
-  <input type="hidden" name="next" value="/fsij/" />
+  <input type="hidden" name="next" value="/" />
 </form>
 
 <p><a href=password_reset/>パスワードを忘れちゃった?</a></p>
diff --git a/urls.py b/urls.py
index 5c3beda..1dc7c5e 100644 (file)
--- a/urls.py
+++ b/urls.py
@@ -4,18 +4,18 @@ from django.contrib import admin
 admin.autodiscover()
 
 urlpatterns = patterns('',
-    (r'^fsij/$','fsij.views.index'),
-    (r'^fsij/login/','django.contrib.auth.views.login'),
-    (r'^fsij/logout/','django.contrib.auth.views.logout'),
-    (r'^fsij/password_change/', 'django.contrib.auth.views.password_change'),
-    (r'^fsij/password_change_done/', 'django.contrib.auth.views.password_change_done'),
-    (r'^fsij/password_reset/$', 'django.contrib.auth.views.password_reset'),
-    (r'^fsij/password_reset/done/$', 'django.contrib.auth.views.password_reset_done'),
-    (r'^fsij/password_reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$', 'django.contrib.auth.views.password_reset_confirm'),
-    (r'^fsij/password_reset/complete/$', 'django.contrib.auth.views.password_reset_complete'),
-    (r'^fsij/meetings/', include('fsij.meeting_attendance.urls')),
-    (r'^fsij/membership/', include('fsij.membership.urls')),
-    (r'^fsij/accounting/', include('fsij.accounting.urls')),
-    (r'^fsij/files/', include('fsij.files.urls')),
-    (r'^fsij/admin/(.*)', admin.site.root),
+    (r'^$','fsij.views.index'),
+    (r'^login/','django.contrib.auth.views.login'),
+    (r'^logout/','django.contrib.auth.views.logout'),
+    (r'^password_change/', 'django.contrib.auth.views.password_change'),
+    (r'^password_change_done/', 'django.contrib.auth.views.password_change_done'),
+    (r'^password_reset/$', 'django.contrib.auth.views.password_reset'),
+    (r'^password_reset/done/$', 'django.contrib.auth.views.password_reset_done'),
+    (r'^password_reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$', 'django.contrib.auth.views.password_reset_confirm'),
+    (r'^password_reset/complete/$', 'django.contrib.auth.views.password_reset_complete'),
+    (r'^meetings/', include('fsij.meeting_attendance.urls')),
+    (r'^membership/', include('fsij.membership.urls')),
+    (r'^accounting/', include('fsij.accounting.urls')),
+    (r'^files/', include('fsij.files.urls')),
+    (r'^admin/(.*)', admin.site.root),
 )