Forked mumble-django project from https://bitbucket.org/Svedrin/mumble-django
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1.0 KiB

  1. # -*- coding: utf-8 -*-
  2. from django.shortcuts import render_to_response, get_object_or_404, get_list_or_404
  3. from django.template import RequestContext
  4. from django.http import HttpResponseRedirect
  5. from django.core.urlresolvers import reverse
  6. from django.contrib.auth.decorators import login_required
  7. from django.contrib.auth.models import User
  8. from mumble.models import Mumble, MumbleUser
  9. #from guestbook.models import Entry, Comment
  10. #from forum.models import Post
  11. @login_required
  12. def profile( request ):
  13. userdata = {
  14. "mumbleaccs": MumbleUser.objects.filter( owner = request.user ),
  15. # "gbposts": Entry.objects.filter( author = request.user ).count(),
  16. # "gbcomments": Comment.objects.filter( author = request.user ).count(),
  17. # "forumposts": Post.objects.filter( author = request.user ).count(),
  18. };
  19. return render_to_response(
  20. 'registration/profile.html',
  21. userdata,
  22. context_instance = RequestContext(request)
  23. );
  24. def imprint( request ):
  25. return render_to_response( 'registration/imprint.html' );