You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Tag model is needed to create Tag objects. Need to create Tag Schemas for serialization and validation. Also need to create decorators to not allow users to access a non-existing Tag.
Describe the solution you'd like
Create Decorators and Schemas for the Tag model.
Routes/functions to implement/change
Create the tag_exists decorator
Create the TagFormSchema, TagSchema and TagsSchema.
Additional context
Create the Tag model in models.py with the following fields:
name: text (nullable=False)
summary: text (nullable=False)
submission_guideline: text (nullable=False)
about: text (nullable=False)
emoji: text (nullable=False)
users: many to many relationship. Allow Users and Tags to connected to each other
The tag_exists decorator should take the query id from the route and query for the Tag. If the Tag exists return the args and kwargs. If not return a 404 message saying that "Tag does not exist".
Create the TagFormSchema class to contain the following fields:
name (required)
summary (required)
submission_guidelines (required)
about (required)
Create the TagSchema that has the following fields:
id
You can create the TagsSchema by using the TagSchema, but set it to return many models instead.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Tag model is needed to create Tag objects. Need to create Tag Schemas for serialization and validation. Also need to create decorators to not allow users to access a non-existing Tag.
Describe the solution you'd like
Create Decorators and Schemas for the Tag model.
Routes/functions to implement/change
Additional context
The text was updated successfully, but these errors were encountered: