summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornishanth2010-02-05 17:21:00 +0530
committernishanth2010-02-05 17:21:00 +0530
commitf22bacc74ce5be78f8d17f218f4aa39369d54cdb (patch)
tree2c25ede2ee47b3d5276c90847b2c9b3a9b2f63d5
parent8be81df9f642cb1c0c321db81469a24b902f9eb4 (diff)
downloadpytask-f22bacc74ce5be78f8d17f218f4aa39369d54cdb.tar.gz
pytask-f22bacc74ce5be78f8d17f218f4aa39369d54cdb.tar.bz2
pytask-f22bacc74ce5be78f8d17f218f4aa39369d54cdb.zip
made urls.py look better and added an empty method edit_task to taskViews .
-rw-r--r--taskapp/views/task.py5
-rw-r--r--urls.py34
2 files changed, 22 insertions, 17 deletions
diff --git a/taskapp/views/task.py b/taskapp/views/task.py
index cdb7d45..8a91ed9 100644
--- a/taskapp/views/task.py
+++ b/taskapp/views/task.py
@@ -255,4 +255,9 @@ def assign_task(request, tid):
else:
return show_msg('You are not authorised to perform this action', task_url, 'view the task')
+def edit_task(request, tid):
+ """ see what are the attributes that can be edited depending on the current status
+ and then give the user fields accordingly.
+ """
+ return None
diff --git a/urls.py b/urls.py
index e6a2566..a811fb4 100644
--- a/urls.py
+++ b/urls.py
@@ -4,8 +4,8 @@ from django.conf.urls.defaults import *
from django.contrib import admin
admin.autodiscover()
-from pytask.taskapp.views.user import homepage, register, user_login, user_logout, view_my_profile, edit_my_profile, browse_users
-from pytask.taskapp.views.task import browse_tasks, view_task, create_task, add_mentor, add_tasks, claim_task, assign_task
+from pytask.taskapp.views import user as userViews
+from pytask.taskapp.views import task as taskViews
from pytask.taskapp.utils.seed_db import seed_db
@@ -17,26 +17,26 @@ urlpatterns = patterns('',
# to INSTALLED_APPS to enable admin documentation:
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),
- (r'^$', homepage),
+ (r'^$', userViews.homepage),
- (r'^task/browse/$', browse_tasks),
- (r'^task/view/tid=(\d+)$', view_task),
- (r'^task/create/$', create_task),
- (r'^task/addmentor/tid=(\d+)', add_mentor),
- #(r'^task/addtasks/tid=(\d+)', add_tasks),
- (r'^task/edit/tid=(\d+)', edit_task),
- (r'^task/claim/tid=(\d+)', claim_task),
- (r'^task/assign/tid=(\d+)', assign_task),
+ (r'^task/browse/$', taskViews.browse_tasks),
+ (r'^task/view/tid=(\d+)$', taskViews.view_task),
+ (r'^task/create/$', taskViews.create_task),
+ (r'^task/addmentor/tid=(\d+)', taskViews.add_mentor),
+ #(r'^task/addtasks/tid=(\d+)', taskViews.add_tasks),
+ (r'^task/edit/tid=(\d+)', taskViews.edit_task),
+ (r'^task/claim/tid=(\d+)', taskViews.claim_task),
+ (r'^task/assign/tid=(\d+)', taskViews.assign_task),
(r'^admin/', include(admin.site.urls)),
- (r'^accounts/register/$',register),
- (r'^accounts/login/$',user_login),
- (r'^accounts/logout/$',user_logout),
+ (r'^accounts/register/$', userViews.register),
+ (r'^accounts/login/$', userViews.user_login),
+ (r'^accounts/logout/$', userViews.user_logout),
- (r'^user/view/uid=(\d+)$', view_my_profile),
- (r'^user/edit/?$', edit_my_profile),
- (r'^user/browse/?$',browse_users),
+ (r'^user/view/uid=(\d+)$', userViews.view_my_profile),
+ (r'^user/edit/?$', userViews.edit_my_profile),
+ (r'^user/browse/?$', userViews.browse_users),
(r'^seed_db/$', seed_db),
)