-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
27 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,32 @@ | ||
from django.apps import AppConfig | ||
from django.urls import path, include | ||
|
||
|
||
class TomTnsConfig(AppConfig): | ||
default_auto_field = 'django.db.models.BigAutoField' | ||
name = 'tom_tns' | ||
integration_points = {'target_detail_button': {'namespace': 'tns:report-tns', | ||
'title': 'TNS', | ||
'class': 'btn btn-info', | ||
'text': 'TNS', | ||
} | ||
} | ||
|
||
def target_detail_buttons(self): | ||
""" | ||
Integration point for adding buttons to the target detail view. | ||
This method should return a list of dictionaries, each containing the keys: | ||
- 'namespace': The namespace of the app that provides the button's view | ||
- 'title': The title of the button | ||
- 'class': The CSS class of the button | ||
- 'text': The text of the button | ||
""" | ||
return {'namespace': 'tns:report-tns', | ||
'title': 'TNS', | ||
'class': 'btn btn-info', | ||
'text': 'TNS', | ||
} | ||
|
||
def include_url_paths(self): | ||
""" | ||
Integration point for adding URL patterns to the Tom Common URL configuration. | ||
This method should return a list of URL patterns to be included in the main URL configuration. | ||
""" | ||
urlpatterns = [ | ||
path('tns/', include('tom_tns.urls', namespace='tns')) | ||
] | ||
return urlpatterns |