Skip to content

Commit

Permalink
Collect object_types
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenhesselink committed Jun 13, 2024
1 parent dcec791 commit 90a9c35
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions djlsp/scripts/django-collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,19 @@ def get_file_watcher_globs():
return patterns


def get_model_data():
pass


def get_object_types():
models = apps.get_models()
object_types = {}
for model in models:
model_path = model.__module__ + "." + model.__name__
object_types[model_path] = {field.name: None for field in model._meta.fields}
return object_types


def get_static_files():
# TODO: Add option to ignore some static folders
# (like static that is generated with a JS bundler)
Expand Down Expand Up @@ -282,6 +295,7 @@ def collect_project_data():
"urls": get_urls(),
"libraries": get_libraries(),
"templates": get_templates(),
"object_types": get_object_types(),
}


Expand Down

0 comments on commit 90a9c35

Please sign in to comment.