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.

26 lines
928 B

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