note sharing

19 views
Skip to first unread message

mick

unread,
Jul 10, 2020, 11:33:53 AM7/10/20
to Django users
Hello guys
Please anyone help me out I am not able to figure out the internal sharing with selected?

 Django website where users can privately create and share notes. All users will have an account and they will be able to signup then login to their account. Once logged in they will be able to write notes in the web app. While creating the note they will have the option to share the note with another user of the web app. The app will contain a page where the user can see the notes that they have created and the notes that have been shared with them. 

Thank you

Kunal Solanke

unread,
Jul 10, 2020, 11:52:54 AM7/10/20
to django...@googlegroups.com
If you don't want to do complicated things just add manytomany field for sharewith in note model
And while user requests the notes page just make a query to database 

Notes.objects.filter(Q(sharedwith=current_user ) l Q(author=currentuser))

And send this back to user



Imp-while creating a note user should specify whom to share with
You can use multiple input for that

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ab4a9079-ccd1-4ed7-8061-fb539b740367o%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages