Git Product home page Git Product logo

django-webcam's Introduction

django-webcam

django fields to get and store webcam snaphot

  • fully compatible with Django FileField protocol
  • Supports gif/jpeg/png
  • Manage multiple fields in the same page
  • Works in the admin as any other field ( need import webcam.admin to configure FORMFIELD_FOR_DBFIELD_DEFAULTS)

Note

based on jquery.webcam plugin from Robert Eisele ([email protected])

Examples

models.py:

import webcam.admin # needed to show the right widget in the admin
from django.db import models
from webcam.fields import CameraField

class Person(models.Model):
    picture = CameraField()

django-webcam's People

Contributors

sax-os4d avatar saxix 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-webcam's Issues

ERROR 500

I finally got this working. Using Chrome (21.0.1180.89 m) I'm able to save snapshot images, but when using IE (v8) or Firefox (), the images don't seem to save (the camera works though in the browser window though).

In Chrome's console, it's logging errors:
POST http://example.com/picture/1/ 500 (INTERNAL SERVER ERROR) jquery.min.js:16
d.support.ajax.d.ajaxTransport.send jquery.min.js:16
d.extend.ajax jquery.min.js:16
d.each.d.(anonymous function) jquery.min.js:16
saveCB /medapp/camera/:67
$.webcam.onSave /medapp/camera/:93
(anonymous function)
$.fn.webcam.webcam.save jquery.webcam.js:75
$.webcam.onCapture /medapp/camera/:96
(anonymous function)
$.fn.webcam.webcam.capture jquery.webcam.js:69
(anonymous function) /medapp/camera/:104
d.event.handle jquery.min.js:16
d.event.add.k.handle.m

In Firefox's error console, it's logging errors:
[12:48:10.971] TypeError: webcam.capture is not a function @ camera:104

In IE, I can't see any errors.

Any ideas? I don't know how I could debug that 500 error...

User form/template demo needed

Hi, I've tried to use your app but I could not. I added the CamField to my model and form, then tried to load the widget on the template but although it renders, it doesn't show the flash cam preview (the main part). The admin demo doesn't work for me either, so I don't know if it is me who don't know how to use it or if the app is broken (I see the last update was 5 months ago).

If you have some spare time could you give it a look?, I would really like to use this.

Cheers!

Error: No such file or directory

Do not save the file an error occurs.
Open the media folder and there is no saved file.

Django Version: 1.5.1
Exception Type: IOError
Exception Value: [Errno 2] No such file or directory: u'/home/uni/media/ede894b7-3404-4756-9f51-7f5c53c91be5.jpeg'
Exception Location: /home/uni/webcam/storage.py in open, line 34
Python Executable: /home/env_uni/bin/python
Python Version: 2.7.3

Remove JQuery from Widget media

I see that you are loading JQuery with the CamField widget. I wonder if this is the ideal thing to do because, I think, there is a huge possibility that JQuery have already been loaded before on the template and therefore JQuery would be downloaded multiples times. What do you think?, maybe saying in the docs that JQuery must be loaded before the windget would be enough.

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.