diff options
Diffstat (limited to 'example_ads.py')
-rw-r--r-- | example_ads.py | 100 |
1 files changed, 21 insertions, 79 deletions
diff --git a/example_ads.py b/example_ads.py index 25aa3eb..15947c8 100644 --- a/example_ads.py +++ b/example_ads.py @@ -10,11 +10,18 @@ # 'name': 'imgs/some/path/some/where/my_image.jpg' # Note that the MEDIA_URL has a trailing slash !important + +## try for lang/country first, then just lang, then fallback to en + ads = [ { 'type':'html', 'name': 'internal_name_1', - 'title': 'human title 1', + 'title': + { + 'en':'human title 1', + 'it':'italian human title 1', + }, 'tier': 1, 'weight': 15, #bogomips 'url': 'http://www1.example.com', @@ -29,14 +36,25 @@ ads = [ 'tier': 1, 'weight': 25, 'url': 'http://www2.example.com', - 'text': 'On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain.', + 'text': + { + 'en':'On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain.', + 'de':'german text translation', + 'it':'italian trans of num 2' + }, 'height': 120, 'width': 125, }, { 'type':'img', 'name': 'internal_name_3', - 'title': 'human title 3', + 'title': + { + 'en':'human title 3', + 'de':'german 3', + 'it':'italian 3', + 'de-DE':'de-DE german 3', + }, 'tier': 1, 'weight': 5, 'url': 'http://www3.example.com', @@ -55,80 +73,4 @@ ads = [ 'height': 120, 'width': 125, }, - { - 'type':'img', - 'name': 'internal_name_5', - 'title': 'human title 5', - 'tier': 2, - 'weight': 19, - 'url': 'http://www5.example.com', - 'img': 'path/to/img5.png', - 'height': 120, - 'width': 125, - }, - { - 'type':'img', - 'name': 'internal_name_6', - 'title': 'human title 6', - 'tier': 3, - 'weight': 150, - 'url': 'http://www6.example.com', - 'img': 'path/to/img6.png', - 'height': 120, - 'width': 125, - }, - { - 'type':'img', - 'name': 'internal_name_7', - 'title': 'human title 7', - 'tier': 3, - 'weight': 170, - 'url': 'http://www7.example.com', - 'img': 'path/to/img7.png', - 'height': 120, - 'width': 125, - }, - { - 'type':'img', - 'name': 'internal_name_8', - 'title': 'human title 8', - 'tier': 3, - 'weight': 11, - 'url': 'http://www8.example.com', - 'img': 'path/to/img8.png', - 'height': 120, - 'width': 125, - }, - { - 'name': 'internal_name_9', - 'title': 'human title 9', - 'tier': 3, - 'weight': 1950, - 'url': 'http://www9.example.com', - 'img': 'path/to/img9.png', - 'height': 120, - 'width': 125, - }, - { - 'type':'img', - 'name': 'internal_name_10', - 'title': 'human title 10', - 'tier': 3, - 'weight': 122, - 'url': 'http://www10.example.com', - 'img': 'path/to/img10.png', - 'height': 120, - 'width': 125, - }, - { - 'type':'img', - 'name': 'internal_name_11', - 'title': 'human title 11', - 'tier': 3, - 'weight': 17, - 'url': 'http://www11.example.com', - 'img': 'path/to/img11 .png', - 'height': 120, - 'width': 125, - }, ] |