开发者

Django Barcode for store sales

I am in process of converting Visual Basic app into Python Django. Currently, it has barcode functionality to process sales at a store. Ca开发者_高级运维n this be achieved with python django.


If your definition of barcode functionality is the ability to read and write barcodes, you should keep in mind two things.

  1. Barcodes are actually read by barcode readers, and from the computers' point of view they are just input devices, just like keyboards. When the reader reads a barcode, it just "types" it in, character by character. Usually it's configurable what the reader sends after the code, tab or enter are quite common options. Enter is the easiest to deal with.
  2. There's nothing special in writing barcodes, it's just text with a special font, with *-characters before and after the code.

Handling barcodes doesn't really have much to do with Django. Some tricks are required to get it done within browsers, but these would apply if you were doing it in RoR, .net or whatever:

  • Handling barcodes from a web app is quite straightforward. A text input is needed and a bit of javascript to make sure the input has focus, and to trigger action when a barcode has been read.
  • Printing barcodes is not very hard either, just use css3 embedded fonts. If that's too cutting edge, you can always create images of the barcodes server-side, and it'll work with any browser.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜