Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
djangoldp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
djangoldp-packages
djangoldp
Merge requests
!55
Resolve "Error when a package has no models"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Error when a package has no models"
117-no-models
into
master
Overview
0
Commits
1
Pipelines
1
Changes
2
Merged
Ghost User
requested to merge
117-no-models
into
master
5 years ago
Overview
0
Commits
1
Pipelines
1
Changes
2
Expand
Closes
#117 (closed)
Edited
5 years ago
by
Ghost User
0
0
Merge request reports
Viewing commit
5730dde2
Show latest version
2 files
+
8
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
5730dde2
bugfix: catch and ignore ModuleNotFoundError if models.py does not exists on package
· 5730dde2
Jean-Baptiste
authored
5 years ago
djangoldp/urls.py
+
4
−
1
Options
@@ -20,7 +20,10 @@ urlpatterns = [
]
for
package
in
settings
.
DJANGOLDP_PACKAGES
:
import_module
(
'
{}.models
'
.
format
(
package
))
try
:
import_module
(
'
{}.models
'
.
format
(
package
))
except
ModuleNotFoundError
:
pass
model_classes
=
{
cls
.
__name__
:
cls
for
cls
in
Model
.
__subclasses__
()}
Loading