Skip to content
项目

mdn/django-diy-blog

在 GitHub 查看

关于

Basic blog site written in Django (part of MDN Django module assessment).

网站与应用开发

这些数字如何统计

实测星标增长

24小时
0
7天
+1
15天
+1
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

Django DIY Blog

Basic blog site written in Django (part of MDN Django module assessment)

This web application creates an very basic blog site using Django. The site allows blog authors to create text-only blogs using the Admin site, and any logged in user to add comments via a form. Any user can list all bloggers, all blogs, and detail for bloggers and blogs (including comments for each blog).

The models for this site are as shown below:

Django Blog Models

For more information see the associated MDN assessment page.

Quick Start

To get this project up and running locally on your computer:

  1. Set up the Python development environment.

    Note: This has been tested against Django 6.1, which requires Python 3.12 or later.

  2. Create and activate a Python virtual environment for the project using venv, the virtual environment tool built into Python:

    # Linux/macOS
    python3 -m venv django6_env
    source django6_env/bin/activate
    
    # Windows
    py -3 -m venv django6_env
    django6_env\Scripts\activate
    
  3. Assuming your virtual environment is active, run the following commands (if you're on Windows you may use py or py -3 instead of python3 to start Python):

    pip3 install -r requirements.txt
    python3 manage.py makemigrations
    python3 manage.py migrate
    python3 manage.py collectstatic
    python3 manage.py test # Run the standard tests. These should all pass.
    python3 manage.py createsuperuser # Create a superuser
    python3 manage.py runserver
    
  4. Open a browser to http://127.0.0.1:8000/admin/ to open the admin site.

  5. Create a few test objects of each type.

  6. Open a new tab to http://127.0.0.1:8000 to see the main site, with your new objects.

探索相关项目

加载中…