Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1.02 KB

README.md

File metadata and controls

44 lines (30 loc) · 1.02 KB

GitHub license

MDC for Django

MDC for Django provides a helper to use Material Companent for the Web with Django application.

MDC for Django includes following components:

  • Custom widgets for using on django form
  • Custom tags
  • Stylesheets

Installation

First, create your django application.

$ python -m django-admin startproject your-project-name

Then add MDC for Django to your application

$ cd your-project-name
$ git clone https://github.com/YuoMamoru/mdc-for-django.git mdc

Usage of widgets on form

Just use mdc.forms instead of django.forms.

from mdc import forms

class CustomForm(forms.Form):
    field1 = forms.CharField(
        max_length=127,
        required=False,
        widget=forms.TextInput,
    )

Note: Please replace the mdc part in accordance with your cloned directory name.