This repository has been archived by the owner on Mar 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #317 from scaleoutsystems/feature/subtree_pull
Pull in changes from git subtrees
- Loading branch information
Showing
41 changed files
with
1,738 additions
and
894 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
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,17 +1,15 @@ | ||
from django.contrib import admin | ||
|
||
from .models import ( | ||
AppCategories, | ||
AppInstance, | ||
AppPermission, | ||
Apps, | ||
AppStatus, | ||
ResourceData, | ||
) | ||
from .models import AppCategories, AppInstance, Apps, AppStatus, ResourceData | ||
|
||
admin.site.register(Apps) | ||
|
||
class AppsAdmin(admin.ModelAdmin): | ||
list_display = ("name", "user_can_create", "slug", "revision") | ||
list_filter = ("user_can_create",) | ||
|
||
|
||
admin.site.register(Apps, AppsAdmin) | ||
admin.site.register(AppInstance) | ||
admin.site.register(AppCategories) | ||
admin.site.register(AppPermission) | ||
admin.site.register(ResourceData) | ||
admin.site.register(AppStatus) |
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,22 @@ | ||
from django.conf import settings | ||
|
||
|
||
def get_apps_limit_per_user(slug): | ||
"""get_apps_limit_per_user | ||
Args: | ||
slug (App.slug): slug for the app type | ||
Returns: | ||
Integer or None: returns the limit or None if not set | ||
""" | ||
try: | ||
apps_per_user_limit = ( | ||
settings.APPS_PER_USER_LIMIT | ||
if settings.APPS_PER_USER_LIMIT is not None | ||
else {} | ||
) | ||
except Exception: | ||
apps_per_user_limit = {} | ||
|
||
return apps_per_user_limit[slug] if slug in apps_per_user_limit else None |
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,16 @@ | ||
# Generated by Django 4.1.7 on 2023-03-14 13:26 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('apps', '0002_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.DeleteModel( | ||
name='AppPermission', | ||
), | ||
] |
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
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
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.