Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Facebook wall like application in Django - part 1
Creating Facebook Wall-like or Twitter-like Django application for small social, intranet or collaboration sites. Part 1 - playing with models and queries. -
GitHub and django-articles
Some of you who prefer to use git for your version control needs and were following the django-articles mirror on GitHub may have noticed some strange activity recently. I noticed today that the GitHub mirror was out of sync with the other mirrors, and I took a bit of time to investigate the problem. I thought, for some reason, that I might be able to quickly and easily bring it back into sync if I just deleted the repo, recreated it, and pushed my changes to it. That didn't work. This means that all of you who were once following the project there are no longer following it, and I only realized that side effect after I had clicked the delete button. I apologize for this inconvenience. In the end, it turned out that I had some things misconfigured with git on my box. I have resolved the problems and have brought the mirror back into sync. Please let me know if you run into any problems with it! -
New Feature in django-articles: Articles From Email
One of the features that I really like about sites like posterous and tumblr is that they allow you to send email to a special email address and have it be posted as a blog article. This is a feature I've been planning to implement in django-articles pretty much since its inception way back when. I finally got around to working on it. The latest release of django-articles allows you to configure a mailbox, either IMAP4 or POP3, to periodically check for new emails. A new management command check_for_articles_from_email can be used to process the messages found in the special mailbox. If any emails are found, they will be fetched, parsed, and posted based on your configuration values. Only articles whose sender matches an active user in your Django site will be turned into articles. You can configure the command to mark such articles from email as "inactive" so they don't appear on the site without moderation. The default behavior, actually, is to mark the articles inactive--you must explicitly configure django-articles to automatically mark the articles as active if you want this behavior. One of the biggest things that you should keep in mind with this new feature, though, is … -
GitHub and django-articles
Some of you who prefer to use git for your version control needs and were following the django-articles mirror on GitHub may have noticed some strange activity recently. I noticed today that the GitHub mirror was out of sync with the other mirrors, and I took a bit of time to investigate the problem. I thought, for some reason, that I might be able to quickly and easily bring it back into sync if I just deleted the repo, recreated it, and pushed my changes to it. That didn't work. This means that all of you who were once following the project there are no longer following it, and I only realized that side effect after I had clicked the delete button. I apologize for this inconvenience. In the end, it turned out that I had some things misconfigured with git on my box. I have resolved the problems and have brought the mirror back into sync. Please let me know if you run into any problems with it! -
New Feature in django-articles: Articles From Email
One of the features that I really like about sites like posterous and tumblr is that they allow you to send email to a special email address and have it be posted as a blog article. This is a feature I've been planning to implement in django-articles pretty much since its inception way back when. I finally got around to working on it. The latest release of django-articles allows you to configure a mailbox, either IMAP4 or POP3, to periodically check for new emails. A new management command check_for_articles_from_email can be used to process the messages found in the special mailbox. If any emails are found, they will be fetched, parsed, and posted based on your configuration values. Only articles whose sender matches an active user in your Django site will be turned into articles. You can configure the command to mark such articles from email as "inactive" so they don't appear on the site without moderation. The default behavior, actually, is to mark the articles inactive--you must explicitly configure django-articles to automatically mark the articles as active if you want this behavior. One of the biggest things that you should keep in mind with this new feature, though, is … -
djangoappengine updates: IN and != queries and DecimalField
Django-nonrel's App Engine backend (djangoappengine) now finally supports all query features available on App Engine. Additionally, we now support DecimalField, thanks to Mariusz Kryński! Let's start with "!=" query support. You can now create queries like this: Post.objects.exclude(category='sql') This has the same behavior as the App Engine code Post.all().filter('category !=', 'sql'). Internally, this actually gets converted into two queries (even with App Engine's native API): "category > 'sql'" and "category < 'sql'". We also now support IN queries like this one: Post.objects.filter(category__in=['django', 'NoSQL']) This has the same behavior as the App Engine code Post.all().filter('category IN', ['django', 'fun']). Again, internally this gets converted into two queries: "category = 'django'" and "category = 'NoSQL'". Note that you can't create queries which would need more than 30 sub-queries. Finally, you can now use DecimalField: from decimal import Decimal from django.db import models class DecimalModel(models.Model): decimal = models.DecimalField(max_digits=9, decimal_places=2) result = DecimalModel.objects.get(decimal=Decimal('45.60')) The difference between decimals and floats is that decimals are exact whereas a floats have rounding errors. For example, if you enter "2.3" this into a Python console you get: >>> 2.3 2.2999999999999998 In contrast, a decimal would stay exactly "2.3". So, what's next? During this Google I/O we might get to … -
django-moderation new release 0.2 - status update
Today i have released new version of django-moderation - 0.2. It has been uploaded in to pypi, so now it can be installed with easy_install. Many bugs were fixed and many new features were added since initial release. List of changes Added GenericModerator class that encapsulates moderation options for a given model.Changed register method, it will get only two parameters: model class and settings class. Added option to register models with multiple managers. Added options to GenericModerator class: auto_approve_for_superusers, auto_approve_for_staff, auto_approve_for_groups, auto_reject_for_anonymous, auto_reject_for_groups. Added methods for checking auto moderation. Added automoderate helper function. Changed moderated_object property in ModerationManager class, moderated object is get only once from database, next is cached in moderatedobject, fixed issue with not setting user object on changed_by attribute of ModeratedObject model. Fixed issue when loading object from fixture for model class that is registered with moderation. Now moderated objects will not be created when objects are loaded from fixture. Fixed issue with TypeError when generating differences of changes between model instances that have field with non unicode value ex. DateField. Fixed issue with accessing objects that existed before installation of django-moderation on model class. Fixed issue when more then one model is registered with moderation and … -
New Django Site – Blog Twin
I created Blog Twin after reading a blog post by Viper Chill entitled The Secret to growing your blog twice as fast with half the effort, I decided to create a site that would help people find a blogging partner. Blog Twin is written in Django (naturally!). You register, add details of your blog, and [...] -
Backend supported Backup/Restore
The current application data is now ready to be backed-up, and restored as and when required.Present application data can now be exported as JSON fixtures, to get a snapshot of the current application datastore state. At present it'll export the following objects:BlogsUsersAuthorsPostsCommentsThe backup scripts uses Django Serialization to store the objects into files, and are deserialized into native python objects when restoring.Thus, now backup and restore of the online project contents is possible. Currently, this can only be done from the backend, but later a more restricted version of it will be available from the front-end too. -
Backend supported Backup/Restore
The current application data is now ready to be backed-up, and restored as and when required.Present application data can now be exported as JSON fixtures, to get a snapshot of the current application datastore state. At present it'll export the following objects:BlogsUsersAuthorsPostsCommentsThe backup scripts uses Django Serialization to store the objects into files, and are deserialized into native python objects when restoring.Thus, now backup and restore of the online project contents is possible. Currently, this can only be done from the backend, but later a more restricted version of it will be available from the front-end too. -
Free to comment
The commenting system is now available.Although it is going to be still under development, and more features might be added to it. It's now totally usable by others, none the less.The current development version of Django does provide a comments framework to work with comments on other existing data models. I still decided not to use it at this point of time. There are two main reasons for that:The comments framework is used as just another Django application (which I don't want to happen in this case), and it's development is not yet stabilized, going through modular and implemention changes.I'm not sure whether I would like to stick to the current system either, and may switch to something like DISQUS. In such a case the porting might be a little less complex.Although I have certain advanced plans for the commenting system, I don't except them to get implemented until a more matured version of ScratchBlog comes through. -
Free to comment
The commenting system is now available.Although it is going to be still under development, and more features might be added to it. It's now totally usable by others, none the less.The current development version of Django does provide a comments framework to work with comments on other existing data models. I still decided not to use it at this point of time. There are two main reasons for that:The comments framework is used as just another Django application (which I don't want to happen in this case), and it's development is not yet stabilized, going through modular and implemention changes.I'm not sure whether I would like to stick to the current system either, and may switch to something like DISQUS. In such a case the porting might be a little less complex.Although I have certain advanced plans for the commenting system, I don't except them to get implemented until a more matured version of ScratchBlog comes through. -
Django 1.2 release notes
Django 1.2 release notes (via). Released today, this is a terrific upgrade. Multiple database connections, model validation, improved CSRF protection, a messages framework, the new smart if template tag and lots, lots more. I’ve been using the 1.2 betas for a major new project over the past few months and it’s been smooth sailing all the way. -
Django Facebook – Open graph API implementation
Update: This blog post is outdated, a new and vastly upgraded version of Django Facebook is now available. Read more about it here. For Fashiolista.com we needed to integrate with the Facebook Open Graph API. The open graph API is a very exciting facebook project, which you can read about more here and here. The code at fashiolista.com allows you to register/login via facebook using the Open Graph API (similar to the old Facebook connect, but registration, instead of only logging in). Before you go try it out, fashiolista.com is aimed primarily at females so your girl friends facebook account is probably a better fit. Im releasing the source code for Django Facebook on github. Its a very early release, but it might help other developers trying to implement a facebook register/loging flow using the new open graph api. See Github for requirements and installation instructions. Update: Birthday formats are currently giving some troubles for some users. Fixed and tests added to prevent future problems. (note Fashiolista.com may still give errors, will be resolved during our next release). Share and Enjoy: -
Index definition mystery
According to the App Engine documentation, the index definitions at index.yaml should be added automatically by the development web server. But, in my current project setup, it's not happening that way, and I have to manually make the entries for it, atleast for the admin application.Now sure whether this is a bug at App Engine, or Django-nonrel, or at my end. But would surely like to get to the bottom of this. And when I do, will get back with more info about it here. -
Index definition mystery
According to the App Engine documentation, the index definitions at index.yaml should be added automatically by the development web server. But, in my current project setup, it's not happening that way, and I have to manually make the entries for it, atleast for the admin application.Now sure whether this is a bug at App Engine, or Django-nonrel, or at my end. But would surely like to get to the bottom of this. And when I do, will get back with more info about it here. -
Cronograna de lançamento do Django 1.2 -- atualização final
Cronograna de lançamento do Django 1.2 -- atualização final -
Cronograna de lançamento do Django 1.2 -- atualização final
Cronograna de lançamento do Django 1.2 -- atualização final -
Ported to Django-nonrel
Working with the google-app-engine-django helper was proving to be of some pain. Not only did I have to write the code twice, it was also getting very hectic to test the application too! So, decided to look for alternatives. After searching through the list of alternative, which wasn't long anyway, I decided to try out Django-nonrel.After going through it's documentations and also trying out it out, finally decided to switch the from the "django-app-engine-django" helper to the "Django-nonrel" port.Although it doesn't yet support all of Django APIs out of the box, but still has support upto a certain acceptible extent. The best part seems to be the way in which the port is supposed to work. And being currently a very active project, it's future and prospect seems good. They're using the lastest version of Django and hacking it's core to get support for non-relational databases and the App Engine database backend.The manage.py looks loaded with many useful common features, other than just the regular ones. Now remote login python shell to the GAE application server is just too easy. Infact the remote feature can be used with it's other subcommands too.Overall, it seemed to be the most promising thing … -
Ported to Django-nonrel
Working with the google-app-engine-django helper was proving to be of some pain. Not only did I have to write the code twice, it was also getting very hectic to test the application too! So, decided to look for alternatives. After searching through the list of alternative, which wasn't long anyway, I decided to try out Django-nonrel.After going through it's documentations and also trying out it out, finally decided to switch the from the "django-app-engine-django" helper to the "Django-nonrel" port.Although it doesn't yet support all of Django APIs out of the box, but still has support upto a certain acceptible extent. The best part seems to be the way in which the port is supposed to work. And being currently a very active project, it's future and prospect seems good. They're using the lastest version of Django and hacking it's core to get support for non-relational databases and the App Engine database backend.The manage.py looks loaded with many useful common features, other than just the regular ones. Now remote login python shell to the GAE application server is just too easy. Infact the remote feature can be used with it's other subcommands too.Overall, it seemed to be the most promising thing … -
IxC workshop May'10
Yesterday we organised another of our monthly workshops. Varied topics were presented and discussed. Brett presented his learning experience during his internship at the IxC. I presented ways for boosting one’s productivity with text expanding, apple scripts and automations. Thomas and Brett showcased some cool features respectively from the LESS CSS framework and Coffee script. George proposed ways for including javascript libraries into reusable Django applications. Greg organised a fun game, based on index cards and “rock-paper-scissors”-style plays, for the agile estimation of feature implementation. This is something we’re actually (seriously!) about to implement in some of our biggest client projects. Those workshops are a great way for the team to share knowledge and good tips and to stay on the edge of all the cool things out there. We’re planning to make them public at some stage, so stay tuned! -
Scratchy Start
Porting this Django application to Google App Engine is proving to be some pain!Initiallialy I had thought that it won't be much of a thing. And since the google-app-engine-django helper was already out there, I thought things won't be that much difficult.Started with including the Django development version, and I just realized that things might not be that easy. Had to switch back to Django 1.1.1 version, and after putting it in place of the SVN version, the helper can launch the django devlopment server, to say the least. The helper still fails in one of the tests it performs, but who cares, my app engine server is up and running and ready to serve Django.The Django Models had to be replaced with the App Engine Models. I'm using the Google App Engine backed datastore, as I'm not willing to spend for hosting yet. The views also had to changed due to the change in APIs from Django to App Engine. The development server is working pretty much fine, and after a little time, the local datastore is created using my simple python scripts.Now the deployment. It was too easy to get the files up here. But, the biggest problem. … -
Scratchy Start
Porting this Django application to Google App Engine is proving to be some pain!Initiallialy I had thought that it won't be much of a thing. And since the google-app-engine-django helper was already out there, I thought things won't be that much difficult.Started with including the Django development version, and I just realized that things might not be that easy. Had to switch back to Django 1.1.1 version, and after putting it in place of the SVN version, the helper can launch the django devlopment server, to say the least. The helper still fails in one of the tests it performs, but who cares, my app engine server is up and running and ready to serve Django.The Django Models had to be replaced with the App Engine Models. I'm using the Google App Engine backed datastore, as I'm not willing to spend for hosting yet. The views also had to changed due to the change in APIs from Django to App Engine. The development server is working pretty much fine, and after a little time, the local datastore is created using my simple python scripts.Now the deployment. It was too easy to get the files up here. But, the biggest problem. … -
This is a sample title
This is a sample content used for testing this new blogging application. The content is being used for testing my new Django application, codenamed as "ScratchBlog". Let's see how it goes through. -
This is a sample title
This is a sample content used for testing this new blogging application. The content is being used for testing my new Django application, codenamed as "ScratchBlog". Let's see how it goes through.