openedx/openedx-platform

cleanup direct model imports from certificates djangoapp

開放

#36,647 建立於 2025年5月1日

 (4 則留言) (0 個反應) (1 位負責人)Python (4,331 個分叉)auto 404
good first issuehelp wanted

倉庫指標

星標
 (8,150 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

There are a small number of direct imports from the certificates djangoapp's models.py. Wherever possible, we want to use the app's API) or data classes for use outside of the certificates app itself.

As of this writing, this appears to be all imports of the app that are not from api.py, data.py, test factories, the signals, or an exception definition:

the majority of them appear to be in legacy front-ends, unsurprisingly.

Acceptance Criteria

  • create any necessary data classes to get rid of direct imports of lms.djangoapps.certificates.models from outside the django app
  • change the code to reference the appropriate data class or API method
  • if it is difficult, costly, or impossible to make the change, consider adding a comment explaining why
  • verify that all the affected apps still work properly, and that all the tests pass

貢獻者指南