Loading mediatheque/settings.py +1 −1 Original line number Diff line number Diff line Loading @@ -94,7 +94,7 @@ CORS_ALLOW_HEADERS = [ "X-file-hash", "X-file-name", "X-origin-dir", "X-Project" "X-Project", ] ROOT_URLCONF = "mediatheque.urls" Loading resources/migrations/0020_project_admin_mail.py +3 −3 Original line number Diff line number Diff line Loading @@ -6,13 +6,13 @@ from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('resources', '0019_alter_collection_project'), ("resources", "0019_alter_collection_project"), ] operations = [ migrations.AddField( model_name='project', name='admin_mail', model_name="project", name="admin_mail", field=models.EmailField(max_length=254, null=True), ), ] rpc/management/commands/genserverproxy.py 0 → 100644 +44 −0 Original line number Diff line number Diff line from django.core.management.base import BaseCommand, CommandError from rpc import methods from inspect import getmembers, isfunction, signature TPL = ''' @_rpc_groups({}) def {}{}: """ {} """ _jama_api_key = APIKey.objects.filter(user=user).first() jama = JamaClient(settings.ATLAS_JAMA_RPC_ENDPOINT, _jama_api_key) return jama.{}({}) ''' class Command(BaseCommand): def handle(self, *args, **options): signatures = {} for fn_name, _ in getmembers(methods, isfunction): signatures[fn_name] = getattr(methods, fn_name) for key in sorted(signatures.keys()): if key[0:1] == "_": continue sign = signature(getattr(methods, key)) keep_params = [] for param in list(sign.parameters.items())[1:]: keep_params.append(param[0]) shortened_signature = ( str(sign) .replace("user: django.contrib.auth.models.User", "user: User") .replace("NoneType", "None") ) print( TPL.format( getattr(methods, key).rpc_groups, key, shortened_signature, getattr(methods, key).__doc__.strip(), key, ", ".join(keep_params), ) ) vuejama/apps.py +1 −1 Original line number Diff line number Diff line Loading @@ -2,4 +2,4 @@ from django.apps import AppConfig class VuejamaConfig(AppConfig): name = 'vuejama' name = "vuejama" Loading
mediatheque/settings.py +1 −1 Original line number Diff line number Diff line Loading @@ -94,7 +94,7 @@ CORS_ALLOW_HEADERS = [ "X-file-hash", "X-file-name", "X-origin-dir", "X-Project" "X-Project", ] ROOT_URLCONF = "mediatheque.urls" Loading
resources/migrations/0020_project_admin_mail.py +3 −3 Original line number Diff line number Diff line Loading @@ -6,13 +6,13 @@ from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('resources', '0019_alter_collection_project'), ("resources", "0019_alter_collection_project"), ] operations = [ migrations.AddField( model_name='project', name='admin_mail', model_name="project", name="admin_mail", field=models.EmailField(max_length=254, null=True), ), ]
rpc/management/commands/genserverproxy.py 0 → 100644 +44 −0 Original line number Diff line number Diff line from django.core.management.base import BaseCommand, CommandError from rpc import methods from inspect import getmembers, isfunction, signature TPL = ''' @_rpc_groups({}) def {}{}: """ {} """ _jama_api_key = APIKey.objects.filter(user=user).first() jama = JamaClient(settings.ATLAS_JAMA_RPC_ENDPOINT, _jama_api_key) return jama.{}({}) ''' class Command(BaseCommand): def handle(self, *args, **options): signatures = {} for fn_name, _ in getmembers(methods, isfunction): signatures[fn_name] = getattr(methods, fn_name) for key in sorted(signatures.keys()): if key[0:1] == "_": continue sign = signature(getattr(methods, key)) keep_params = [] for param in list(sign.parameters.items())[1:]: keep_params.append(param[0]) shortened_signature = ( str(sign) .replace("user: django.contrib.auth.models.User", "user: User") .replace("NoneType", "None") ) print( TPL.format( getattr(methods, key).rpc_groups, key, shortened_signature, getattr(methods, key).__doc__.strip(), key, ", ".join(keep_params), ) )
vuejama/apps.py +1 −1 Original line number Diff line number Diff line Loading @@ -2,4 +2,4 @@ from django.apps import AppConfig class VuejamaConfig(AppConfig): name = 'vuejama' name = "vuejama"