{"id":15907981,"url":"https://github.com/ooknosi/django_material_widgets","last_synced_at":"2025-03-21T21:31:53.812Z","repository":{"id":49698125,"uuid":"111563387","full_name":"ooknosi/django_material_widgets","owner":"ooknosi","description":"Django widgets styled with Material Components for the Web","archived":false,"fork":false,"pushed_at":"2022-12-07T23:51:49.000Z","size":1002,"stargazers_count":24,"open_issues_count":12,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-16T17:47:48.219Z","etag":null,"topics":["django","material-components","material-components-web","material-design"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ooknosi.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-21T15:00:20.000Z","updated_at":"2022-07-27T06:52:07.000Z","dependencies_parsed_at":"2023-01-25T00:30:55.545Z","dependency_job_id":null,"html_url":"https://github.com/ooknosi/django_material_widgets","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ooknosi%2Fdjango_material_widgets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ooknosi%2Fdjango_material_widgets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ooknosi%2Fdjango_material_widgets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ooknosi%2Fdjango_material_widgets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ooknosi","download_url":"https://codeload.github.com/ooknosi/django_material_widgets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244874390,"owners_count":20524577,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","material-components","material-components-web","material-design"],"created_at":"2024-10-06T14:08:26.552Z","updated_at":"2025-03-21T21:31:53.313Z","avatar_url":"https://github.com/ooknosi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"=======================\nDjango Material Widgets\n=======================\n\nEasily convert your Django Forms and ModelForms to use widgets styled with `Material Components for the Web`_.\n\n|status| |docs| |pypi| |pyversion| |license|\n\n|screenshot|\n\n\nQuick Start\n-----------\n#) Install Django Material Widgets::\n\n    pip install django-material-widgets\n\n#) Add ``material_widgets`` to ``INSTALLED_APPS`` in your ``settings.py``::\n\n    INSTALLED_APPS = [\n        ...\n        'material_widgets',\n    ]\n\n#) Edit your ``forms.py``:\n\n    - Import ``material_widgets.widgets.MaterialForm`` and/or ``material_widgets.widgets.MaterialModelForm``::\n\n        from material_widgets import MaterialForm, MaterialModelForm\n\n    - Change forms using ``django.forms.Form`` and/or ``django.forms.ModelForm`` to ``MaterialForm`` or ``MaterialModelForm`` respectively::\n\n        class MyForm(forms.Form): ⇨ class MyForm(MaterialForm):\n\n        class MyModelForm(forms.ModelForm): ⇨ class MyModelForm(MaterialModelForm):\n\n#) Edit your HTML templates:\n\n    - Change ``{{ form }}`` template variables to ``{{ form.as_components }}``::\n\n        {{ form.as_p }} ⇨ {{ form.as_components }}\n\n\n    - Add ``{{ form.media.css }}`` to your ``\u003chead\u003e`` tag::\n\n        \u003chead\u003e\n            ...\n            {{ form.media.css }}\n        \u003c/head\u003e\n\n    - Add the ``mdc-typography`` CSS class to your ``\u003cbody\u003e`` tag::\n\n      \u003cbody class=\"mdc-typography\" ...\u003e\n\n    - Add ``{{ form.media.js }}`` to the bottom of your ``\u003cbody\u003e`` tag::\n\n        \u003cbody class=\"mdc-typography\" ...\u003e\n            ...\n            {{ form.media.js }}\n        \u003c/body\u003e\n\n    - (Optional) Add font and icon stylesheet links if required::\n\n        \u003chead\u003e\n            ...\n            \u003clink rel=\"stylesheet\" href=\"https://fonts.googleapis.com/css?family=Roboto:300,400,500\"\u003e\n            \u003clink rel=\"stylesheet\" href=\"https://fonts.googleapis.com/icon?family=Material+Icons\"\u003e\n        \u003c/head\u003e\n\n\nDemo\n----\nhttps://ooknosi.github.com/django_material_widgets\n\nTo view the demo locally at ``http://localhost:8000``:\n\n.. code-block:: bash\n\n    $ git clone https://github.com/ooknosi/django_material_widgets.git\n    $ cd django_material_widgets/src\n    $ python manage.py migrate --settings=demo.settings\n    $ python manage.py runserver --settings=demo.settings\n\n\nDocumentation\n-------------\nhttp://django-material-widgets.readthedocs.io\n\n\n.. _Material Components for the Web: https://material.io/components/web/\n\n.. |screenshot| image:: https://raw.githubusercontent.com/ooknosi/django_material_widgets/master/docs/screenshot.png\n                :width: 100%\n                :alt: Click to view demo\n                :target: https://ooknosi.github.com/django_material_widgets\n\n.. |status| image:: https://img.shields.io/pypi/status/django-material-widgets.svg\n            :target: https://pypi.python.org/pypi/django-material-widgets\n\n.. |docs| image:: https://img.shields.io/readthedocs/django-material-widgets.svg\n          :target: http://django-material-widgets.readthedocs.io\n\n.. |pypi| image:: https://img.shields.io/pypi/v/django-material-widgets.svg\n          :target: https://pypi.python.org/pypi/django-material-widgets\n\n.. |pyversion| image:: https://img.shields.io/pypi/pyversions/django-material-widgets.svg\n               :target: https://pypi.python.org/pypi/django-material-widgets\n\n.. |license| image:: https://img.shields.io/pypi/l/django-material-widgets.svg\n             :target: https://github.com/ooknosi/django_material_widgets/blob/master/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fooknosi%2Fdjango_material_widgets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fooknosi%2Fdjango_material_widgets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fooknosi%2Fdjango_material_widgets/lists"}