It sounds as though you have a set of sensors (scales, license readers,
barcode readers) which provide their readings over asynchronous serial
(that's what pyserial can connect with).  You have some computer or set of
computers that collectively provide a sufficient number of serial ports to
interface to your set of sensors.

And I believe you are wondering how to use a browser (Firefox, Chrome,
Safari, IE) to read from the serial ports and post the data to Django.  You
might be able to write a Firefox extension that does this, but it would be
a lot of work, and sensitive to updates to the browser.

If I had the task of reading the sensors and sending the data to Django, I
would write a small python program using pyserial and requests (or if you
are a glutton for punishment, use urllib2 directly) to POST to your Django
instance, using rest or an ad hoc protocol.  You can POST to a form page,
but the fact that forms are designed to appear to humans will just make
things a bit harder.

If you need a GUI to control the program you could add one with wxPython
(or other alternatives) or you could run a simple web server (python comes
with on) in a separate thread.

If the serial ports are run on the same box as Django or on a box that can
access the same database as Django is using, you could do the process as a
custom Django management command that uses pyserial to talk to the ports
and stores the results in the database directly.  GUI based control could
be via an extra table in the database controlled by an extra Django page.

There are other possibilities.  But trying to get a browser involved sounds
like a recipe for frustration.

Or maybe I misunderstand your needs?

On Mon, Apr 6, 2015 at 8:36 PM, Vijay Khemlani <vkhem...@gmail.com> wrote:

> I'm still not sure whether you are trying to load the value in the form
> input from the server or from the browser of the client.
>
> On Mon, Apr 6, 2015 at 5:42 PM, José Jesús Palacios <funi...@gmail.com>
> wrote:
>
>> I'm trying read serial to put in a field on a form and submit to database
>> . Data can be a weight of weighbridge, number of  car plate or reading a
>> barcode.
>> Outside the browser, It's not problem, but I want to use it as user
>> interface.
>>
>> El domingo, 5 de abril de 2015, 19:55:02 (UTC+2), Vijay Khemlani escribió:
>>>
>>> What are you trying to do exactly?
>>>
>>> On Sun, Apr 5, 2015 at 10:27 AM, José Jesús Palacios <fun...@gmail.com>
>>> wrote:
>>>
>>>> How can I work with pyserial and django form to read from serial to
>>>> <input> field?
>>>> Is it possible?
>>>>
>>>> Thanks to everyone.
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Django users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to django-users...@googlegroups.com.
>>>> To post to this group, send email to django...@googlegroups.com.
>>>> Visit this group at http://groups.google.com/group/django-users.
>>>> To view this discussion on the web visit https://groups.google.com/d/
>>>> msgid/django-users/aa063945-c98d-488f-ba0f-16d66809395e%
>>>> 40googlegroups.com
>>>> <https://groups.google.com/d/msgid/django-users/aa063945-c98d-488f-ba0f-16d66809395e%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/8bc3e63e-599c-4fa0-a276-70cbbb24706b%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/8bc3e63e-599c-4fa0-a276-70cbbb24706b%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CALn3ei22C7ipPoVnEtQMb1a%3DS9qnzJWppvUpnpiBCe8jShoZCg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CALn3ei22C7ipPoVnEtQMb1a%3DS9qnzJWppvUpnpiBCe8jShoZCg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAB%2BAj0tHSi%3DUQ98mfNXG0%3DW1deRGBCvqikNi1NgAfPMEPNhfQA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to