Django Admin File Wiget for Zappa based admin panels
Project description
=============================
Django Zappa File Widget
=============================
.. image:: https://badge.fury.io/py/zappa-file-widget.png
:target: https://badge.fury.io/py/zappa-file-widget
.. image:: https://travis-ci.org/anush0247/zappa-file-widget.png?branch=master
:target: https://travis-ci.org/anush0247/zappa-file-widget
Django Admin File Wiget for Zappa based admin panels
Documentation
-------------
The full documentation is at https://zappa-file-widget.readthedocs.org.
Quickstart
----------
Install Django Zappa File Widget::
pip install zappa-file-widget
Then use it in a project::
``settings.py``
```py
INSTALLED_APPS += "zappa_file_widget"
```
``models.py``
```python
from django.db import models
class Order(models.Model):
attachment = models.FileField(upload_to="media/")
ordered_by = models.CharField(max_length=20)
def __unicode__(self):
return unicode(self.attachment)
```
``admin.py``
```python
from django import forms
from django.contrib import admin
from zappa_file_widget.file_widget import FileWidget
from django_custom_admin.models import Order
class OrderForm(forms.ModelForm):
class Meta:
widgets = {
'attachment': FileWidget(),
}
class OrderAdmin(admin.ModelAdmin):
form = OrderForm
admin.site.register(Order, OrderAdmin)
```
```sh
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
```
Point your browser at : [http://127.0.0.1:8000/admin/example/order/](http://127.0.0.1:8000/admin/example/order/)
Credits
---------
Tools used in rendering this package:
* Cookiecutter_
* `cookiecutter-djangopackage`_
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage
History
-------
0.1.0 (2016-08-26)
++++++++++++++++++
* First release on PyPI.
Django Zappa File Widget
=============================
.. image:: https://badge.fury.io/py/zappa-file-widget.png
:target: https://badge.fury.io/py/zappa-file-widget
.. image:: https://travis-ci.org/anush0247/zappa-file-widget.png?branch=master
:target: https://travis-ci.org/anush0247/zappa-file-widget
Django Admin File Wiget for Zappa based admin panels
Documentation
-------------
The full documentation is at https://zappa-file-widget.readthedocs.org.
Quickstart
----------
Install Django Zappa File Widget::
pip install zappa-file-widget
Then use it in a project::
``settings.py``
```py
INSTALLED_APPS += "zappa_file_widget"
```
``models.py``
```python
from django.db import models
class Order(models.Model):
attachment = models.FileField(upload_to="media/")
ordered_by = models.CharField(max_length=20)
def __unicode__(self):
return unicode(self.attachment)
```
``admin.py``
```python
from django import forms
from django.contrib import admin
from zappa_file_widget.file_widget import FileWidget
from django_custom_admin.models import Order
class OrderForm(forms.ModelForm):
class Meta:
widgets = {
'attachment': FileWidget(),
}
class OrderAdmin(admin.ModelAdmin):
form = OrderForm
admin.site.register(Order, OrderAdmin)
```
```sh
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
```
Point your browser at : [http://127.0.0.1:8000/admin/example/order/](http://127.0.0.1:8000/admin/example/order/)
Credits
---------
Tools used in rendering this package:
* Cookiecutter_
* `cookiecutter-djangopackage`_
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage
History
-------
0.1.0 (2016-08-26)
++++++++++++++++++
* First release on PyPI.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for zappa_file_widget-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61f985bc73108ce39df80f3eb3a2aaf52672f9f5d8fe70fd593c643c68ebaa0b |
|
MD5 | 243094cb1e5a88a9936234f59d2e047e |
|
BLAKE2b-256 | 12633995501c710897ed0a4d029ecf04cce957dbf3ee2fc03a4cd9406f8cf633 |