Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Julien Jerphanion
Rex Dri
Commits
77cb9743
Commit
77cb9743
authored
Feb 08, 2019
by
Florent Chehab
Browse files
Fix bug in userdata not being automatically create in the backend
other fixes and linting
parent
f66bb2b6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
77cb9743
...
...
@@ -8,16 +8,16 @@ build_frontend:
npm run build
test_backend
:
pytest general
/ frontend/ backend/
cd
backend
&&
pytest base_app
/ frontend
_app
/ backend
_app
/
test_backend_server
:
pytest
-n
4
general
/ frontend/ backend/
--cov-report
html
cd
backend
&&
pytest
-n
4
base_app
/ frontend
_app
/ backend
_app
/
--cov-report
html
check_backend
:
./manage.py check
cd
backend
&&
./manage.py check
run_backend
:
./manage.py runserver
cd
backend
&&
./manage.py runserver
docs
:
...
...
backend/backend_app/admin.py
View file @
77cb9743
...
...
@@ -14,7 +14,7 @@ for model in api_config:
if
"model"
in
model
and
model
[
'model'
]:
model
=
DotMap
(
model
)
if
(
not
model
.
requires_testing
)
and
(
not
model
.
ignore_in_admin
):
module
=
importlib
.
import_module
(
"backend_app.models.{}"
.
format
(
model
.
import_location
))
module
=
importlib
.
import_module
(
"backend_app.models.{}"
.
format
(
model
.
import_location
))
if
model
.
versionned
:
VERSIONNED_MODELS
.
append
(
getattr
(
module
,
model
.
model
))
else
:
...
...
backend/backend_app/permissions/__list_user_post_permission.py
View file @
77cb9743
...
...
@@ -12,7 +12,7 @@ for model in api_config:
model
=
DotMap
(
model
)
if
not
model
.
requires_testing
:
if
model
.
viewset
!=
'UserDataViewSet'
:
module
=
importlib
.
import_module
(
"backend_app.models.{}"
.
format
(
model
.
import_location
))
module
=
importlib
.
import_module
(
"backend_app.models.{}"
.
format
(
model
.
import_location
))
ALL_VIEWSETS
[
model
.
viewset
]
=
getattr
(
module
,
model
.
viewset
)
if
settings
.
TESTING
:
...
...
@@ -20,7 +20,7 @@ if settings.TESTING:
model
=
DotMap
(
model
)
if
model
.
requires_testing
:
if
model
.
viewset
!=
'UserDataViewSet'
:
module
=
importlib
.
import_module
(
"backend_app.models.{}"
.
format
(
model
.
import_location
))
module
=
importlib
.
import_module
(
"backend_app.models.{}"
.
format
(
model
.
import_location
))
ALL_VIEWSETS
[
model
.
viewset
]
=
getattr
(
module
,
model
.
viewset
)
...
...
backend/backend_app/urls.py
View file @
77cb9743
...
...
@@ -75,4 +75,4 @@ for Viewset in ALL_VIEWSETS:
for
p
in
DEFAULT_VIEWSET_PERMISSIONS
:
v_p
=
Viewset
.
permission_classes
if
p
not
in
v_p
:
raise
Exception
(
"Permission_classes are not defined correctly in the viewset {}"
.
format
(
str
(
v
iewset
)))
raise
Exception
(
"Permission_classes are not defined correctly in the viewset {}"
.
format
(
str
(
V
iewset
)))
backend/requirements.txt
View file @
77cb9743
#OutGoing_REX
Django==2.0.10
#
psycopg2-binary==2.7.4
psycopg2-binary==2.7.4
git+https://github.com/mingchen/django-cas-ng.git@e9c0472e326087bfb839487f0736a4e1454cffda#egg=django-cas-ng
djangorestframework==3.8.2 # Django REST Framework
coreapi==2.3.3 # Automatic API doc generation
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment