Skip to content

It is a Django application that lets to render forms like django admin, with the same HTML

License

Notifications You must be signed in to change notification settings

predatell/django-form-admin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

https://badge.fury.io/py/django-form-admin.png https://pypip.in/d/django-form-admin/badge.png

It is a Django application that lets to render forms like django admin, with the same HTML

In your form:

class FooForm(forms.Form, FormAdminDjango):
    pass

class FooModelForm(forms.ModelForm, FormAdminDjango):
    pass

In your template:

{{ form.as_django_admin }}

But you don't need inherit of FormAdminDjango, you may also do

In your form:

class FooForm(forms.Form):
    ...

    def as_django_admin(self):
        from formadmin.forms import as_django_admin
        return as_django_admin(self)

In your template:

{{ form.as_django_admin }}

Or even without modify the form

Only in your template:

{% load formadmin_filters %}
{{ form|as_django_admin }}

You can get the bleeding edge version of django-form-admin by doing a clone of its git repository:

git clone git://github.com/Yaco-Sistemas/django-form-admin.git

About

It is a Django application that lets to render forms like django admin, with the same HTML

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 91.3%
  • HTML 8.7%