{"id":13813954,"url":"https://github.com/goinnn/django-detect-cyclic","last_synced_at":"2025-03-22T16:30:40.798Z","repository":{"id":3830211,"uuid":"4911273","full_name":"goinnn/django-detect-cyclic","owner":"goinnn","description":"Django detect cyclic","archived":false,"fork":false,"pushed_at":"2015-09-01T12:47:00.000Z","size":5483,"stargazers_count":22,"open_issues_count":6,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T13:32:03.867Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/goinnn.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-07-05T17:04:52.000Z","updated_at":"2021-03-13T18:20:58.000Z","dependencies_parsed_at":"2022-09-02T10:02:11.031Z","dependency_job_id":null,"html_url":"https://github.com/goinnn/django-detect-cyclic","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goinnn%2Fdjango-detect-cyclic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goinnn%2Fdjango-detect-cyclic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goinnn%2Fdjango-detect-cyclic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goinnn%2Fdjango-detect-cyclic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goinnn","download_url":"https://codeload.github.com/goinnn/django-detect-cyclic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244986260,"owners_count":20542983,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T04:01:37.796Z","updated_at":"2025-03-22T16:30:39.856Z","avatar_url":"https://github.com/goinnn.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":".. contents::\n\n====================\nDjango detect cyclic\n====================\n\nApplication to detect cyclic imports.\nWith this application you can analyze the dependence of your applications\n\n.. image:: https://github.com/goinnn/django-detect-cyclic/raw/master/examples/example-only-cyclic-exclude.png\n\nRequeriments\n============\n\n * `python-graph-core \u003chttp://pypi.python.org/pypi/python-graph-core/\u003e`_ (1.8.1)\n * `python-graph-dot \u003chttp://pypi.python.org/pypi/python-graph-dot/\u003e`_ (1.8.1)\n * `pysmell \u003chttp://pypi.python.org/pypi/pysmell/\u003e`_ (0.7.3)\n * `pyplete \u003chttp://pypi.python.org/pypi/pyplete/\u003e`_ (0.0.2)\n * `django-form-admin \u003chttp://pypi.python.org/pypi/django-form-admin\u003e`_ (0.3.2) (optional)\n * `jquery.graphviz \u003chttps://github.com/goinnn/jquery.graphviz/\u003e`_ (fronzen into the app, only to svg-js format)\n\n\nInstallation\n============\n\nIn your settings.py:\n\n::\n\n    INSTALLED_APPS = (\n\n        'django_detect_cyclic',\n\n    )\n\nIn your urls.py:\n\n::\n\n    urlpatterns = patterns('',\n\n        (r'^admin/detect_cyclic/', include('django_detect_cyclic.urls')),\n\n    )\n\nMake sure that you have in your urls jsi18nurl:\n\n::\n\n    js_info_dict = {\n        'packages': ('your.app.package',),\n    }\n\n    urlpatterns = patterns('',\n\n        url(r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict),\n\n    )\n\n\n\nCaption\n=======\n\n * The nodes are applications, or (if you use the option “Show modules”) modules in the applications\n * One edge means that the source node imports from the destination node\n * Every edge of a cycle has the same background color and the label contains “Cycle X”\n * The labels of the edges contain the weight in parentheses\n * If you use the “Show modules” option, each node will have a background color. If two nodes are from the same application, they will have the same background color.\n * If an edge is dotted, every import in the source happens at runtime, whithin the body of a function or method\n\n\nPossibles Errors\n================\n\nIt is possible that the next links are interested if you can some problem:\n\n * http://code.google.com/p/python-graph/issues/detail?id=15\n * http://stackoverflow.com/questions/2133767/using-python-graphviz-importerror-no-module-named-gv\n\nIt is possible that you have to remove the pyc files:\n\n::\n\n    find -iname \"*.pyc\" -exec rm \"{}\" \\;\n\nUsage \n=====\n\nYou have two ways, you can run a command:\n\n::\n\n    python manage.py detect_cyclic\n    python manage.py detect_cyclic --include-apps=\"app1,app6,app7,app11\" --file-name=\"my_graph.svg\" --exclude-packages=\"migrations,templatetags\" --verbosity=2\n    python manage.py detect_cyclic --include-apps=\"app1,app6\" --show-modules --file-name=\"my_graph.svg\" --exclude-packages=\"migrations\" --verbosity=2\n    python manage.py detect_cyclic --include-apps=\"app1,app6\" --only-cyclic --file-name=\"my_graph.svg\" --exclude-packages=\"migrations\" --verbosity=2\n\nOr you can access via web to the wizard:\n\n::\n\n   /admin/detect_cyclic/\n\n\nExamples\n========\n\nTo see more examples click in `examples \u003chttps://github.com/goinnn/django-detect-cyclic/blob/master/EXAMPLES.rst/\u003e`_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoinnn%2Fdjango-detect-cyclic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoinnn%2Fdjango-detect-cyclic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoinnn%2Fdjango-detect-cyclic/lists"}