-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collections #1810
base: master
Are you sure you want to change the base?
Collections #1810
Conversation
improve url handling and visualization
fscollections/models.py
Outdated
class Collection(models.Model): | ||
|
||
author = models.ForeignKey(User, on_delete=models.CASCADE) | ||
name = models.CharField(max_length=128, default="BookmarkCollection") #add restrictions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to specify a default
@@ -927,6 +928,8 @@ | |||
# ------------------------------------------------------------------------------- | |||
# Extra Freesound settings | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rename this to ENABLE COLLECTIONS
?
|
||
user = models.ForeignKey(User, on_delete=models.CASCADE) | ||
name = models.CharField(max_length=255) #max_length as in Packs (128 for Bookmarks) | ||
created = models.DateTimeField(db_index=True, auto_now_add=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add modified
field
collection = models.ForeignKey(Collection, related_name='collectionsound', on_delete=models.CASCADE) | ||
created = models.DateTimeField(db_index=True, auto_now_add=True) | ||
|
||
STATUS_CHOICES = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Options:
- Accepted
- Pending
- Refused
def delete_collection(request, collection_id): | ||
collection = get_object_or_404(Collection, id=collection_id) | ||
|
||
if request.user==collection.user: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider else case, return 404 or reload edit page but with a message saying that user is not allowed
Issue(s)
#1029
Description
App creation and first implementations of basic functionalitites for collections.