Skip to content

Vybornak2/FatPyBlog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create Your Own Blog With Django

Follow the step-by-step instructions on Real Python to build your own blog with Django.

Setup

You can run the provided example project on your local machine by following the steps outlined below.

Create a new virtual environment:

$ python3 -m venv venv

Activate the virtual environment:

$ source venv/bin/activate

Install the dependencies for this project if you haven't installed them yet:

(venv) $ python -m pip install -r requirements.txt

Make and apply the migrations for the project to build your local database:

(venv) $ python manage.py makemigrations
(venv) $ python manage.py migrate

Run the Django development server:

(venv) $ python manage.py runserver

Navigate to http://localhost:8000/ to see your blog in action.

Using the Django Admin site

To create new posts, you need to create a superuser:

(venv) $ python manage.py createsuperuser
Username (leave blank to use 'root'): admin
Email address: admin@example.com
Password: RealPyth0n
Password (again): RealPyth0n
Superuser created successfully.

When running the createsuperuser managemant command you're prompted to choose a username, provide an email address, and set a password. Use your own data for these fields and make sure to remember them.

Navigate to http://localhost:8000/admin and log in with the credentials you just used to create a superuser.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published