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.

31 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. "ProfileActive": True,
  15. "mumbleaccs": MumbleUser.objects.filter( owner = request.user ),
  16. # "gbposts": Entry.objects.filter( author = request.user ).count(),
  17. # "gbcomments": Comment.objects.filter( author = request.user ).count(),
  18. # "forumposts": Post.objects.filter( author = request.user ).count(),
  19. };
  20. return render_to_response(
  21. 'registration/profile.html',
  22. userdata,
  23. context_instance = RequestContext(request)
  24. );
  25. def imprint( request ):
  26. return render_to_response( 'registration/imprint.html' );