chiark / gitweb /
Make FlattrID a hexadecimal value
authorDaniel Martí <mvdan@mvdan.cc>
Tue, 15 Jul 2014 22:02:01 +0000 (00:02 +0200)
committerDaniel Martí <mvdan@mvdan.cc>
Tue, 15 Jul 2014 22:02:01 +0000 (00:02 +0200)
This adds support for flattr "things" that are not direct flattr numeric ids,
but hexadecimal hashes representing web pages outside of flattr.

fdroidserver/metadata.py

index cf21c211f597b41c77ca6a3ef7adc19520c57a81..fb6af1cb2015986c04524d20a57d06b5d71b39b1 100644 (file)
@@ -154,9 +154,14 @@ class FieldValidator():
 valuetypes = {
     FieldValidator("Integer",
                    r'^[1-9][0-9]*$', None,
-                   ['FlattrID'],
+                   [],
                    ['vercode']),
 
+    FieldValidator("Hexadecimal",
+                   r'^[0-9a-f]+$', None,
+                   ['FlattrID'],
+                   []),
+
     FieldValidator("HTTP link",
                    r'^http[s]?://', None,
                    ["Web Site", "Source Code", "Issue Tracker", "Donate"], []),