django-oscar安装配置

1、创建python 虚拟环境

python3 -m venv oscar-env          —创建虚拟环境

source oscar-env/bin/activate      —激活环境

2、创建一个oscar文件目录

mkdir oscar;

3、生成一个商店站点

django-admin startproject ruihong;

4、完成django 配置

https://django-oscar.readthedocs.io/en/latest/internals/getting_started.html

4.1 settings.py 文件配置

"""
Django settings for ruihong project.

Generated by 'django-admin startproject' using Django 4.2.13.

For more information on this file, see
https://docs.djangoproject.com/en/4.2/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.2/ref/settings/
"""
from oscar.defaults import *
from pathlib import Path

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "django-insecure-vq0@7$5@+(&4j=)ej3)&c47-(u8-w*63&vu%vcjuxybsli$n7t"

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = T
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值