What's Cooking!? (without imported items) http://cooking.visualspace.nl/ What's Cooking!? (without imported items) http://cooking.visualspace.nl/ http://2.asset.soup.io/asset/0198/1522_49cd.png 44 44 Django projects cooking at Visualspace . [dokterbob] Finally: human friendly testing :) {"tags":[],"type":"link","title":"Finally: human friendly testing :)","source":"http://fakeapp.com/","body":null} <p><a href="http://fakeapp.com/">http://fakeapp.com/</a></p>Mon, 25 Oct 2010 22:39:42 GMThttp://cooking.visualspace.nl/post/84004557/Finally-human-friendly-testingurn:www-soup-io:1:84004557link [dokterbob] Ordering related objects in Django {"tags":[],"type":"link","title":"Ordering related objects in Django","source":"http://james.wheare.org/notes/2007/11/ordering-related-objects-in-django.php","body":null} <p><a href="http://james.wheare.org/notes/2007/11/ordering-related-objects-in-django.php">http://james.wheare.org/notes/2007/11/ordering-related-objects-in-django.php</a></p>Fri, 22 Oct 2010 11:21:50 GMThttp://cooking.visualspace.nl/post/83332796/Ordering-related-objects-in-Djangourn:www-soup-io:1:83332796link [dokterbob] django-multilingual-model {"tags":[],"type":"link","title":"django-multilingual-model","source":"http://code.google.com/p/django-multilingual-model/","body":"\u003Cp\u003EA very simple abstract base class, enabling translation of (specific) model fields with only about 33 lines of code.\u003C/p\u003E\n\u003Cp\u003E Example: \u003C/p\u003E\u003Cp\u003E\u003Ctt\u003Emodels.py\u003C/tt\u003E \u003C/p\u003E\u003Cpre\u003E\u00a0 \u00a0 from django.db import models\u003Cbr /\u003E\u00a0 \u00a0 from multiling import MultilingualModel\u003Cbr /\u003E\u00a0 \u00a0 \u003Cbr /\u003E\u00a0 \u00a0 class Language(models.Model):\u003Cbr /\u003E\u00a0 \u00a0 \u00a0 \u00a0 code = models.CharField(max_length=5)\u003Cbr /\u003E\u00a0 \u00a0 \u00a0 \u00a0 name = models.CharField(max_length=16)\u003Cbr /\u003E\u00a0 \u00a0 \u00a0 \u00a0 \u003Cbr /\u003E\u00a0 \u00a0 class BookTranslation(models.Model):\u003Cbr /\u003E\u00a0 \u00a0 \u00a0 \u00a0 language = models.ForeignKey(\"Language\")\u003Cbr /\u003E\u00a0 \u00a0 \u00a0 \u00a0 title = models.CharField(max_length=32)\u003Cbr /\u003E\u00a0 \u00a0 \u00a0 \u00a0 description = models.TextField()\u003Cbr /\u003E\u00a0 \u00a0 \u00a0 \u00a0 model = models.ForeignKey(\"Book\")\u003Cbr /\u003E\u00a0 \u00a0 \u00a0 \u00a0 \u003Cbr /\u003E\u00a0 \u00a0 class Book(MultilingualModel):\u003Cbr /\u003E\u00a0 \u00a0 \u00a0 \u00a0 ISBN = models.IntegerField()\u003Cbr /\u003E\u00a0 \u00a0 \u00a0 \u00a0 \u003Cbr /\u003E\u00a0 \u00a0 \u00a0 \u00a0 class Meta:\u003Cbr /\u003E\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 translation = BookTranslation\u003Cbr /\u003E\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 multilingual = ['title', 'description']\u003C/pre\u003E\u003Cpre class=\"prettyprint\"\u003E\u0026gt;\u0026gt;\u0026gt; lang_en = Language(code=\"en\", name=\"English\")\u003Cbr /\u003E\u0026gt;\u0026gt;\u0026gt; lang_en.save()\u003Cbr /\u003E\u0026gt;\u0026gt;\u0026gt; lang_pl = Language(code=\"pl\", name=\"Polish\")\u003Cbr /\u003E\u0026gt;\u0026gt;\u0026gt; book = Book(ISBN=\"1234567890\")\u003Cbr /\u003E\u0026gt;\u0026gt;\u0026gt; book.save()\u003Cbr /\u003E\u0026gt;\u0026gt;\u0026gt; book_en = BookTranslation()\u003Cbr /\u003E\u0026gt;\u0026gt;\u0026gt; book_en.title = \"Django for Dummies\"\u003Cbr /\u003E\u0026gt;\u0026gt;\u0026gt; book_en.description = \"Django described in simple words.\"\u003Cbr /\u003E\u0026gt;\u0026gt;\u0026gt; book_en.model = book\u003Cbr /\u003E\u0026gt;\u0026gt;\u0026gt; book_en.save()\u003Cbr /\u003E\u0026gt;\u0026gt;\u0026gt; book_pl = BookTranslation()\u003Cbr /\u003E\u0026gt;\u0026gt;\u0026gt; book_pl.title = \"Django dla Idiotow\"\u003Cbr /\u003E\u0026gt;\u0026gt;\u0026gt; book_pl.description = \"Django opisane w prostych slowach\"\u003Cbr /\u003E\u0026gt;\u0026gt;\u0026gt; book_pl.model = book\u003Cbr /\u003E\u0026gt;\u0026gt;\u0026gt; book_pl.save()\u003Cbr /\u003E\u0026gt;\u0026gt;\u0026gt; \u003Cbr /\u003E\u0026gt;\u0026gt;\u0026gt; # now here comes the magic\u003Cbr /\u003E\u0026gt;\u0026gt;\u0026gt; book.title_en\u003Cbr /\u003Eu'Django for Dummies'\u003Cbr /\u003E\u0026gt;\u0026gt;\u0026gt; book.description_pl\u003Cbr /\u003Eu'Django opisane w prostych slowach'\u003C/pre\u003E\u003Cp\u003ETo have it interated with Django Admin nicely, try this: \u003C/p\u003E\u003Cp\u003E\u003Ctt\u003Eadmin.py\u003C/tt\u003E \u003C/p\u003E\u003Cpre class=\"prettyprint\"\u003Efrom django.contrib import admin\u003Cbr /\u003Eimport models\u003Cbr /\u003E\u003Cbr /\u003Eclass BookTranslationInline(admin.StackedInline):\u003Cbr /\u003E\u00a0 \u00a0model = models.BookTranslation\u003Cbr /\u003E\u00a0 \u00a0extra = 1\u003Cbr /\u003E\u00a0 \u00a0min_num = 1\u003Cbr /\u003E\u003Cbr /\u003E\u003Cbr /\u003Eclass BookAdmin(admin.ModelAdmin):\u003Cbr /\u003E\u00a0 \u00a0list_display = [\"ISBN\"]\u003Cbr /\u003E\u00a0 \u00a0inlines = [BookTranslationInline]\u003Cbr /\u003E\u003Cbr /\u003Eadmin.site.register(models.Book, BookAdmin)\u003C/pre\u003E\n"} <p><p>A very simple abstract base class, enabling translation of (specific) model fields with only about 33 lines of code.</p> <p> Example: </p><p><tt>models.py</tt> </p><pre>    from django.db import models<br />    from multiling import MultilingualModel<br />    <br />    class Language(models.Model):<br />        code = models.CharField(max_length=5)<br />        name = models.CharField(max_length=16)<br />        <br />    class BookTranslation(models.Model):<br />        language = models.ForeignKey("Language")<br />        title = models.CharField(max_length=32)<br />        description = models.TextField()<br />        model = models.ForeignKey("Book")<br />        <br />    class Book(MultilingualModel):<br />        ISBN = models.IntegerField()<br />        <br />        class Meta:<br />            translation = BookTranslation<br />            multilingual = ['title', 'description']</pre><pre class="prettyprint">&gt;&gt;&gt; lang_en = Language(code="en", name="English")<br />&gt;&gt;&gt; lang_en.save()<br />&gt;&gt;&gt; lang_pl = Language(code="pl", name="Polish")<br />&gt;&gt;&gt; book = Book(ISBN="1234567890")<br />&gt;&gt;&gt; book.save()<br />&gt;&gt;&gt; book_en = BookTranslation()<br />&gt;&gt;&gt; book_en.title = "Django for Dummies"<br />&gt;&gt;&gt; book_en.description = "Django described in simple words."<br />&gt;&gt;&gt; book_en.model = book<br />&gt;&gt;&gt; book_en.save()<br />&gt;&gt;&gt; book_pl = BookTranslation()<br />&gt;&gt;&gt; book_pl.title = "Django dla Idiotow"<br />&gt;&gt;&gt; book_pl.description = "Django opisane w prostych slowach"<br />&gt;&gt;&gt; book_pl.model = book<br />&gt;&gt;&gt; book_pl.save()<br />&gt;&gt;&gt; <br />&gt;&gt;&gt; # now here comes the magic<br />&gt;&gt;&gt; book.title_en<br />u'Django for Dummies'<br />&gt;&gt;&gt; book.description_pl<br />u'Django opisane w prostych slowach'</pre><p>To have it interated with Django Admin nicely, try this: </p><p><tt>admin.py</tt> </p><pre class="prettyprint">from django.contrib import admin<br />import models<br /><br />class BookTranslationInline(admin.StackedInline):<br />   model = models.BookTranslation<br />   extra = 1<br />   min_num = 1<br /><br /><br />class BookAdmin(admin.ModelAdmin):<br />   list_display = ["ISBN"]<br />   inlines = [BookTranslationInline]<br /><br />admin.site.register(models.Book, BookAdmin)</pre> </p> <p><a href="http://code.google.com/p/django-multilingual-model/">http://code.google.com/p/django-multilingual-model/</a></p>Fri, 22 Oct 2010 11:06:11 GMThttp://cooking.visualspace.nl/post/83330597/django-multilingual-modelurn:www-soup-io:1:83330597link [dokterbob] django-mobile {"tags":[],"type":"link","title":"django-mobile","source":"http://pypi.python.org/pypi/django-mobile/0.1.1","body":"\u003Cp\u003E\u003Cstrong\u003Edjango-mobile\u003C/strong\u003E\u00a0provides a simple way to detect mobile browsers and gives you tools at your hand to render some different templates to deliver a mobile version of your site to the user.\u003C/p\u003E\u003Cdiv\u003E\u003Cbr /\u003E\u003C/div\u003E"} <p><p><strong>django-mobile</strong> provides a simple way to detect mobile browsers and gives you tools at your hand to render some different templates to deliver a mobile version of your site to the user.</p><div><br /></div></p> <p><a href="http://pypi.python.org/pypi/django-mobile/0.1.1">http://pypi.python.org/pypi/django-mobile/0.1.1</a></p>Mon, 18 Oct 2010 23:51:32 GMThttp://cooking.visualspace.nl/post/82654624/django-mobileurn:www-soup-io:1:82654624link [dokterbob] Hg-Git Mercurial Plugin {"tags":[],"type":"link","title":"Hg-Git Mercurial Plugin","source":"http://hg-git.github.com/","body":"\u003Cp\u003EThis is the Hg-Git plugin for Mercurial, adding the ability to\u00a0\u003Cstrong\u003Epush to and pull from a Git server\u003C/strong\u003E\u00a0repository from Mercurial. This means you can collaborate on Git based projects from Mercurial, or use a Git server as a collaboration point for a team with developers using both Git and Mercurial.\u003C/p\u003E\n\u003Cp\u003E\u003Cimg src=\"http://hg-git.github.com/images/server.png\" /\u003E\u003C/p\u003E"} <p><p>This is the Hg-Git plugin for Mercurial, adding the ability to <strong>push to and pull from a Git server</strong> repository from Mercurial. This means you can collaborate on Git based projects from Mercurial, or use a Git server as a collaboration point for a team with developers using both Git and Mercurial.</p> <p><img src="http://hg-git.github.com/images/server.png" /></p></p> <p><a href="http://hg-git.github.com/">http://hg-git.github.com/</a></p>Mon, 18 Oct 2010 09:54:26 GMThttp://cooking.visualspace.nl/post/82528747/Hg-Git-Mercurial-Pluginurn:www-soup-io:1:82528747link [dokterbob] django-fileprocessor: efficient, scalable processing of files (ie. scaling images) {"tags":["django","image","scaling","efficiency","api","files","processing"],"type":"link","title":"django-fileprocessor: efficient, scalable processing of files (ie. scaling images)","source":"http://github.com/dokterbob/django-fileprocessor","body":"\u003Cp\u003E\u003Cstrong\u003EThis is a prototype project for something we have been wanting to make: efficient file processing - from within templates!\u003C/strong\u003E\u003C/p\u003E\n\n\u003Cp\u003ERight now, if you are like me, you probably use something like easy_thumbnail for scaling of images for your website. You might even have written some code to extract thumbnails from PDF files or from video files. All really great work!\u003C/p\u003E\n\n\u003Cp\u003EBUT. As our applications relying on this stuff might actually scale up a bit, the amount of work our application servers are doing WHILE RENDERING THE TEMPLATE can quickly become excessive. At the same time, if these servers were just doing what they should be, namely data \u0026lt;-\u0026gt; view interactions, this would not be happening.\u003C/p\u003E\n\n\u003Cp\u003EMoreover: if your server is, in principle, able to handle a mentioning on some lame but immensely popular blog - why should it not be in practice? Because, right now - if you use \u003Ca href=\"http://github.com/SmileyChris/easy-thumbnails/tree/master/easy_thumbnails\"\u003Eeasy_thumbnails\u003C/a\u003E - your server will block while rendering templates until your thumbnails are gone.\u003C/p\u003E\n\n\u003Cp\u003ESo here is my concept solution: When we need to do something with a file, while rendering a template, we first put out a request. This request can be put out to some other server, but for small instances it can easily be the same server - just some other CPU doing the work. This 'remote tag' basically passes any contents between the \u003Ccode\u003E{% fileprocessor %}\u003C/code\u003E and \u003Ccode\u003E{% endfileprocessor %}\u003C/code\u003E along to this other server as a parameter (so far called instructions), telling it what to do and where to get stuff from.\u003C/p\u003E\n\n\u003Cp\u003EThe remote server writes this to the database, generates a checksum thereof and parses the instructions just well enough to generate some kind of representation (ie. and image tag) of the stuff that will be rendered \u003Cem\u003Elater\u003C/em\u003E.\u003C/p\u003E\n\n\u003Cp\u003EAfter the HTML has been sent out to the client, the client will start making individual requests for the URL's referred to in the representation code generate while rendering the template. Calling these URL's directly triggers processing the file in any possible way, according to the instructions in the database. When this is done, the file is written to some kind of storage, somewhere and a redirect to this file is generated.\u003C/p\u003E\n\n\u003Cp\u003EOn subsequent requests, all the 'file processing server' does is blurt out redirects to that some old file. But as these are permanent redirects, they should also be cached by the client which ought to be quite efficient. Furthermore, the template rendering results can and should also be cached: we do not have to reach out to the server all of the time to retreive the same kind of data.\u003C/p\u003E\n\n\u003Cp\u003ESo that's it. A work in progress. Feel free to join in. :)\u003C/p\u003E"} <p><p><strong>This is a prototype project for something we have been wanting to make: efficient file processing - from within templates!</strong></p> <p>Right now, if you are like me, you probably use something like easy_thumbnail for scaling of images for your website. You might even have written some code to extract thumbnails from PDF files or from video files. All really great work!</p> <p>BUT. As our applications relying on this stuff might actually scale up a bit, the amount of work our application servers are doing WHILE RENDERING THE TEMPLATE can quickly become excessive. At the same time, if these servers were just doing what they should be, namely data &lt;-&gt; view interactions, this would not be happening.</p> <p>Moreover: if your server is, in principle, able to handle a mentioning on some lame but immensely popular blog - why should it not be in practice? Because, right now - if you use <a href="http://github.com/SmileyChris/easy-thumbnails/tree/master/easy_thumbnails">easy_thumbnails</a> - your server will block while rendering templates until your thumbnails are gone.</p> <p>So here is my concept solution: When we need to do something with a file, while rendering a template, we first put out a request. This request can be put out to some other server, but for small instances it can easily be the same server - just some other CPU doing the work. This 'remote tag' basically passes any contents between the <code>{% fileprocessor %}</code> and <code>{% endfileprocessor %}</code> along to this other server as a parameter (so far called instructions), telling it what to do and where to get stuff from.</p> <p>The remote server writes this to the database, generates a checksum thereof and parses the instructions just well enough to generate some kind of representation (ie. and image tag) of the stuff that will be rendered <em>later</em>.</p> <p>After the HTML has been sent out to the client, the client will start making individual requests for the URL's referred to in the representation code generate while rendering the template. Calling these URL's directly triggers processing the file in any possible way, according to the instructions in the database. When this is done, the file is written to some kind of storage, somewhere and a redirect to this file is generated.</p> <p>On subsequent requests, all the 'file processing server' does is blurt out redirects to that some old file. But as these are permanent redirects, they should also be cached by the client which ought to be quite efficient. Furthermore, the template rendering results can and should also be cached: we do not have to reach out to the server all of the time to retreive the same kind of data.</p> <p>So that's it. A work in progress. Feel free to join in. :)</p></p> <p><a href="http://github.com/dokterbob/django-fileprocessor">http://github.com/dokterbob/django-fileprocessor</a></p>Thu, 30 Sep 2010 14:02:20 GMThttp://cooking.visualspace.nl/post/79515630/django-fileprocessor-efficient-scalable-processing-of-filesurn:www-soup-io:1:79515630linkdjangoimagescalingefficiencyapifilesprocessing [dokterbob] django-newsletter released in the Cheese Shop {"tags":[],"type":"link","title":"django-newsletter released in the Cheese Shop","source":"http://pypi.python.org/pypi/django-newsletter","body":"\u003Cp\u003EAfter a long time of though work we have finally released this app for managing multiple mass-mailing lists with both plaintext as well as HTML templates (and TinyMCE editor for HTML messages), images and a smart queueing system all right from the admin interface. And what's more: it's all fully integrated into the Django admin.\u003C/p\u003E\n\u003Cp\u003EStay tuned for some screenshots - or perhaps even a screencast of our (Dutch) presentation of the project this wednesday at the \u003Ca href=\"http://wiki.python.org/moin/DjangoMeetingNL/DM/ABC290910\"\u003EDjango Meeting in Amsterdam\u003C/a\u003E.\u003C/p\u003E"} <p><p>After a long time of though work we have finally released this app for managing multiple mass-mailing lists with both plaintext as well as HTML templates (and TinyMCE editor for HTML messages), images and a smart queueing system all right from the admin interface. And what's more: it's all fully integrated into the Django admin.</p> <p>Stay tuned for some screenshots - or perhaps even a screencast of our (Dutch) presentation of the project this wednesday at the <a href="http://wiki.python.org/moin/DjangoMeetingNL/DM/ABC290910">Django Meeting in Amsterdam</a>.</p></p> <p><a href="http://pypi.python.org/pypi/django-newsletter">http://pypi.python.org/pypi/django-newsletter</a></p>Sun, 26 Sep 2010 15:11:10 GMThttp://cooking.visualspace.nl/post/78783739/django-newsletter-released-in-the-Cheese-Shopurn:www-soup-io:1:78783739link [dokterbob] (Image) {"tags":[],"type":"image","source":null,"body":null,"url":"http://2.asset.soup.io/asset/0919/8930_e44e.png"} <p><a href=""><img alt="8930_e44e_400" height="300" src="http://2.asset.soup.io/asset/0919/8930_e44e_400.png" width="400" /></a></p> <p></p>Sun, 11 Jul 2010 18:39:30 GMThttp://cooking.visualspace.nl/post/64808615/Imageurn:www-soup-io:1:64808615image [dokterbob] LESS {"tags":[],"type":"link","title":"LESS","source":"http://lesscss.org/","body":"Less extends CSS with: variables, mixins, operations and nested rules."} <p>Less extends CSS with: variables, mixins, operations and nested rules.</p> <p><a href="http://lesscss.org/">http://lesscss.org/</a></p>Tue, 06 Jul 2010 19:30:02 GMThttp://cooking.visualspace.nl/post/63948223/LESSurn:www-soup-io:1:63948223link [dokterbob] (Video) {"tags":[],"type":"video","embedcode_or_url":"http://www.youtube.com/watch?v=vYMpihXHobQ","source":"http://www.youtube.com/watch?v=vYMpihXHobQ","body":null} <object height="350" width="425"><param name="movie" value="http://www.youtube.com/v/vYMpihXHobQ" /><param name="wmode" value="transparent" /><embed src="http://www.youtube.com/v/vYMpihXHobQ" wmode="transparent" type="application/x-shockwave-flash" height="350" width="425" /></object>Sat, 29 May 2010 13:17:33 GMThttp://cooking.visualspace.nl/post/58026459/Videourn:www-soup-io:1:58026459video [dokterbob] Introduction to Surlex {"tags":[],"type":"link","title":"Introduction to Surlex","source":"http://codysoyland.com/2009/sep/6/introduction-surlex/","body":"Surlex (Simple URL Expression) is a language for matching and extracting text, similar to regex (regular expression). It works by generating a regular expression from a more concise syntax that is designed to produce easy-to-read url patterns."} <p>Surlex (Simple URL Expression) is a language for matching and extracting text, similar to regex (regular expression). It works by generating a regular expression from a more concise syntax that is designed to produce easy-to-read url patterns.</p> <p><a href="http://codysoyland.com/2009/sep/6/introduction-surlex/">http://codysoyland.com/2009/sep/6/introduction-surlex/</a></p>Tue, 13 Apr 2010 09:52:43 GMThttp://cooking.visualspace.nl/post/52904706/Introduction-to-Surlexurn:www-soup-io:1:52904706link [dokterbob] Git Repository Basics Guide {"tags":[],"type":"link","title":"Git Repository Basics Guide","source":"http://wiki.sourcemage.org/Git_Guide","body":null} <p><a href="http://wiki.sourcemage.org/Git_Guide">http://wiki.sourcemage.org/Git_Guide</a></p>Fri, 24 Jul 2009 14:23:50 GMThttp://cooking.visualspace.nl/post/23864729/Git-Repository-Basics-Guideurn:www-soup-io:1:23864729link [dokterbob] Setting up a new remote git repository {"tags":[],"type":"link","title":"Setting up a new remote git repository","source":"http://toolmantim.com/articles/setting_up_a_new_remote_git_repository","body":"To collaborate in a distributed development process you\u2019ll need to push code to remotely accessible repositories."} <p>To collaborate in a distributed development process you’ll need to push code to remotely accessible repositories.</p> <p><a href="http://toolmantim.com/articles/setting_up_a_new_remote_git_repository">http://toolmantim.com/articles/setting_up_a_new_remote_git_repository</a></p>Fri, 24 Jul 2009 13:50:32 GMThttp://cooking.visualspace.nl/post/23862874/Setting-up-a-new-remote-git-repositoryurn:www-soup-io:1:23862874link [dokterbob] Django Guestbook application {"tags":[],"type":"regular","title":"Django Guestbook application","source":null,"body":"\u003Cp\u003EThe other day I've written a pluggable guestbook application for Django. It is fully functioning and loosely based on the Django comments contrib. Currently, I am using it on a small website (\u003Ca href=\"http://www.hansenpaul120.nl/guestbook/\"\u003Ehansenpaul120.nl\u003C/a\u003E, Dutch) but more websites are soon to follow.\u003C/p\u003E\n\n\u003Cp\u003ECurrent features:\n\u003C/p\u003E\u003Cul\u003E\n \u003Cli\u003EFully translatable (currently, only English and Dutch are available)\u003C/li\u003E\n \u003Cli\u003EFully integrated with the admin\u003C/li\u003E\n \u003Cli\u003ESome barebone templates are supplied\u003C/li\u003E\n\u003C/ul\u003E\n\u003Cp\u003EMore features will be added as soon as I am going to use this in more sites, or when \u003Cb\u003Eyou\u003C/b\u003E do so. Some of these features may include:\n\u003C/p\u003E\u003Cul\u003E\n \u003Cli\u003E(Better) documentation.\u003C/li\u003E\n \u003Cli\u003EIntegration with \u003Ca href=\"http://docs.djangoproject.com/en/dev/ref/contrib/syndication/\"\u003EDjango syndication\u003C/a\u003E\u003C/li\u003E\n \u003Cli\u003EIntegration with \u003Ca href=\"http://code.google.com/p/django-email-confirmation/\"\u003EDjango email confirmation\u003C/a\u003E\u003C/li\u003E\n \u003Cli\u003EIntegration with \u003Ca href=\"http://docs.djangoproject.com/en/dev/topics/auth/\"\u003EDjango User authentication\u003C/a\u003E\u003C/li\u003E\n\u003C/ul\u003E\n\n\u003Cp\u003EInstallation should be pretty straight-forward for anyone who's installed a Django app before:\n\u003C/p\u003E\u003Col\u003E\n \u003Cli\u003EGet the source from \u003Ca href=\"http://github.com/dokterbob/django-guestbook/\"\u003EGitHub\u003C/a\u003E by either cloning or downloading the archive.\u003C/li\u003E\n \u003Cli\u003ELink the guestbook app into your project's tree:\u003Cbr /\u003E\n \u003Cpre\u003Eln -s django-guestbook/guestbook guestbook\u003C/pre\u003E\n \u003C/li\u003E\n \u003Cli\u003EAdd the app to your \u003Ccode\u003EINSTALLED_APPS\u003C/code\u003E in \u003Ccode\u003Esettings.py\u003C/code\u003E:\u003Cbr /\u003E\n \u003Cpre\u003EINSTALLED_APPS = (\u003Cbr /\u003E ...\u003Cbr /\u003E 'django.contrib.admin',\u003Cbr /\u003E 'guestbook',\u003Cbr /\u003E)\u003C/pre\u003E\n \u003C/li\u003E\u003Cli\u003EAdd the guestbook app to your \u003Ccode\u003Eurls.py\u003C/code\u003E:\u003Cbr /\u003E\n \u003Cpre\u003Eurlpatterns = patterns('',\u003Cbr /\u003E ...\u003Cbr /\u003E (r'^guestbook/', include('guestbook.urls')), \u003Cbr /\u003E)\u003C/pre\u003E\n \u003C/li\u003E\u003Cli\u003EUpdate the database structure:\u003Cbr /\u003E\n \u003Cpre\u003E./manage.py syncdb\u003C/pre\u003E\n \u003C/li\u003E\n \u003Cli\u003EYou're done! Go and test your app by running:\u003Cbr /\u003E\n \u003Cpre\u003E./manage.py runserver\u003C/pre\u003E\n \u003C/li\u003E\n\u003C/ol\u003E\n\u003Cp\u003EFeel free to provide feedback on the current state of the project, and perhaps on what features you might like. In any case, expect a more complete HOWTO here.\u003C/p\u003E\n\n\u003Cp\u003EThe app's source code can be found \u003Ca href=\"http://github.com/dokterbob/django-guestbook/\"\u003Ehere\u003C/a\u003E on GitHub and the source for the hansenpaul120.nl website is \u003Ca href=\"http://github.com/dokterbob/hansenpaul/\"\u003Ehere\u003C/a\u003E. The latter might be a good place to see how the guestbook application can be used.\u003C/p\u003E"} <p>The other day I've written a pluggable guestbook application for Django. It is fully functioning and loosely based on the Django comments contrib. Currently, I am using it on a small website (<a href="http://www.hansenpaul120.nl/guestbook/">hansenpaul120.nl</a>, Dutch) but more websites are soon to follow.</p> <p>Current features: </p><ul> <li>Fully translatable (currently, only English and Dutch are available)</li> <li>Fully integrated with the admin</li> <li>Some barebone templates are supplied</li> </ul> <p>More features will be added as soon as I am going to use this in more sites, or when <b>you</b> do so. Some of these features may include: </p><ul> <li>(Better) documentation.</li> <li>Integration with <a href="http://docs.djangoproject.com/en/dev/ref/contrib/syndication/">Django syndication</a></li> <li>Integration with <a href="http://code.google.com/p/django-email-confirmation/">Django email confirmation</a></li> <li>Integration with <a href="http://docs.djangoproject.com/en/dev/topics/auth/">Django User authentication</a></li> </ul> <p>Installation should be pretty straight-forward for anyone who's installed a Django app before: </p><ol> <li>Get the source from <a href="http://github.com/dokterbob/django-guestbook/">GitHub</a> by either cloning or downloading the archive.</li> <li>Link the guestbook app into your project's tree:<br /> <pre>ln -s django-guestbook/guestbook guestbook</pre> </li> <li>Add the app to your <code>INSTALLED_APPS</code> in <code>settings.py</code>:<br /> <pre>INSTALLED_APPS = (<br /> ...<br /> 'django.contrib.admin',<br /> 'guestbook',<br />)</pre> </li><li>Add the guestbook app to your <code>urls.py</code>:<br /> <pre>urlpatterns = patterns('',<br /> ...<br /> (r'^guestbook/', include('guestbook.urls')), <br />)</pre> </li><li>Update the database structure:<br /> <pre>./manage.py syncdb</pre> </li> <li>You're done! Go and test your app by running:<br /> <pre>./manage.py runserver</pre> </li> </ol> <p>Feel free to provide feedback on the current state of the project, and perhaps on what features you might like. In any case, expect a more complete HOWTO here.</p> <p>The app's source code can be found <a href="http://github.com/dokterbob/django-guestbook/">here</a> on GitHub and the source for the hansenpaul120.nl website is <a href="http://github.com/dokterbob/hansenpaul/">here</a>. The latter might be a good place to see how the guestbook application can be used.</p>Tue, 23 Dec 2008 12:07:38 GMThttp://cooking.visualspace.nl/post/9992059/Django-Guestbook-applicationurn:www-soup-io:1:9992059regular