Saturday, May 16, 2020

How to share the post with friends in django?

I have researched many questions on stackoverflow but failed to solve.

There are 3 different apps :

├── blog
│   ├── admin.py
│   ├── apps.py
│   ├── forms.py
│   ├── migrations
│   │   ├── 0001_initial.py
│   │   ├── 0002_auto_20200516_1052.py
│   │   ├── 0003_share.py
│   │   └── __init__.py
│   ├── models.py
│   ├── signals.py
│   ├── static
│   │   └── blog
│   │       └── main.css
│   ├── templates
│   │   └── blog
│   │       ├── about.html
│   │       ├── base.html
│   │       ├── home.html
│   │       ├── post_draft_list.html
│   │       ├── posts_confirm_delete.html
│   │       ├── posts_detail.html
│   │       ├── posts_form.html
│   │       └── user_posts.html
│   ├── tests.py
│   ├── urls.py
│   ├── validators.py
│   └── views.py

├── friend
│   ├── admin.py
│   ├── apps.py
│   ├── __init__.py
│   ├── migrations
│   │   ├── 0001_initial.py
│   │   ├── 0002_delete_share.py
│   │   └── __init__.py
│   ├── models.py
│   ├── templates
│   │   └── friend
│   │       ├── accept_friend.html
│   │       ├── add_friend.html
│   │       ├── friend_list.html
│   │       ├── reject_friend.html
│   │       └── sent_friend_request_success.html
│   ├── tests.py
│   ├── urls.py
│   └── views.py
|── users
    ├── admin.py
    ├── apps.py
    ├── forms.py
    ├── migrations
    │   ├── 0001_initial.py
    │   ├── __init__.py
    │   └── __pycache__
    │       ├── 0001_initial.cpython-36.pyc
    │       └── __init__.cpython-36.pyc
    ├── models.py
    ├── signals.py
    ├── templates
    │   └── users
    │       ├── account_activate.html
    │       ├── activated_account.html
    │       ├── email_sent.html
    │       ├── invalid_link.html
    │       ├── login.html
    │       ├── logout.html
    │       ├── no_such_user.html
    │       ├── password_reset_complete.html
    │       ├── password_reset_confirm.html
    │       ├── password_reset_done.html
    │       ├── password_reset.html
    │       ├── profile.html
    │       ├── register.html
    │       ├── search.html
    │       ├── search_profile.html
    │       └── view_profile.html
    ├── tests.py
    ├── token_generator.py
    ├── urls.py
    └── views.py
This is folder structure.

/blog/models.py contains blog details.
blog_details contains fields like title, content,time details image and video.

/friend/models.py contains friends details and share model.
friend details have fields like  from_user,  to_user and status
share details have fields like from_user, to_user and is_friend and shared_content.

/user/models.py contains Profile model with user image date & time details  

Thanks for help,

Akshat Zala
akshatzala@gmail.com

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/68fa3dc7-7b3d-4efb-8d44-ab5e60eb32e5%40googlegroups.com.

No comments:

Post a Comment