This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"url": "https://api.localhost:8000/users/3/", | |
"first_name": "Steven ", | |
"last_name": "Konig", | |
"email": "[email protected]", | |
"profile-image": "https://fbcdn-profile-a.akamaihd.net/profile_picture.jpg", | |
"age": 36, | |
"profiles": { | |
"customer_profile_url": "https://api.localhost:8000/customers/3/", | |
"vendor_profile_url": "https://api.localhost:8000/vendors/3/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Environment: | |
Request Method: GET | |
Request URL: http://localhost:8000/profile/users/ | |
Django Version: 1.7.4 | |
Python Version: 3.4.2 | |
Installed Applications: | |
('django.contrib.admin', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User(AbstractBaseUser, PermissionsMixin): | |
class Meta: | |
abstract = False | |
USERNAME_FIELD = 'email' | |
account_type = models.IntegerField(choices=ACCOUNT_TYPES, default=2) | |
first_name = models.CharField(max_length=30) | |
middle_names = models.CharField(max_length=30) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User(AbstractBaseUser, PermissionsMixin): | |
class Meta: | |
abstract = False | |
USERNAME_FIELD = 'email' | |
account_type = models.IntegerField(choices=ACCOUNT_TYPES, default=2) | |
first_name = models.CharField(max_length=30) | |
middle_names = models.CharField(max_length=30) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#urls.py | |
urlpatterns = patterns('', | |
url(r'^profile/$', login_required(views.BaseView.as_view( | |
template_name='profile_view.html' testVariable='testing' )), name='profile'), | |
) | |
#views.py | |
class BaseView(TemplateView): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#urls.py | |
urlpatterns = patterns('', | |
url(r'^profile/$', login_required(views.BaseView.as_view( | |
template_name='profile_view.html' testVariable='testing' )), name='profile'), | |
) | |
#views.py | |
class BaseView(TemplateView): |
NewerOlder