https://github.com/blackhatinside/instagramfeed
Backend Development Project done during my Internship at Convin
https://github.com/blackhatinside/instagramfeed
Last synced: over 1 year ago
JSON representation
Backend Development Project done during my Internship at Convin
- Host: GitHub
- URL: https://github.com/blackhatinside/instagramfeed
- Owner: blackhatinside
- Created: 2025-01-04T10:55:49.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-18T08:15:43.000Z (over 1 year ago)
- Last Synced: 2025-01-31T17:16:20.467Z (over 1 year ago)
- Language: Python
- Size: 43.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
create an app 'social'
```
python manage.py startapp social
```
add the new app to the list of installed apps
after creating the models, do
```
python manage.py makemigrations
python manage.py migrate
```
in cmd, add an author
```
python manage.py shell
from social.models import Author
Author.objects.create(name="Adi", email="adi@gmail.com")
```
```
# to delete
http://127.0.0.1:8000/ --> http://127.0.0.1:8000/authors/ --> http://127.0.0.1:8000/authors/1/ --> CLICK 'DELETE' button --> http://127.0.0.1:8000/authors/ -->
# to update
http://127.0.0.1:8000/comments/3/ --> CHANGE text in 'Content' field and click 'PUT' button
```
# DOCKER COMMANDS
to restart the docker container
`docker-compose up`
to rebuild and restart the docker container
`docker-compose up --build`
to stop the docker container
`docker-compose down`
# IMPLEMENTATION NOTES
CRUD operations are implemented through Django REST framework's ModelViewSet
Viewsets are typically registered with a router (DefaultRouter, SimpleRouter), which automatically generates the URL patterns for all the HTTP methods (GET, POST, PUT, DELETE, etc.)
CRUD operations should be implemented through Django REST framework's Generic views
# Testing Files
publisher.py
sender.py
receiver.py