
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
django-ajax-image-upload
Advanced tools
.. image:: https://badge.fury.io/py/django-ajax-image-upload.svg :target: https://badge.fury.io/py/django-ajax-image-upload
.. image:: https://travis-ci.org/idaproject/django-ajax-image-upload.svg?branch=master :target: https://travis-ci.org/idaproject/django-ajax-image-upload
.. image:: https://codecov.io/gh/idaproject/django-ajax-image-upload/branch/master/graph/badge.svg :target: https://codecov.io/gh/idaproject/django-ajax-image-upload
Upload images via ajax.
The full documentation is at https://django-ajax-image-upload.readthedocs.io.
Install Django Ajax Image Upload::
pip install django-ajax-image-upload
Add it to your INSTALLED_APPS
:
.. code-block:: python
INSTALLED_APPS = (
...
'ajaximage',
...
)
Add Django Ajax Image Upload's URL patterns:
.. code-block:: python
from ajaximage import urls as ajaximage_urls
urlpatterns = [
...
url(r'^', include(ajaximage_urls)),
...
]
Define your Image model: .. code-block:: python
from ajaximage.models import AbstractImage
class MyImage(AbstractImage):
# define additional fields here
class Meta:
...
Define generic tabular inline .. code-block::python
from ajaximage.admin import ImageInline
from .models import MyImage
class MyImageInline(ImageInline):
models = MyImage
Example usage of AjaxImageUploadMixin: .. code-block::python
models.py
Does the code actually work?
::
source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox
0.4.0 (2018-01-28) ++++++++++++++++++
FAQs
Upload images via ajax.
We found that django-ajax-image-upload demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.