jjheffernan / Django-Auto-Forum

Django Based Forum with content hosting to cloud, focused around Auto Enthusiasts
1 stars 0 forks source link

User comment does not 'POST' #1

Open jjheffernan opened 2 years ago

jjheffernan commented 2 years ago

This likely coincides with the decision to proceed with class based views at this time, but the Comment does not post. It seems using .objects is depreciated and does not properly call or iterate through the manager object. This can be fixed by using built-in Django methods when swapping to class based views.

jjheffernan commented 2 years ago

After looking further into the issue, I believe this does in fact lie with Function Base Views (FBV). FBVs are used as single requests from the server, but without the proper Classes with methods GET and POST. The information can only go in, thus pages with client specific views not loading. Working on paper file tree to understand class inheritance model for the projects, users, forums, etc.

jjheffernan commented 2 years ago

This can be solved via object mix-ins using Django's class based generic views. Get_context_data does not pull comments, or pull forms properly.

jjheffernan commented 2 years ago

Function Based (FBV-blog detail) had conditional request method. need to build-out redirect_urls to test_page app. Solution could be to add post function definition to CBV BlogDetailView

jjheffernan commented 2 years ago

developing redirect_urls within a TemplateView for updating posts on Blogs, Projects, and Comments. Class based Views will allow POST method and CRUD implementation within all user-interactive forms.

jjheffernan commented 2 years ago

With the expansion of the user model, the user now has access to several object mix-ins via to add to DB. still need to connect views so that it is logged as user event within DB and make sure there is a model for everything. Once done. There will exist a comment system with extendable threads!