Skip to content

Commit

Permalink
Much UI/UX work, a few enhancements to Medical
Browse files Browse the repository at this point in the history
  • Loading branch information
leethobbit committed Oct 31, 2024
1 parent fc3656b commit 8dc00dc
Show file tree
Hide file tree
Showing 162 changed files with 812 additions and 433 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// For format details, see https://containers.dev/implementors/json_reference/
{
"name": "dragonroost_ng_dev",
"name": "dragonroost_dev",
"dockerComposeFile": [
"../docker-compose.local.yml"
],
Expand Down
2 changes: 1 addition & 1 deletion .envs/.local/.postgres
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
# ------------------------------------------------------------------------------
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
POSTGRES_DB=dragonroost_ng
POSTGRES_DB=dragonroost
POSTGRES_USER=ZGpvJWfReKDZrRIjSLbKieFgZAaJhXtt
POSTGRES_PASSWORD=MFkCCANfU0UaOpjNHahUizbZ42kgf6CV8dvvmB11WCwsmg1iwAxzvBytIjLy6jCK
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ tags
dump.rdb

### Project template
dragonroost_ng/media/
dragonroost/media/

.pytest_cache/
.ipython/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ For convenience, you can keep your normal user logged in on Chrome and your supe

Running type checks with mypy:

$ mypy dragonroost_ng
$ mypy dragonroost

### Test coverage

Expand Down
32 changes: 19 additions & 13 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import environ

BASE_DIR = Path(__file__).resolve(strict=True).parent.parent.parent
# dragonroost_ng/
APPS_DIR = BASE_DIR / "dragonroost_ng"
# dragonroost/
APPS_DIR = BASE_DIR / "dragonroost"
env = environ.Env()

READ_DOT_ENV_FILE = env.bool("DJANGO_READ_DOT_ENV_FILE", default=False)
Expand Down Expand Up @@ -84,11 +84,11 @@
]

LOCAL_APPS = [
"dragonroost_ng.users",
"dragonroost_ng.animals",
"dragonroost_ng.business",
"dragonroost_ng.medical",
"dragonroost_ng.people",
"dragonroost.users",
"dragonroost.animals",
"dragonroost.business",
"dragonroost.medical",
"dragonroost.people",
# Your stuff: custom apps go here
]
# https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps
Expand All @@ -97,7 +97,7 @@
# MIGRATIONS
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#migration-modules
MIGRATION_MODULES = {"sites": "dragonroost_ng.contrib.sites.migrations"}
MIGRATION_MODULES = {"sites": "dragonroost.contrib.sites.migrations"}

# AUTHENTICATION
# ------------------------------------------------------------------------------
Expand Down Expand Up @@ -193,7 +193,7 @@
"django.template.context_processors.static",
"django.template.context_processors.tz",
"django.contrib.messages.context_processors.messages",
"dragonroost_ng.users.context_processors.allauth_settings",
"dragonroost.users.context_processors.allauth_settings",
],
},
},
Expand Down Expand Up @@ -276,14 +276,20 @@
# https://docs.allauth.org/en/latest/account/configuration.html
ACCOUNT_EMAIL_VERIFICATION = "optional"
# https://docs.allauth.org/en/latest/account/configuration.html
ACCOUNT_ADAPTER = "dragonroost_ng.users.adapters.AccountAdapter"
ACCOUNT_ADAPTER = "dragonroost.users.adapters.AccountAdapter"
# https://docs.allauth.org/en/latest/account/forms.html
ACCOUNT_FORMS = {"signup": "dragonroost_ng.users.forms.UserSignupForm"}
ACCOUNT_FORMS = {"signup": "dragonroost.users.forms.UserSignupForm"}
# https://docs.allauth.org/en/latest/socialaccount/configuration.html
SOCIALACCOUNT_ADAPTER = "dragonroost_ng.users.adapters.SocialAccountAdapter"
SOCIALACCOUNT_ADAPTER = "dragonroost.users.adapters.SocialAccountAdapter"
# https://docs.allauth.org/en/latest/socialaccount/configuration.html
SOCIALACCOUNT_FORMS = {"signup": "dragonroost_ng.users.forms.UserSocialSignupForm"}
SOCIALACCOUNT_FORMS = {"signup": "dragonroost.users.forms.UserSocialSignupForm"}


# Your stuff...
# ------------------------------------------------------------------------------
BOOTSTRAP5 = {
"error_css_class": "django_bootstrap5-error",
"required_css_class": "django_bootstrap5-required",
"javascript_in_head": True,
"theme_url": "https://bootswatch.com/5/minty/bootstrap.css", # Other options are minty, quartz, solar
}
10 changes: 5 additions & 5 deletions config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
# Django Admin, use {% url 'admin:index' %}
path(settings.ADMIN_URL, admin.site.urls),
# User management
path("users/", include("dragonroost_ng.users.urls", namespace="users")),
path("users/", include("dragonroost.users.urls", namespace="users")),
path("accounts/", include("allauth.urls")),
# Your stuff: custom urls includes go here
path("animals/", include("dragonroost_ng.animals.urls", namespace="animals")),
path("business/", include("dragonroost_ng.business.urls", namespace="business")),
path("medical", include("dragonroost_ng.medical.urls", namespace="medical")),
path("people/", include("dragonroost_ng.people.urls", namespace="people")),
path("animals/", include("dragonroost.animals.urls", namespace="animals")),
path("business/", include("dragonroost.business.urls", namespace="business")),
path("medical", include("dragonroost.medical.urls", namespace="medical")),
path("people/", include("dragonroost.people.urls", namespace="people")),
# Media files
*static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT),
]
Expand Down
4 changes: 2 additions & 2 deletions config/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
from django.core.wsgi import get_wsgi_application

# This allows easy placement of apps within the interior
# dragonroost_ng directory.
# dragonroost directory.
BASE_DIR = Path(__file__).resolve(strict=True).parent.parent
sys.path.append(str(BASE_DIR / "dragonroost_ng"))
sys.path.append(str(BASE_DIR / "dragonroost"))
# We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks
# if running multiple sites in the same mod_wsgi process. To fix this, use
# mod_wsgi daemon mode with each site in its own daemon process, or use
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.docs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
docs:
image: dragonroost_ng_local_docs
container_name: dragonroost_ng_local_docs
image: dragonroost_local_docs
container_name: dragonroost_local_docs
build:
context: .
dockerfile: ./compose/local/docs/Dockerfile
Expand All @@ -10,7 +10,7 @@ services:
volumes:
- ./docs:/docs:z
- ./config:/app/config:z
- ./dragonroost_ng:/app/dragonroost_ng:z
- ./dragonroost:/app/dragonroost:z
ports:
- '9000:9000'
command: /start-docs
16 changes: 8 additions & 8 deletions docker-compose.local.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
volumes:
dragonroost_ng_local_postgres_data: {}
dragonroost_ng_local_postgres_data_backups: {}
dragonroost_local_postgres_data: {}
dragonroost_local_postgres_data_backups: {}


services:
django:
build:
context: .
dockerfile: ./compose/local/django/Dockerfile
image: dragonroost_ng_local_django
container_name: dragonroost_ng_local_django
image: dragonroost_local_django:develop
container_name: dragonroost_local_django
depends_on:
- postgres
volumes:
Expand All @@ -25,10 +25,10 @@ services:
build:
context: .
dockerfile: ./compose/production/postgres/Dockerfile
image: dragonroost_ng_production_postgres
container_name: dragonroost_ng_local_postgres
image: dragonroost_production_postgres:latest
container_name: dragonroost_local_postgres
volumes:
- dragonroost_ng_local_postgres_data:/var/lib/postgresql/data
- dragonroost_ng_local_postgres_data_backups:/backups
- dragonroost_local_postgres_data:/var/lib/postgresql/data
- dragonroost_local_postgres_data_backups:/backups
env_file:
- ./.envs/.local/.postgres
6 changes: 3 additions & 3 deletions docker-compose.production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
context: .
dockerfile: ./compose/production/django/Dockerfile

image: dragonroost_ng_production_django
image: dragonroost_production_django
depends_on:
- postgres
- redis
Expand All @@ -24,7 +24,7 @@ services:
build:
context: .
dockerfile: ./compose/production/postgres/Dockerfile
image: dragonroost_ng_production_postgres
image: dragonroost_production_postgres
volumes:
- production_postgres_data:/var/lib/postgresql/data
- production_postgres_data_backups:/backups
Expand All @@ -35,7 +35,7 @@ services:
build:
context: .
dockerfile: ./compose/production/traefik/Dockerfile
image: dragonroost_ng_production_traefik
image: dragonroost_production_traefik
depends_on:
- django
volumes:
Expand Down
2 changes: 1 addition & 1 deletion docs/howto.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ How To - Project Documentation
Get Started
----------------------------------------------------------------------

Documentation can be written as rst files in `dragonroost_ng/docs`.
Documentation can be written as rst files in `dragonroost/docs`.


To build and serve docs, use the commands::
Expand Down
2 changes: 1 addition & 1 deletion docs/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if "%SPHINXBUILD%" == "" (
)
set SOURCEDIR=_source
set BUILDDIR=_build
set APP=..\dragonroost_ng
set APP=..\dragonroost

if "%1" == "" goto html

Expand Down
2 changes: 1 addition & 1 deletion docs/users.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ even if the default User model is sufficient for you.
This model behaves identically to the default user model,
but you’ll be able to customize it in the future if the need arises.

.. automodule:: dragonroost_ng.users.models
.. automodule:: dragonroost.users.models
:members:
:noindex:

File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

class AnimalsConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "dragonroost_ng.animals"
name = "dragonroost.animals"
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from django.db.models import Q
from django.forms import TextInput

from dragonroost_ng.animals.models import Animal
from dragonroost_ng.animals.models import Species
from dragonroost.animals.models import Animal
from dragonroost.animals.models import Species


class AnimalSearchInput(TextInput):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django import forms

from dragonroost_ng.animals.models import MedicalRecord
from dragonroost.animals.models import MedicalRecord


class MedicalRecordForm(forms.ModelForm):
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from django.db import models
from django.urls import reverse

from dragonroost_ng.business.models import Location
from dragonroost_ng.people.models import Person
from dragonroost.business.models import Location
from dragonroost.people.models import Person


# Create your models here.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import django_tables2 as tables
from django.utils.html import format_html

from dragonroost_ng.animals.models import Animal
from dragonroost_ng.animals.models import Species
from dragonroost.animals.models import Animal
from dragonroost.animals.models import Species


def get_status_attr(record):
Expand Down
File renamed without changes.
28 changes: 14 additions & 14 deletions dragonroost_ng/animals/urls.py → dragonroost/animals/urls.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
from django.urls import path

from dragonroost_ng.animals.views import AnimalCreateView
from dragonroost_ng.animals.views import AnimalDeleteView
from dragonroost_ng.animals.views import AnimalDetailView
from dragonroost_ng.animals.views import AnimalOutcomeView
from dragonroost_ng.animals.views import AnimalUpdateView
from dragonroost_ng.animals.views import HTMxAnimalTableDisplayView
from dragonroost_ng.animals.views import HTMxAnimalTableSearchView
from dragonroost_ng.animals.views import MedicalRecordCreateView
from dragonroost_ng.animals.views import MedicalRecordDeleteView
from dragonroost_ng.animals.views import SpeciesCreateView
from dragonroost_ng.animals.views import SpeciesDeleteView
from dragonroost_ng.animals.views import SpeciesDetailView
from dragonroost_ng.animals.views import SpeciesListView
from dragonroost_ng.animals.views import SpeciesUpdateView
from dragonroost.animals.views import AnimalCreateView
from dragonroost.animals.views import AnimalDeleteView
from dragonroost.animals.views import AnimalDetailView
from dragonroost.animals.views import AnimalOutcomeView
from dragonroost.animals.views import AnimalUpdateView
from dragonroost.animals.views import HTMxAnimalTableDisplayView
from dragonroost.animals.views import HTMxAnimalTableSearchView
from dragonroost.animals.views import MedicalRecordCreateView
from dragonroost.animals.views import MedicalRecordDeleteView
from dragonroost.animals.views import SpeciesCreateView
from dragonroost.animals.views import SpeciesDeleteView
from dragonroost.animals.views import SpeciesDetailView
from dragonroost.animals.views import SpeciesListView
from dragonroost.animals.views import SpeciesUpdateView

app_name = "animals" # This is for namespacing the URLs later

Expand Down
18 changes: 9 additions & 9 deletions dragonroost_ng/animals/views.py → dragonroost/animals/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
from django_filters.views import FilterView
from django_tables2 import SingleTableMixin

from dragonroost_ng.animals.filters import AnimalFilter
from dragonroost_ng.animals.filters import SpeciesFilter
from dragonroost_ng.animals.forms import MedicalRecordForm
from dragonroost_ng.animals.models import Animal
from dragonroost_ng.animals.models import MedicalRecord
from dragonroost_ng.animals.models import Species
from dragonroost_ng.animals.tables import AnimalTable
from dragonroost_ng.animals.tables import SpeciesTable
from dragonroost_ng.mixins import PageTitleViewMixin
from dragonroost.animals.filters import AnimalFilter
from dragonroost.animals.filters import SpeciesFilter
from dragonroost.animals.forms import MedicalRecordForm
from dragonroost.animals.models import Animal
from dragonroost.animals.models import MedicalRecord
from dragonroost.animals.models import Species
from dragonroost.animals.tables import AnimalTable
from dragonroost.animals.tables import SpeciesTable
from dragonroost.mixins import PageTitleViewMixin


class HTMxAnimalTableDisplayView(
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

class BusinessConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "dragonroost_ng.business"
name = "dragonroost.business"
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django.db import models

from dragonroost_ng.people.models import Person
from dragonroost.people.models import Person


# Create your models here.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import django_tables2 as tables

from dragonroost_ng.business.models import Location
from dragonroost_ng.business.models import Meeting
from dragonroost.business.models import Location
from dragonroost.business.models import Meeting


class LocationListTable(tables.Table):
Expand Down
File renamed without changes.
18 changes: 9 additions & 9 deletions dragonroost_ng/business/urls.py → dragonroost/business/urls.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
from django.urls import path

from dragonroost_ng.business.views import LocationCreateView
from dragonroost_ng.business.views import LocationDeleteView
from dragonroost_ng.business.views import LocationDetailView
from dragonroost_ng.business.views import LocationListView
from dragonroost_ng.business.views import LocationUpdateView
from dragonroost_ng.business.views import MeetingCreateView
from dragonroost_ng.business.views import MeetingDeleteView
from dragonroost_ng.business.views import MeetingListView
from dragonroost_ng.business.views import MeetingUpdateView
from dragonroost.business.views import LocationCreateView
from dragonroost.business.views import LocationDeleteView
from dragonroost.business.views import LocationDetailView
from dragonroost.business.views import LocationListView
from dragonroost.business.views import LocationUpdateView
from dragonroost.business.views import MeetingCreateView
from dragonroost.business.views import MeetingDeleteView
from dragonroost.business.views import MeetingListView
from dragonroost.business.views import MeetingUpdateView

app_name = "business" # This is for namespacing the URLs later

Expand Down
Loading

0 comments on commit 8dc00dc

Please sign in to comment.