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
from dist import * | |
try: | |
from local import * | |
except ImportError: | |
from local_sample import * | |
from warnings import warn | |
warn( | |
'Local settings not found (settings/local.py).' | |
'Using local_sample.py instead.') |
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
def another_profile(request, id): | |
user2 = CustomUser.objects.get(id = id) | |
if request.user.is_authenticated(): | |
if request.user == user2: | |
viewable = False | |
else: | |
viewable = True | |
userlist = request.user.friends.all() | |
try: | |
Friendship.objects.get(user=request.user) |
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
description = models.TextField(validators=[MaxLengthValidator(128)], max_length=128, verbose_name='Краткая аннотация', help_text='Максимум 128 символов') | |
description = models.TextField( | |
validators=[MaxLengthValidator(128)], | |
max_length=128, | |
verbose_name='Краткая аннотация', | |
help_text='Максимум 128 символов') |
NewerOlder