Added markdown description for challenges and profile info
This commit is contained in:
@@ -17,6 +17,8 @@ def get_inventory_item_path(filename):
|
||||
class Profile(models.Model):
|
||||
user = models.OneToOneField(User, on_delete=models.CASCADE)
|
||||
icon = models.ImageField(upload_to=get_profile_image_path, default='default_icon.png')
|
||||
phone_number = models.CharField(max_length=16, blank=True, null=True)
|
||||
contact_info = models.TextField(blank=True, null=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.user.username
|
||||
@@ -35,7 +37,7 @@ class Challenge(models.Model):
|
||||
id = models.AutoField(primary_key=True)
|
||||
creator = models.ForeignKey(User, blank=True, null=True, editable=False, on_delete=models.SET_NULL)
|
||||
name = models.CharField(max_length=256)
|
||||
description = models.TextField(blank=True)
|
||||
description = models.TextField(blank=True, null=True)
|
||||
tags = models.ManyToManyField(ChallengeTag, blank=True)
|
||||
|
||||
def __str__(self):
|
||||
|
@@ -35,6 +35,7 @@ INSTALLED_APPS = [
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'location_field.apps.DefaultConfig',
|
||||
'markdownify',
|
||||
'kspace'
|
||||
]
|
||||
|
||||
@@ -80,6 +81,20 @@ DATABASES = {
|
||||
}
|
||||
}
|
||||
|
||||
MARKDOWNIFY_WHITELIST_TAGS = [
|
||||
'a',
|
||||
'abbr',
|
||||
'acronym',
|
||||
'b',
|
||||
'blockquote',
|
||||
'em',
|
||||
'i',
|
||||
'li',
|
||||
'ol',
|
||||
'p',
|
||||
'strong',
|
||||
'ul'
|
||||
]
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators
|
||||
|
Reference in New Issue
Block a user