![]() Therefore, plugins under an OSS license without a valid link to the source code may be removed from JetBrains Marketplace. Please refer to the JetBrains Plugin Marketplace Developer Agreement (10. Providing a license is mandatory to publish a plugin on JetBrains Marketplace. A license agreement protects your intellectual property and establishes the rights of all parties involved with the software, including the author, end users, and other developers. It is also in your best interest to take care of this. One of the defining characteristics of open-source software is that its source code is made freely available to users. ![]() TL DR: Providing access to the source code is a legal requirement. Why is providing the source code important? Return render(request, "forum.If you are distributing your plugin as open-source software on JetBrains Marketplace, it is your obligation to provide a valid source code link. Posts = (user1_is_superuser=True).order_by('-timestamp') Request, f'Your Question has been posted successfully!!') ![]() Post = Post(user1=user, post_content=content, The main thing is you have to do separate queries for the users, for superuser, it should display all the branches, the query should be : posts = (user1_is_superuser=True).order_by('-timestamp')Īnd for normal user to display selected branches it should be: posts = (branch=data.branch).order_by('-timestamp')ĭata = get_object_or_404(Register,user=er)Ĭontent = ('content', '') User = models.ForeignKey(User,on_delete=models.CASCADE) User Register model class Register(models.Model): Path('edit_reply//', views.edit_reply, name='edit_reply'), Path('edit_post//', views.edit_post, name='edit_post'), Path('notessharing', views.notessharing, name='notessharing'), Path('view_allnotes', views.view_allnotes, name='view_allnotes'), Path('delete-records/', lete_notes, name='delete_notes'), ![]() Path('delete_notes/', lete_notes, name='delete_notes'), Path('all_notes', views.all_notes, name='all_notes'), Path('rejected_notes', views.rejected_notes, name='rejected_notes'), Path('accepted_notes', views.accepted_notes, name='accepted_notes'), Path('assign_status/', views.assign_status, name='assign_status'), Path('pending_notes', views.pending_notes, name='pending_notes'), Path('delete_mynotes//', lete_mynotes, `name='delete_mynotes'), ` Path('view_mynotes', views.view_mynotes, name='view_mynotes'), Path('upload_notes', views.upload_notes, name='upload_notes'), Path('delete_reply/', lete_reply, name="delete_reply"), Path('delete_post/', lete_post, name="delete_post"), Path('delete_user/', lete_user, name="delete_user"), Path("showallusers", views.show_all_users, name="showallusers"), Path("discussion/", views.discussion, name="discussion"), Path("forum", views.forum, name="forum"), Path('admin_home', views.admin_home, name="admin_home"), Path('user_home', er_home, name="user_home"), Return render(request, "forum.html",context)įorum.html Posts = (branch=data.branch).order_by('-timestamp') Messages.success(request, f'Your Question has been posted successfully!!') Post = Post(user1=user, post_content=content, image=image,branch=branch,title=title) User_posts = (branch=data.branch).count() Post = models.ForeignKey(Post, on_delete=models.CASCADE, default='') Reply_content = models.TextField(max_length=5000,verbose_name="") User = models.ForeignKey(User, on_delete=models.CASCADE, default=1) Image = models.ImageField(upload_to="images",default="") Timestamp= models.DateTimeField(default=now)īranch=models.CharField(default='',max_length=200) Post_content = models.TextField(max_length=5000,verbose_name="") User1 = models.ForeignKey(User, on_delete=models.CASCADE, default=1) Is there a way to do this if yes please help me to do this But I want the admin can see all branch posts, not a specific branch post. But if I will assign any branch to the admin then he will be able to see only a particular branch's posts. I know this error comes because I haven't assigned any branch to the admin. In my case admin is a superuser) an error occurs DoesNotExist at /forum Register matching query does not exist. this functionality works fine for users but when I log in to the admin panel(I have created an admin dashboard where the admin will manage posts and replies. while registration user can select the branch and after login, the user will see only those posts which are related to his selected branch. I have created a Discussion Forum website where I provide branches to users dynamically.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |