Git Product home page Git Product logo

django-jsignature's People

Contributors

adremides avatar fle avatar gagaro avatar izimobil avatar kygoh avatar notanumber avatar robmaister avatar ryanchausse avatar sebcorbin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-jsignature's Issues

Widget's javascript runs before external scripts are loaded

In our template we load all javascript just before the closing body tag. This includes the external jquery reference and {{ form.media }}

That means jQuery's $ isn't loaded by the time the javascript embedded in your widget is called giving an error.

Should your initialization be triggered by something in {{ form.media }} rather than directly in the widget html?

Encryption of stored signatures

Hi,

My use case for django-jsignature stores the signatures together with other identifying information of users of my application.

It occurs to me that applying an encryption coder/decoder when storing signatures in the database would add protection in the event of a data breach. The encryption key could be another setting, eg:

JSIGNATURE_ENCRYPTION_KEY = os.environ.get('JSIGNATURE_ENCRYPTION_KEY')

Is this a feature you might consider adding?
Thanks!

{{ form.media }} placement requirement

It should be noted that the requirement for placement of {{ form.media }} must be added to the end of your template file and not at the beginning as indicated in the docs. This ensures you JS is loaded after the form. So, place {{ form.media }} after your form or at the tail end of the template file. If you do not place it in the correct location, your signature box will not appear.

'Invalid Format' Error

Hello everything seems to have installed OK and I can see the signature box with the reset.
jQuery is installed however when I try and save I get this error

['Invalid format.']

Any ideas?
Thanks

signature for API

How can I use signature through api
I use graphql with vue.js
How can I benefit from this project?
Thanks for this effort

Touch screen only shows initial contact

We have django-jsignature installed in a django application and working perfectly. We started playing with using tablets or touchscreen chromebooks to collect signatures with a stylus or finger, but it only shows the inital spot where you tap the screen. It's actually the exact issue I found in the issues on jSignature's repo brinley/jSignature#186

I was curious if anyone had ran into this before, or if there is something I am not doing correctly.

This repo is awesome, thank you!

Edit: Works fine on my android phone using chrome. Chromebook and Windows do not like it. Also tried in "tablet mode" in windows.

Push newest version to pypi.

Is there any chance to support Django 2.2.1 and Python 3.4?
There's no other projects like this out there.

  File "/Users/pawisoon/PycharmProjects/GSMPanel/venv/lib/python3.6/site-packages/django/forms/boundfield.py", line 93, in as_widget
    renderer=self.form.renderer,
TypeError: render() got an unexpected keyword argument 'renderer'
[21/Nov/2019 09:18:03] "GET /panel/mtn/edit/83/ HTTP/1.1" 500 59

after removing renderer=self.form.renderer, it renders signature properly.
So it means #11 does not work in Django 2.2.1

Improve strokes of the exported image

When using draw_signature(), the signature is composed by rect-lines. So, it is a bit different and you can notice angles in the signature exported.

Here an example:
image
image

Checking the jSignature demo I see that they do not have this problem when exporting to other formats.

Warning about deprecation Image.ANTIALIAS

Just for the record:

DeprecationWarning: ANTIALIAS is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.LANCZOS instead.
im.thumbnail((width, height), Image.ANTIALIAS)

Using the example project

I follow the instructions here: https://github.com/fle/django-jsignature?tab=readme-ov-file#example-project
I altered the commands a bit for windows. I did the following.

d:
cd D:\code\pyprj\jsig\
git clone https://github.com/fle/django-jsignature.git
cd django-jsignature
python -m venv venv
.\venv\Scripts\activate.bat
rem      source venv/bin/activate
pip install -r requirements.txt
pip install -e .
cd example_project
python manage.py migrate

I have looked at #17 and #41, but I don't think they cover this situation.

I get the following error.

(venv) d:\code\pyprj\jsig\django-jsignature\example_project>python manage.py migrate
Traceback (most recent call last):
  File "d:\code\pyprj\jsig\django-jsignature\example_project\manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "C:\prg\python128\Lib\site-packages\django\core\management\__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "C:\prg\python128\Lib\site-packages\django\core\management\__init__.py", line 416, in execute
    django.setup()
  File "C:\prg\python128\Lib\site-packages\django\__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "C:\prg\python128\Lib\site-packages\django\apps\registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
                 ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\prg\python128\Lib\site-packages\django\apps\config.py", line 193, in create
    import_module(entry)
  File "C:\prg\python128\Lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'example_project'
(venv) d:\code\pyprj\jsig\django-jsignature\example_project>

I believe I have followed the instructions. Should that work, or am I doing something wrong?

form.media is empty

Hello,

form.media does not load anything when using a ModelForm

class TransactionCreateForm(forms.ModelForm):
    signature = JSignatureField()
    class Meta:
        model = models.Transaction
        fields = [ ..., 'signature']

The entire field is empty, only showing the reset button. Inspection of source shows that the template does not render anything under {{ form.media }}

Saved signature doesn't contain dots

While testing this out, I drew a smiley face with a couple of dots for eyes and a mouth.

When drawing the face, it all appeared correctly.

Screenshot 2023-06-06 at 10 12 56

When viewing the saved image though, the dots are missing. If I draw bigger dots, it works fine, but it's almost like tiny little dots aren't included in the data when saving.

Screenshot 2023-06-06 at 10 13 15

Of course I don't expect anyone to draw smiley faces, but it's relevant to 'i' and 'j' letters.

django manage.py

Just to let you know python manage.py check is throwing an deprecation warning in Django 1.9 that appears to be related to django-jsignature:

/home/django/MY_PROJECT/env/lib/python3.4/site-packages/six.py:808: RemovedInDjango110Warning: SubfieldBase has been deprecated. Use Field.from_db_value instead.

Appears to come from fields.py:16

Thanks for the package, huge time saver!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.