PageRenderTime 19ms CodeModel.GetById 13ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/tests/regressiontests/comment_tests/custom_comments/__init__.py

https://code.google.com/p/mango-py/
Python | 32 lines | 26 code | 6 blank | 0 comment | 0 complexity | 5e0bba7798509598c8080b2f3e80c9ce MD5 | raw file
 1from django.core import urlresolvers
 2from regressiontests.comment_tests.custom_comments.models import CustomComment 
 3from regressiontests.comment_tests.custom_comments.forms import CustomCommentForm
 4
 5def get_model():
 6    return CustomComment 
 7
 8def get_form():
 9    return CustomCommentForm
10
11def get_form_target():
12    return urlresolvers.reverse(
13        "regressiontests.comment_tests.custom_comments.views.custom_submit_comment"
14    )
15
16def get_flag_url(c):
17    return urlresolvers.reverse(
18        "regressiontests.comment_tests.custom_comments.views.custom_flag_comment", 
19        args=(c.id,)
20    )
21
22def get_delete_url(c):
23    return urlresolvers.reverse(
24        "regressiontests.comment_tests.custom_comments.views.custom_delete_comment", 
25        args=(c.id,)
26    )
27
28def get_approve_url(c):
29    return urlresolvers.reverse(
30        "regressiontests.comment_tests.custom_comments.views.custom_approve_comment", 
31        args=(c.id,)
32    )