This repository has been archived by the owner on Aug 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Work toward a major update to improve docs, add hooks, and improve va…
…lidation
- Loading branch information
Showing
15 changed files
with
651 additions
and
578 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve the package | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Browser (please complete the following information):** | ||
- Type [e.g. chrome, safari, etc] | ||
- Version [e.g. 22] | ||
|
||
**Database (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- Database Version [e.g. 22] | ||
- Running local, remote (e.g. DBaaS), or locally with provided docker-compose | ||
- OS running on: [e.g. Ubuntu 20.04] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Django CI | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
black: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
- uses: actions/checkout@v3 | ||
- run: python -m pip install black | ||
- run: black -l 119 --check --diff . | ||
|
||
isort: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
- uses: actions/checkout@v3 | ||
- run: python -m pip install isort | ||
- run: isort --profile=black --line-length=119 . | ||
|
||
flake8: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
- uses: actions/checkout@v3 | ||
- run: python -m pip install flake8 | ||
- run: flake8 --max-line-length=119 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from django.conf import settings | ||
from django.db.models.base import ModelBase | ||
|
||
|
||
# There is likely no reason ever to change the model base, but it is provided as an setting | ||
# here for completeness. | ||
LOV_MODEL_BASE = getattr(settings, 'LOV_MODEL_BASE', ModelBase) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,22 @@ | ||
class ModelClassParsingError(Exception): | ||
""" | ||
Used when a model class cannot be parsed from the value provided | ||
""" | ||
pass | ||
"""Used when a model class cannot be parsed from the value provided.""" | ||
|
||
def __init__(self, message="Model class cannot be parsed from the value provided"): | ||
self.message = message | ||
super().__init__(self.message) | ||
|
||
|
||
class IncorrectSubclassError(Exception): | ||
""" | ||
Used when the value of `lov_value_model` is not a subclass of the correct abstract model | ||
""" | ||
pass | ||
"""Used when the value of `lov_value_model` is not a subclass of the correct abstract model.""" | ||
|
||
def __init__(self, message="Incorrect subclass usage for lov_value_model"): | ||
self.message = message | ||
super().__init__(self.message) | ||
|
||
|
||
class NoTenantProvidedFromViewError(Exception): | ||
"""Used when a view does not pass an lov_tenant instance from the view to a form.""" | ||
|
||
class NoEntityProvidedFromViewError(Exception): | ||
""" | ||
Used when a view does not pass an lov_entity instance from the view to a form | ||
""" | ||
pass | ||
def __init__(self, message="The view did not pass an lov_tenant instance to the form"): | ||
self.message = message | ||
super().__init__(self.message) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.