Skip to content
/ people Public

Django Social Media App - Social Networking called "People", built to learn the framework

License

Notifications You must be signed in to change notification settings

Koubae/people

Repository files navigation

People!

Django Social Media App - Social Networking called "People", built to learn the framework

What is it

Is a simple, non production ready, Social Media Web Application use for learning and meant to be used as an example.

Quick Start

  • Make sure you have Python3.12 installed else please install via --> https://www.python.org/downloads/
  • Install MySQL, preferably MySQL 8, should work in lower version but I developed using version 8 so can't guarantee it works for older ones.
git clone [email protected]:Koubae/people.git
cd people
# create Python environment 
python -m venv env 
# Activate (linux)
source env/bin/activate
# Activate (windows)
env/Scripts/activate.bat

# Install 
python -m pip install requirements.txt
# (Optional) Install development dependencies
python -m pip install dev_requirements.txt
# Go Inside MySQL
mysql -u<user> -p<password
# create database 'people'
mysql> CREATE DATABASE people;
mysql> USE people;
mysql> SELECT DATABASE();
+------------+
| DATABASE() |
+------------+
| people     |
+------------+
# exit mysql 
mysql> exit

# Cool now, let's create migration to intialize the database
python manage.py makemigrations
python manage.py migrate

# run Django 
python manage.py runserver

# Now go to
localhost:8000

Login

Now use can use the demo user to login

  • Email: [email protected]
  • Password: awesome
  • Username: peoplePerson
  • First Name: Guy
  • Last Name: Awesome

Stack

  • Python3.12
  • Django 5
  • Django Template intentionally avoiding using any 'big' javascript framework in order to use Django Templating system
  • MySQL 8

Specifications

Projects

Plugin - Django Library and cool Projects

Other Django Examples

Here a list of some example I found in github and online

Troubleshooting

To keep things more organize, rather than have the application in root of the repository, I moved it inside app folder. PyCharm by default starts and expect Django application to be developed at root level, so in order to make it work see the below article

In general simply do

  1. Go to Settings --> Languages & Frameworks --> Django -->
  2. Modify Django Project Root and make it pointing to app

Additionally you may want to change Run configuration of PyCharm, set Working Directory also to app folder

PyCharm complaining about 'templates' folder

Further Reading

Social Media Related stuff