Django materialize css support with some helpful navigation tools.
Project description
# Django Materialize Nav
This library was created to make django work with materializecss. This library primarily focuses on the
navbar and sidebar display and navigation.
See the work_place_things for example usage
## Setup
Install the library.
```python
# project/settings.py
INSTALLED_APPS = [
"materialize_nav",
...
]
# If you want this library to override django form widget templates
INSTALLED_APPS.append('django.forms')
FORM_RENDERER = 'django.forms.renderers.TemplatesSetting'
```
Get the standard context for views
```python
# views.py
from materialize_nav import NavView
class MyView(NavView): # NavView is a simple TemplateView
template_name = "my_page.html"
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
# or
def show_page(request)
context = NavView.get_context(request, title="My Page")
context["object"] = "MyObject"
return render(request, "my_page.html", context)
```
## Basics
This library mostly works with class based views.
This library was created to make django work with materializecss. This library primarily focuses on the
navbar and sidebar display and navigation.
See the work_place_things for example usage
## Setup
Install the library.
```python
# project/settings.py
INSTALLED_APPS = [
"materialize_nav",
...
]
# If you want this library to override django form widget templates
INSTALLED_APPS.append('django.forms')
FORM_RENDERER = 'django.forms.renderers.TemplatesSetting'
```
Get the standard context for views
```python
# views.py
from materialize_nav import NavView
class MyView(NavView): # NavView is a simple TemplateView
template_name = "my_page.html"
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
# or
def show_page(request)
context = NavView.get_context(request, title="My Page")
context["object"] = "MyObject"
return render(request, "my_page.html", context)
```
## Basics
This library mostly works with class based views.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django_materialize_nav-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6438b6616c1d009817598ebc6bd475ac40f39e1080b985fcb241979b4784db68 |
|
MD5 | 0bb96661aea7c08ae7eb6eb89ad58db5 |
|
BLAKE2b-256 | 2b469d9c741ba24fbeb95b2512a7eefe455c5673f954f0b10e27fbca2b920c58 |