Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
saxix committed Oct 22, 2024
1 parent 7aa4473 commit 1710b8c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ ENV PATH=/app/.venv/bin:/usr/local/bin/:/usr/bin:/bin \
PYTHONDONTWRITEBYTECODE=1 \
STATIC_URL="/static/" \
PYTHONPATH=""\
PGSSLCERT="/tmp/postgresql.crt" \
UWSGI_PROCESSES=4

RUN <<EOF cat> /RELEASE
{"version": "$VERSION",
"commit": "$GIT_SHA",
Expand Down
2 changes: 2 additions & 0 deletions docker/bin/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ case "$1" in
fi
uwsgi --http :8000 \
--module country_workspace.config.wsgi \
--uid user \
--gid app \
$MAPPING
;;
worker)
Expand Down
4 changes: 1 addition & 3 deletions src/country_workspace/admin/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from django.contrib.admin import site
from django.contrib.auth.models import Permission
from django.contrib.contenttypes.models import ContentType

from smart_admin.smart_auth.admin import ContentTypeAdmin, PermissionAdmin
from smart_admin.smart_auth.admin import ContentTypeAdmin

from .batch import BatchAdmin # noqa
from .household import HouseholdAdmin # noqa
Expand All @@ -15,4 +14,3 @@
from .user import UserAdmin # noqa

site.register(ContentType, admin_class=ContentTypeAdmin)
site.register(Permission, admin_class=PermissionAdmin)
6 changes: 3 additions & 3 deletions src/country_workspace/workspaces/sites.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from typing import Any

from django.apps import apps
from django.contrib import admin
from django.core.exceptions import FieldDoesNotExist, PermissionDenied
from django.db.models import QuerySet
from django.http import Http404, HttpRequest, HttpResponse, HttpResponseRedirect
Expand All @@ -15,7 +16,6 @@
from django.views.decorators.cache import never_cache

from smart_admin.autocomplete import SmartAutocompleteJsonView
from smart_admin.site import SmartAdminSite

from .forms import SelectTenantForm, TenantAuthenticationForm
from .utils import get_selected_tenant, is_tenant_valid, set_selected_tenant
Expand Down Expand Up @@ -113,8 +113,8 @@ def _view_wrapper(request: HttpRequest, *args, **kwargs):
return wraps(view_func)(_view_wrapper)


class TenantAdminSite(SmartAdminSite):
# class TenantAdminSite(admin.AdminSite):
# class TenantAdminSite(SmartAdminSite):
class TenantAdminSite(admin.AdminSite):
enable_nav_sidebar = False
index_template = "workspace/index.html"
app_index_template = "workspace/app_index.html"
Expand Down

0 comments on commit 1710b8c

Please sign in to comment.