All Projects → utkbansal → crispy-forms-materialize

utkbansal / crispy-forms-materialize

Licence: MIT license
Django application to add materializecss support to django-crispy-forms

Programming Languages

HTML
75241 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to crispy-forms-materialize

Responsive led control
Responsive Led Control based on McLightning & Grisworld-Led-Controller with FastLED
Stars: ✭ 62 (+210%)
Mutual labels:  materializecss
Django Material
Material Design for Django
Stars: ✭ 2,362 (+11710%)
Mutual labels:  materializecss
componentity
Thousands of components ready to be copy-pasted!
Stars: ✭ 15 (-25%)
Mutual labels:  materializecss
Ytmdesktop
A Desktop App for YouTube Music
Stars: ✭ 1,297 (+6385%)
Mutual labels:  materializecss
Material Ui Vue
It is a materializecss.com implementation with Vue.js.
Stars: ✭ 142 (+610%)
Mutual labels:  materializecss
materialize-social
Social Login Buttons for MaterializeCSS
Stars: ✭ 50 (+150%)
Mutual labels:  materializecss
Bootstrap
Open Source JS plugins
Stars: ✭ 13 (-35%)
Mutual labels:  materializecss
Hot-Food
Fully open-source online food delivery website built using Python, Django web framework, Bootstrap4, Vanilla Javascript, and more...
Stars: ✭ 122 (+510%)
Mutual labels:  django-crispy-forms
Jekyll Material Theme
A Jekyll Theme based on Material Design using Materialize.
Stars: ✭ 165 (+725%)
Mutual labels:  materializecss
ediTable
Manipulation of table (sort, add, edit, remove, etc... - rows | valid cells, type, require, etc... cells )
Stars: ✭ 14 (-30%)
Mutual labels:  materializecss
Yii2 Materializecss
Integration of materializecss into Yii2
Stars: ✭ 93 (+365%)
Mutual labels:  materializecss
Opencart Materialize
Template for OpenCart with Materialize
Stars: ✭ 117 (+485%)
Mutual labels:  materializecss
djadmin
Djadmin is a django admin theme
Stars: ✭ 42 (+110%)
Mutual labels:  materializecss
Aspittel.github.io
Personal Site
Stars: ✭ 62 (+210%)
Mutual labels:  materializecss
materializecss starter
A Starter Boilerplate for Materializecss, ionicons, font-awesome and Animatecss
Stars: ✭ 58 (+190%)
Mutual labels:  materializecss
Netcore Postgres Oauth Boiler
A basic .NET Core website boilerplate using PostgreSQL for storage, Adminer for db management, Let's Encrypt for SSL certificates and NGINX for routing.
Stars: ✭ 57 (+185%)
Mutual labels:  materializecss
Hass Configurator
Configuration UI for Home Assistant
Stars: ✭ 211 (+955%)
Mutual labels:  materializecss
django-materializecss-form
Materializecss for Django Form
Stars: ✭ 83 (+315%)
Mutual labels:  materializecss
brush
An amazing scaffolding for developing database-driven websites, applications and APIs. Built on Laravel Lumen Framework, MySQL and Angular.
Stars: ✭ 23 (+15%)
Mutual labels:  materializecss
angular-model-pattern-example
Model pattern for Angular (2, 4, ...), manage and share your state with simple services using RxJS Subjects and Observables
Stars: ✭ 37 (+85%)
Mutual labels:  materializecss

crispy-forms-materialize

Introduction

This is a Django application to add django-crispy-forms template pack for Materializecss.

The main goal of this project is to reduce the time spent by developers on styling forms. Since most of the time we are using a css framework, the work done in styling different forms is quite redundant and boring. This library aims at reducing this redundancy by automatically sytling your forms using the Materializecss framework.

How To Use

Add the following code to settings.py to specify which template pack to use

    
    CRISPY_TEMPLATE_PACK = 'materialize'

Create a form in forms.py and override its init to add FormHelper as the helper.

class TestForm(forms.Form):
    username = forms.CharField()
    password = forms.CharField(widget=forms.PasswordInput)

    def __init__(self, *args, **kwargs):
        super(TestForm, self).__init__(*args, **kwargs)
        self.helper = FormHelper()

Associate it with a view

class RegisterView(FormView):
    form_class = TestForm
    template_name = 'test.html'

And finally the template

{% load crispy_forms_tags %}
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <!--Add materialize libraries -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
    <!-- Compiled and minified CSS -->
    <link rel="stylesheet"
          href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.1/css/materialize.min.css">

    <!-- Compiled and minified JavaScript -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.1/js/materialize.min.js"></script>

    <link href="https://fonts.googleapis.com/icon?family=Material+Icons"
          rel="stylesheet">

</head>
<body>
<div class="row">
    <div class="card-panel col m6 offset-m3">
        <!-- Only one line -->
        {% crispy form %}
    </div>
</div>

</body>
</html>

Which finally leads into something like this -

![Screenshot of rendered HTML] (https://raw.githubusercontent.com/utkbansal/crispy-forms-materialize/master/Screenshot.png)

Note - We did not have to write any css to style the form. It was auto-generated from the form class.

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].