Porównaj commity

...

3 Commity

Autor SHA1 Wiadomość Data
sag​e 21917ec565
Merge 06961992d8 into afc8cf42a2 2024-05-02 06:42:54 +10:00
Storm B. Heg afc8cf42a2 Bump to Wagtail 6.1 2024-05-02 06:42:33 +10:00
Timothy Elems dc5639c663 Use bash highlighting for code blocks and add note about 'cp' command (#482)
Fixes #390
2024-04-29 15:39:30 +01:00
3 zmienionych plików z 30 dodań i 22 usunięć

Wyświetl plik

@ -5,7 +5,9 @@ agree to abide by the Wagtail [code of conduct](https://github.com/wagtail/wagta
If you do not have write access to the repo, fork, then clone the repo:
git clone git@github.com:your-username/bakerydemo.git
```bash
git clone git@github.com:your-username/bakerydemo.git
```
Set up your machine for [development](https://github.com/wagtail/bakerydemo/blob/master/readme.md).

Wyświetl plik

@ -133,35 +133,41 @@ You can run the Wagtail demo locally without setting up Vagrant or Docker and si
With [PIP](https://github.com/pypa/pip) and [virtualenvwrapper](https://virtualenvwrapper.readthedocs.io/en/latest/)
installed, run:
mkvirtualenv wagtailbakerydemo
python --version
```bash
mkvirtualenv wagtailbakerydemo
python --version
```
Confirm that this is showing a compatible version of Python 3.x. If not, and you have multiple versions of Python installed on your system, you may need to specify the appropriate version when creating the virtualenv:
deactivate
rmvirtualenv wagtailbakerydemo
mkvirtualenv wagtailbakerydemo --python=python3.9
python --version
```bash
deactivate
rmvirtualenv wagtailbakerydemo
mkvirtualenv wagtailbakerydemo --python=python3.9
python --version
```
Now we're ready to set up the bakery demo project itself:
cd ~/dev [or your preferred dev directory]
git clone https://github.com/wagtail/bakerydemo.git
cd bakerydemo
pip install -r requirements/development.txt
```bash
cd ~/dev [or your preferred dev directory]
git clone https://github.com/wagtail/bakerydemo.git
cd bakerydemo
pip install -r requirements/development.txt
```
Next, we'll set up our local environment variables. We use [django-dotenv](https://github.com/jpadilla/django-dotenv)
to help with this. It reads environment variables located in a file name `.env` in the top level directory of the project. The only variable we need to start is `DJANGO_SETTINGS_MODULE`:
cp bakerydemo/settings/local.py.example bakerydemo/settings/local.py
cp .env.example .env
```bash
cp bakerydemo/settings/local.py.example bakerydemo/settings/local.py
cp .env.example .env
# `cp` is used for bash. Windows Command Prompt uses `copy`
```
To set up your database and load initial data, run the following commands:
./manage.py migrate
./manage.py load_initial_data
./manage.py runserver
```bash
./manage.py migrate
./manage.py load_initial_data
./manage.py runserver
```
Log into the admin with the credentials `admin / changeme`.

Wyświetl plik

@ -1,6 +1,6 @@
Django>=4.2,<5.0
django-dotenv==1.4.2
wagtail>=6.0,<6.1
wagtail>=6.1,<6.2
wagtail-font-awesome-svg>=1,<2
django-debug-toolbar>=4.2,<5
django-extensions==3.2.3