All Projects → ooknosi → django_material_widgets

ooknosi / django_material_widgets

Licence: Apache-2.0 license
Django widgets styled with Material Components for the Web

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to django material widgets

aurelia-mdc-web
Aurelia wrapper for Material Design (Web) Components
Stars: ✭ 43 (+79.17%)
Mutual labels:  material-components, material-components-web
material
🎨 Materialize your forum with this Flarum extension that uses the latest guidelines.
Stars: ✭ 14 (-41.67%)
Mutual labels:  material-components, material-components-web
preact-mdc
material design components for preact using material-components-web sass styles (for live demo click the link below)
Stars: ✭ 23 (-4.17%)
Mutual labels:  material-components, material-components-web
elm-mwc
Experimental Elm bindings to Material Components for the Web Webcomponents library
Stars: ✭ 15 (-37.5%)
Mutual labels:  material-components, material-components-web
Material Components Web
Modular and customizable Material Design UI components for the web
Stars: ✭ 15,931 (+66279.17%)
Mutual labels:  material-components
Material Components Android
Modular and customizable Material Design UI components for Android
Stars: ✭ 13,128 (+54600%)
Mutual labels:  material-components
Materialnavigationview Android
📱 Android Library to implement Rich, Beautiful, Stylish 😍 Material Navigation View for your project with Material Design Guidelines. Easy to use.
Stars: ✭ 168 (+600%)
Mutual labels:  material-components
Material Components Web React
Material Components for React (MDC React)
Stars: ✭ 1,937 (+7970.83%)
Mutual labels:  material-components
Newsster
Android App using Paging3, Hilt, Coroutines, Flow, Jetpack, MVVM architecture.
Stars: ✭ 147 (+512.5%)
Mutual labels:  material-components
Photos
No description or website provided.
Stars: ✭ 74 (+208.33%)
Mutual labels:  material-components
Grocy Android
ERP beyond your fridge, now on your phone – An awesome companion app for Grocy
Stars: ✭ 227 (+845.83%)
Mutual labels:  material-components
Ui Material Components
Monorepo that contains all of the NativeScript Material Design plugins.
Stars: ✭ 170 (+608.33%)
Mutual labels:  material-components
react-native-button-toggle-group
An animated button toggle group for React Native
Stars: ✭ 44 (+83.33%)
Mutual labels:  material-components
Materialdesign2
A beautiful app designed with Material Design 2 using Android X.
Stars: ✭ 170 (+608.33%)
Mutual labels:  material-components
QaterialGallery
🖼️ Qaterial Library Showcase.
Stars: ✭ 85 (+254.17%)
Mutual labels:  material-components
Material Components Flutter Codelabs
Codelabs for Material Components for Flutter (MDC-Flutter)
Stars: ✭ 165 (+587.5%)
Mutual labels:  material-components
Material Backdrop
A simple solution for implementing Backdrop pattern for Android
Stars: ✭ 221 (+820.83%)
Mutual labels:  material-components
KotLink
An implementation of Go-Links, written in Kotlin
Stars: ✭ 37 (+54.17%)
Mutual labels:  material-components
Material Admin
Free Material Admin Template
Stars: ✭ 219 (+812.5%)
Mutual labels:  material-components
Bottomsheet
BottomSheet dialog library for Android
Stars: ✭ 219 (+812.5%)
Mutual labels:  material-components

Django Material Widgets

Easily convert your Django Forms and ModelForms to use widgets styled with Material Components for the Web.

status docs pypi pyversion license

Click to view demo

Quick Start

  1. Install Django Material Widgets:

    pip install django-material-widgets
    
  2. Add material_widgets to INSTALLED_APPS in your settings.py:

    INSTALLED_APPS = [
        ...
        'material_widgets',
    ]
    
  3. Edit your forms.py:

    • Import material_widgets.widgets.MaterialForm and/or material_widgets.widgets.MaterialModelForm:

      from material_widgets import MaterialForm, MaterialModelForm
      
    • Change forms using django.forms.Form and/or django.forms.ModelForm to MaterialForm or MaterialModelForm respectively:

      class MyForm(forms.Form): ⇨ class MyForm(MaterialForm):
      
      class MyModelForm(forms.ModelForm): ⇨ class MyModelForm(MaterialModelForm):
      
  4. Edit your HTML templates:

    • Change {{ form }} template variables to {{ form.as_components }}:

      {{ form.as_p }} ⇨ {{ form.as_components }}
      
    • Add {{ form.media.css }} to your <head> tag:

      <head>
          ...
          {{ form.media.css }}
      </head>
      
    • Add the mdc-typography CSS class to your <body> tag:

      <body class="mdc-typography" ...>
      
    • Add {{ form.media.js }} to the bottom of your <body> tag:

      <body class="mdc-typography" ...>
          ...
          {{ form.media.js }}
      </body>
      
    • (Optional) Add font and icon stylesheet links if required:

      <head>
          ...
          <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500">
          <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
      </head>
      

Demo

https://ooknosi.github.com/django_material_widgets

To view the demo locally at http://localhost:8000:

$ git clone https://github.com/ooknosi/django_material_widgets.git
$ cd django_material_widgets/src
$ python manage.py migrate --settings=demo.settings
$ python manage.py runserver --settings=demo.settings

Documentation

http://django-material-widgets.readthedocs.io

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].