Skip to content
This repository was archived by the owner on Apr 16, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,28 @@ pip install -e git+https://github.com/meshy/django-conman.git#egg=conman
## Configure
```python
# settings.py
INSTALLED_APPS += ['conman.nav_tree']
INSTALLED_APPS += ['conman.routes']

# urls.py
urlpatterns = [
# All other URLS should go above this catch-all.
url(r'', include('conman.nav_tree.urls')),
url(r'', include('conman.routes.urls')),
]
```

## Basic custom app
```python
# models.py
class ExampleNode(conman.nav_tree.models.Node):
class ExampleRoute(conman.routes.models.Route):
handler = ExampleHandler.path()
# Your data/fields here

# handlers.py
class ExampleHandler(conman.nav_tree.handlers.SimpleHandler):
view = ExampleNodeDetail.as_view()
class ExampleHandler(conman.routes.handlers.SimpleHandler):
view = ExampleRouteDetail.as_view()

# views.py
class ExampleNodeDetail(django.views.generic.DetailView):
class ExampleRouteDetail(django.views.generic.DetailView):
def get_object(self):
return self.kwargs['node']
return self.kwargs['route']
```
24 changes: 0 additions & 24 deletions conman/nav_tree/tests/factories.py

This file was deleted.

Loading