ContriHUB / Sheher

Django project to get info regarding tourist places.
1 stars 19 forks source link

Implements blog functionality for visitors #76

Closed Nandika-A closed 10 months ago

Nandika-A commented 10 months ago

Description

A new django app 'blog' is created.

models:

  1. post: All details related to post including foreign key to user, like and dislike models.
  2. like: Stores all the likes for every posts by every visitor.
  3. dislike: Stores all the dislikes for every posts by every visitor.
  4. comment: Stores comments.

views:

Functionality for List View, Detail View, Create, Update, Delete, like, dislike, comment on posts, and view the user's personal posts.

  1. The functionality can be accessed by clicking on the blog tab on the Navigation bar. This leads to the list view of all the blogs.
  2. By clicking on the post title, users can access the detailed view of that post, where they can also like, dislike and comment if they are authenticated.
  3. If the user is that post's author, they can update or delete the post by clicking on the buttons provided.
  4. If a visitor likes/dislikes the post, the count is incremented/decremented.
  5. Comments can be viewed and new comments can be added by clicking on comment button, which directs to the comment page.
  6. Every page contains a side-bar, providing options to create new post, view personal posts and view profile if the user is authenticated, otherwise mentions them to login/signup.
  7. 'Your posts' tab directs the user to the list view of all their posts.

Related Issue

Fixes #65

Type of change

Motivation and Context

Adds a blog feature for visitors.

How Has This Been Tested?

There are no errors after the implementation.

Screenshots (if appropriate):

Checklist:

Test Configuration:

Nandika-A commented 10 months ago

@kunal2812 I have implemented all the functionalities specified in the issue. Please check if any changes are required.

kunal2812 commented 10 months ago

Remove auto-generated migration files and binary files in pycache folders and add those folders to .gitignore. Keep only those changes which are relevant to the issue resolved

Nandika-A commented 10 months ago

@kunal2812 Sir I have made the required changes.

kunal2812 commented 10 months ago

@Nandika-A The contents of the blog post are not visible when I click on the blog post.

image

Also please follow the website theme. Currently, it looks like a separate website altogether. Also when I comment on any post they should be visible below the post. As of now I can't see them anywhere.

Add the documentation changes as well.

python manage.py makemigrations blog
python manage.py migrate blog
Nandika-A commented 10 months ago

@kunal2812 Sir I have made a separate page for viewing comments. I will move to the same page now.

Nandika-A commented 10 months ago

@kunal2812 I have moved the comments to the post detail page and updated the readme. Screenshot (53) Screenshot (54)

kunal2812 commented 10 months ago

@Nandika-A Fix the theme of this page. This issue has bonus points.

Nandika-A commented 10 months ago

@kunal2812 sir I included the website navbar in blog/base.html but it just included the HTML and not the CSS.

kunal2812 commented 10 months ago

You can customise your existing navbar according to theme of the app

kunal2812 commented 10 months ago

@kunal2812 I have moved the comments to the post detail page and updated the readme. Screenshot (53) Screenshot (54)

Why is it showing "None" in the comment section. It should show the username of the person who commented right ?

Nandika-A commented 10 months ago

@kunal2812 I have moved the comments to the post detail page and updated the readme. Screenshot (53) Screenshot (54)

Why is it showing "None" in the comment section. It should show the username of the person who commented right ?

sir in visitor/models, the username is set to none.

Nandika-A commented 10 months ago

Should I use email instead of username here?

kunal2812 commented 10 months ago

Yes just like the blogs

Nandika-A commented 10 months ago

@kunal2812 Sir I have changed the theme.

Screenshot (55)

Nandika-A commented 10 months ago

@kunal2812 sir, are there any changes to be made?

kunal2812 commented 10 months ago

@Nandika-A Ensure that the image is properly contained within the blog body, preventing it from flowing all over the page

image

Nandika-A commented 10 months ago

@kunal2812 sir I have fixed the image size now.

kunal2812 commented 10 months ago

image

Login/Signup button isn't working

image

Timing is in UTC. Change to local time zone (The time was 6:50 pm when I took the screenshot).

Fix these issues. Rest everything is okay.

Nandika-A commented 10 months ago

I will delete these files

Nandika-A commented 10 months ago

image

Login/Signup button isn't working

image

Timing is in UTC. Change to local time zone (The time was 6:50 pm when I took the screenshot).

Fix these issues. Rest everything is okay.

Sir, I have directly imported the navbar from navbar.html. I haven't changed anything in the code of login/signup.

Nandika-A commented 10 months ago

@kunal2812 sir I have made the changes.