Revision 1e685275 astakos/im/views.py

b/astakos/im/views.py
85 85
        return func(request, *args)
86 86
    return wrapper
87 87

  
88
def index(request, login_template_name='login.html', profile_template_name='profile.html', extra_context={}):
88
def index(request, login_template_name='im/login.html', profile_template_name='im/profile.html', extra_context={}):
89 89
    """
90 90
    If there is logged on user renders the profile page otherwise renders login page.
91 91
    
......
93 93
    
94 94
    ``login_template_name``
95 95
        A custom login template to use. This is optional; if not specified,
96
        this will default to ``login.html``.
96
        this will default to ``im/login.html``.
97 97
    
98 98
    ``profile_template_name``
99 99
        A custom profile template to use. This is optional; if not specified,
100
        this will default to ``profile.html``.
100
        this will default to ``im/profile.html``.
101 101
    
102 102
    ``extra_context``
103 103
        An dictionary of variables to add to the template context.
104 104
    
105 105
    **Template:**
106 106
    
107
    profile.html or login.html or ``template_name`` keyword argument.
107
    im/profile.html or im/login.html or ``template_name`` keyword argument.
108 108
    
109 109
    """
110 110
    template_name = login_template_name
......
132 132
    subject = _('Invitation to %s' % sitename)
133 133
    baseurl = request.build_absolute_uri('/').rstrip('/')
134 134
    url = '%s%s?code=%d' % (baseurl, reverse('astakos.im.views.signup'), inv.code)
135
    message = render_to_string('invitation.txt', {
135
    message = render_to_string('im/invitation.txt', {
136 136
                'invitation': inv,
137 137
                'url': url,
138 138
                'baseurl': baseurl,
......
144 144

  
145 145
@login_required
146 146
@transaction.commit_manually
147
def invite(request, template_name='invitations.html', extra_context={}):
147
def invite(request, template_name='im/invitations.html', extra_context={}):
148 148
    """
149 149
    Allows a user to invite somebody else.
150 150
    
......
161 161
    
162 162
    ``template_name``
163 163
        A custom template to use. This is optional; if not specified,
164
        this will default to ``invitations.html``.
164
        this will default to ``im/invitations.html``.
165 165
    
166 166
    ``extra_context``
167 167
        An dictionary of variables to add to the template context.
168 168
    
169 169
    **Template:**
170 170
    
171
    invitations.html or ``template_name`` keyword argument.
171
    im/invitations.html or ``template_name`` keyword argument.
172 172
    
173 173
    **Settings:**
174 174
    
......
222 222
                           context_instance = context)
223 223

  
224 224
@login_required
225
def edit_profile(request, template_name='profile.html', extra_context={}):
225
def edit_profile(request, template_name='im/profile.html', extra_context={}):
226 226
    """
227 227
    Allows a user to edit his/her profile.
228 228
    
......
236 236
    
237 237
    ``template_name``
238 238
        A custom template to use. This is optional; if not specified,
239
        this will default to ``profile.html``.
239
        this will default to ``im/profile.html``.
240 240
    
241 241
    ``extra_context``
242 242
        An dictionary of variables to add to the template context.
243 243
    
244 244
    **Template:**
245 245
    
246
    profile.html or ``template_name`` keyword argument.
246
    im/profile.html or ``template_name`` keyword argument.
247 247
    """
248 248
    form = ProfileForm(instance=request.user)
249 249
    extra_context['next'] = request.GET.get('next')
......
265 265
                                                          extra_context,
266 266
                                                          user=request.user))
267 267

  
268
def signup(request, on_failure='signup.html', on_success='signup_complete.html', extra_context={}, backend=None):
268
def signup(request, on_failure='im/signup.html', on_success='im/signup_complete.html', extra_context={}, backend=None):
269 269
    """
270 270
    Allows a user to create a local account.
271 271
    
......
286 286
    
287 287
    ``on_failure``
288 288
        A custom template to render in case of failure. This is optional;
289
        if not specified, this will default to ``signup.html``.
289
        if not specified, this will default to ``im/signup.html``.
290 290
    
291 291
    
292 292
    ``on_success``
293 293
        A custom template to render in case of success. This is optional;
294
        if not specified, this will default to ``signup_complete.html``.
294
        if not specified, this will default to ``im/signup_complete.html``.
295 295
    
296 296
    ``extra_context``
297 297
        An dictionary of variables to add to the template context.
298 298
    
299 299
    **Template:**
300 300
    
301
    signup.html or ``on_failure`` keyword argument.
302
    signup_complete.html or ``on_success`` keyword argument. 
301
    im/signup.html or ``on_failure`` keyword argument.
302
    im/signup_complete.html or ``on_success`` keyword argument. 
303 303
    """
304 304
    try:
305 305
        if not backend:
......
334 334
                           context_instance=get_context(request, extra_context))
335 335

  
336 336
@login_required
337
def send_feedback(request, template_name='feedback.html', email_template_name='feedback_mail.txt', extra_context={}):
337
def send_feedback(request, template_name='im/feedback.html', email_template_name='im/feedback_mail.txt', extra_context={}):
338 338
    """
339 339
    Allows a user to send feedback.
340 340
    
......
347 347
    
348 348
    ``template_name``
349 349
        A custom template to use. This is optional; if not specified,
350
        this will default to ``feedback.html``.
350
        this will default to ``im/feedback.html``.
351 351
    
352 352
    ``extra_context``
353 353
        An dictionary of variables to add to the template context.
354 354
    
355 355
    **Template:**
356 356
    
357
    signup.html or ``template_name`` keyword argument.
357
    im/signup.html or ``template_name`` keyword argument.
358 358
    
359 359
    **Settings:**
360 360
    

Also available in: Unified diff