Skip to content

Commit

Permalink
fix: publication html default + webpath serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
francesco-filicetti committed Apr 20, 2021
1 parent de395a8 commit b29d7a1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def get_requirements(fname='requirements.txt'):

setup(
name="unicms",
version='0.11.0',
version='0.11.1',
description="uniCMS is a Django Web Content Management System",
author='Giuseppe De Marco, Francesco Filicetti',
author_email='[email protected], [email protected]',
Expand Down
3 changes: 3 additions & 0 deletions src/cms/contexts/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ class Meta:

def to_representation(self, instance):
data = super().to_representation(instance)
parent = WebPathSerializer(instance.parent)
data['parent'] = parent.data
data['full_name'] = instance.__str__()
request = self.context.get('request', None)
if request and request.user:
context_permissions = dict(CMS_CONTEXT_PERMISSIONS)
Expand Down
2 changes: 1 addition & 1 deletion src/cms/publications/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class AbstractPublication(TimeStampedModel, ActivableModel):
content_type = models.CharField(choices=CONTENT_TYPES,
null=False, blank=False,
max_length=33,
default='markdown')
default='html')
presentation_image = models.ForeignKey(Media, null=True, blank=True,
on_delete=models.CASCADE)
# state = models.CharField(choices=PAGE_STATES,
Expand Down

0 comments on commit b29d7a1

Please sign in to comment.