зеркало из https://github.com/mozilla/FlightDeck.git
basic person profile link created
This commit is contained in:
Родитель
42f4b3afd6
Коммит
cb961d015b
|
@ -0,0 +1,6 @@
|
|||
from django.conf.urls.defaults import *
|
||||
|
||||
urlpatterns = patterns('person.views',
|
||||
url(r'^(?P<username>\w+)/$','public_profile', name='person_public_profile'),
|
||||
)
|
||||
|
|
@ -1 +1,11 @@
|
|||
# Create your views here.
|
||||
from django.shortcuts import render_to_response, get_object_or_404
|
||||
from django.http import Http404, HttpResponseRedirect, HttpResponse
|
||||
from django.template import RequestContext#,Template
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
from person.models import Profile
|
||||
#from person.default_settings import settings
|
||||
|
||||
def public_profile(r, username):
|
||||
person = get_object_or_404(User, username=username)
|
||||
return HttpResponse("Here profile of %s" % str(person))
|
||||
|
|
Загрузка…
Ссылка в новой задаче