Django code dealing with templates, user profiles, image files, user login, admin customizations and other fun stuffs experimented via developing a simple social media site. We will be using the following:
- Python 3.x
- Django 2.x
- Boostrap 4.x
- Crispy forms (Django module)
- jquery(cdn mode)
- sqlite3
- Create virtualenv with Python 3.x
- Activate the virtualenv
- Install the required modules using pip install -r requirements.txt
- runserver
- migrate (creates admin related data)
- create super user .. ex: admin
- through admin, create multiple users (or directly create userprofiles)
- feel free to add images in the admin->userprofile forms ..
- The package has 2 apps, Viz., ui (for user interactive forms .. like login/profile/password etc ... ) and core (that contains the friend logic and connections)
- with few userprofiles created, login to home page ...
- click on UI button to see some static information
- click on home and you should be able to add posts ...
- the user initially will have no friends but all the userprofiles under 'Other folks' with 'Friend' buttons
- Any Friend on the friend list can be unfriended.
- ui/templates/base.html - The changes you make in this html will reflect in every page
- ui/templates/ui/*.html - Contains individual pages and few even containing forms ... changes here are specific to that page or that specific operation
- core/templates/core/home.html - a very very minimal facebook-like home page.