Git Product home page Git Product logo

django-wurfl's People

Contributors

belovachap avatar clement avatar rbdcti avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

django-wurfl's Issues

bu

DevBook:mobile admin$ ./manage.py wurfl-load /Users/admin/Projects/example-mobile/src/mobile/wurfl-latest.xml
/Users/admin/Projects/example-mobile/src/mobile/wurfl/models.py:10: DeprecationWarning: the md5 module is deprecated; use hashlib instead
from md5 import new as md5

Error: sequence item 0: expected string, OperationalError found

What kind of bug is this sequence item 0: .. I must be doing something wrong...

BaseDevice._match_user_agent fails with updated iPad UserAgent

An updated iPad (1) user-agent reports as: Mozilla/5.0 (iPad; U; CPU OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5

The latest-and-greatest wurfl.xml (http://sourceforge.net/projects/wurfl/files/WURFL/) does not have that exact user-agent; however the official API (Tera-WURFL for the DB implementation, or really any of them) can still match this against the iPad (listed in wurfl.xml as Mozilla/5.0 (iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7D11) because of the way it does partial matches - in the newest Tera-WURFL this can be found in UserAgentMatchers/AppleUserAgentMatcher.php public function recoveryMatch() - notice it doesn't simply try to do a match against the beginning of the string but rather checks for certain key elements.

django-wurfl on the other hand tries to do a match against a third of the UA string and then uses Levenshtein distance to determine which match is the best to use. In this case, a third of the iPad UA string is "Mozilla/5.0 (iPad; U; CPU OS 4_3_3 like Mac OS" which still doesn't match anything (I was able to get a match by making it fallback to a sixth of the UA string, e.g., "Mozilla/5.0 (iPad; U; C").

The fix is unfortunately non-trivial - the official WURFL APIs solve this by having per-user-agent classes that handle the attempts at matching, instead of just trying to match against a fragment of the UA string. If django-wurfl is to be an actual replacement for the official WURFL APIs, however, this problem needs to be addressed.

a sample hello world project

Even though you have very good documentation, It would be nice if you could add a simple "hello world" project.

Much appreciated.

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.