Amazon S3 is a well known web based storage system provided as SaaS service provided by Amazon Web Services. On Django you can integrate that service using the storage interface called Django Storages, but you must have some considerations using that SaaS storage interface. Mainly regarding the Date header sent to the service on each read, write and similar operations, where you must send an updated header with the proper Time Zone and format.
web developer & system programmer
coder . cl
ramblings and rants on software development...
django and amazon s3
by Daniel Molina Wegener on 2012.01.19posted in: development, programming, python, tips
decorated template tags in django
by Daniel Molina Wegener on 2012.01.06posted in: development, programming, python, tips
Django provides an API to create custom template tags for those applications mounted over this nice Web Application Framework. Sometimes we need to decorate our functions, but you cannot decorate a function registered as tag in Django. The most elegant solution to solve this problem is to use a closure which will wrap the template tag function to be used decorated template tag.
integrating selenium and django
by Daniel Molina Wegener on 2011.12.12posted in: development, programming, python, tips
As you know, using unit tests will only provide a testing over algorithms and low level interfaces. For a higher level approach, you have the automated testing suite that provides the Selenium, which provides you a test case API to be used in functional tests. If you want to automate functional tests under Django, you can use the selenium IDE to record your actions on the web site, and export them as test case instructions for the selenium API, which will run those tests as you in the web browser, or even other tools like Html Unit. This includes several browsers supported by the API, including a server that allows you to mount a test grid using various machines.
why to go with multi-paradigm?
by Daniel Molina Wegener on 2011.11.18posted in: development, programming, python, tips
Hybrid languages are cool. Most powerful programming languages are those languages which can handle a multi-paradigm scope. You can reduce the amount of code considerably when you are using a multi-paradigm approach. Due to the imperative origin and procedural approach of object oriented languages, having only object oriented language approach is not enough to solve problems. For example as we reviewed the widely used MapReduce distributed computing model has its origin on the functional paradigm in two higher order functions called map and reduce — where the synonym of reduce is fold, applying a kind of Monoid where the data is lifted and transformed by the map function and then is processed and reduced by the fold or reduce function.
instant xml api using pyxser
by Daniel Molina Wegener on 2011.11.05posted in: development, programming, projects, python, pyxser, tips
Probably you do not understand pyxser at all. It is a serializer and deserializer which converts Python objects into XML as plain text. Among JSON and other formats, XML can help in some tasks like transmitting object through the network, for example building API calls using remote queries. Here I will guide you on how to build an XML query API for your Django driven application in few minutes. You just need to understand how pyxser works and how to use the pyxser module. Remember that you can see the documentation once it is installed, even if you do not have Internet, just by running the pydoc daemon with pydoc -p 8080 and connecting to the port 8080 in your machine — you can choose another port if it is not working.



