comparison apps/profile/views.py @ 151:c7be7def8b57

Bundles! (basic functionality) Changes made in this commit: * Added new dependencies (see pip-requirements) * Added new dependency and setup information to README * Deleted the included mptt app (in apps/mptt) in favour of just adding the dependency to pip-requirements (makes it easier to update, etc) * Changed the import convention to use `from apps.bundle.models import Bundle` rather than `from agora.apps.bundle.models import Bundle` because Celery was having problems with the latter style. Everything should still work. * Moved the syntax-highlighting and related code for snippets into separate HTML files so that they can be used by the bundle app And, of course, the ability to upload bundles. But wait! There's more! Changes still to come, for only $19.95 a month: * Bundle versioning * Automatic license integration (i.e. adding headers to files) * The ability to download bundles (zip, tar, etc) * Rating bundles * And much, much more! Batteries not included.
author dellsystem <ilostwaldo@gmail.com>
date Mon, 15 Oct 2012 00:52:00 -0400
parents 5ab229c9d348
children
comparison
equal deleted inserted replaced
150:3db897f5acdc 151:c7be7def8b57
1 from django.shortcuts import render, get_object_or_404, redirect 1 from django.shortcuts import render, get_object_or_404, redirect
2 from django.contrib.auth.models import User 2 from django.contrib.auth.models import User
3 from django.contrib.auth.decorators import login_required 3 from django.contrib.auth.decorators import login_required
4 4
5 from agora.apps.free_license.models import FreeLicense 5 from apps.free_license.models import FreeLicense
6 from agora.apps.bundle.models import Bundle 6 from apps.bundle.models import Bundle
7 from agora.apps.snippet.models import Snippet 7 from apps.snippet.models import Snippet
8 from agora.apps.profile.models import Profile 8 from apps.profile.models import Profile
9 from agora.apps.profile.forms import UserForm, ProfileForm 9 from apps.profile.forms import UserForm, ProfileForm
10 10
11 11
12 def showprofile(request, username): 12 def showprofile(request, username):
13 user = get_object_or_404(User, username=username) 13 user = get_object_or_404(User, username=username)
14 profile = user.get_profile() 14 profile = user.get_profile()