Skip to content

Commit

Permalink
Example app
Browse files Browse the repository at this point in the history
  • Loading branch information
dyve committed Jun 3, 2023
1 parent f6b44ea commit 6ad09c9
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 10 deletions.
4 changes: 4 additions & 0 deletions Makefile
Expand Up @@ -20,6 +20,10 @@ lint:
docs:
hatch run docs:build

.PHONY: example
example:
hatch run example:runserver

.PHONY: porcelain
porcelain:
ifeq ($(shell git status --porcelain),)
Expand Down
16 changes: 8 additions & 8 deletions README.md
Expand Up @@ -23,7 +23,7 @@

Install using pip.

```shell
```console
pip install django-icons
```

Expand Down Expand Up @@ -82,32 +82,32 @@ See "Supported Versions" on <https://www.djangoproject.com/download/>.

To clone the repository and install the requirements for local development:

```shell
```console
$ git clone git://github.com/zostera/django-icons.git
$ cd django-icons
$ pip install -e .
$ pip install -U pip -r requirements-dev.txt
```

### Running the demo
## Example app

You can run the example app:
An example app is provided in the folder `example`. You can run the example app with this command:

```shell
cd example && run python manage.py runserver
```console
make example
```

### Running the tests

The test suite requires [tox](https://tox.readthedocs.io/) to be installed. Run the complete test suite like this:

```shell
```console
tox
```

Test for the current environment can be run with the Django `manage.py` command.

```shell
```console
python manage.py test
```

Expand Down
4 changes: 2 additions & 2 deletions example/README.md
Expand Up @@ -6,7 +6,7 @@ This example project only supports the latest version of Django.

To run the example:

```bash
```console
git clone https://github.com/zostera/django-icons.git

cd django-icons/example
Expand All @@ -15,4 +15,4 @@ python manage.py migrate
python manage.py runserver
```

Server should be live at http://127.0.0.1:8000/ now.
Server should be live at http://127.0.0.1:8000/ now.
12 changes: 12 additions & 0 deletions pyproject.toml
Expand Up @@ -90,6 +90,18 @@ matrix.django.dependencies = [
{value = "django @ git+https://github.com/django/django.git", if = ["main"]},
]

[tool.hatch.envs.example]
python = "3.11"
template = "example"
dependencies = [
"django>=3.2",
]

[tool.hatch.envs.example.scripts]
runserver = [
"cd example && python manage.py migrate && python manage.py runserver",
]

[tool.hatch.envs.docs]
dependencies = [
"sphinx>=7.0.1",
Expand Down

0 comments on commit 6ad09c9

Please sign in to comment.