Translating Django admin interface - django

I'm trying to customize Django generated admin interface so it will display in my native language Hebrew (including right-to-left orientation) but I cant seem to find an how-to or any reference whatsoever.
The Django translation docs hasn't given me a clear answer, even though apparently someone already created an Hebrew translation.
Any help would be greatly appreciated!

Here you have info you look for:
https://docs.djangoproject.com/en/1.1/topics/i18n/localization/
Edit:
I didn't found that page on 1.4 docs but here it is for 1.3 which should be still correct.
AFAIK nothing changed in that matter in 1.4.
https://docs.djangoproject.com/en/1.3/topics/i18n/localization/
Edit2:
Here is info for django 1.4 https://docs.djangoproject.com/en/1.4/topics/i18n/translation/
Info about generating po files is here https://docs.djangoproject.com/en/1.4/topics/i18n/translation/#message-files

Related

How to get to the right Django documentation?

I'm new to Django. I'm very familiar with Python. We're working with Django 1.8 (I thought with 1.18... this was part of my confusion but by far not all). In most cases I try to find documentation Google sends me to documentation of other versions of Django. This has been quite confusing. With Drupal I can just add d6 or d7 to my search query in Google to get to the right place. Not so with Django it seems.
How do you (experienced Django devs) get to the right page with the right documentation for the version you're working with?
The bottom right corner has a version number. Doesn't really help me to get to the right docs though.
Not all languages have documentation available. For example, 1.8 may not be in Japanese, but 1.9 and 1.10 are (and according to your screenshot, same for Spanish)
The URL at docs.djangoproject.com also has a version chooser, e.g.
https://docs.djangoproject.com/en/1.10/search/?q=filefield
What I do is go to http://docs.djangoproject.com/en/
There's a floating box at the lower right where you can choose the documentation version.
Then on the right sidebar, I click download as HTML to save it locally. No need to worry if you're on the right version now.
BTW there is no 1.18, it's just 1.8!

Embedded FleetDB with Clojure 1.3

I'm trying to embedded the latest FleetDB to app using Clojure 1.3. I think because of the absent of contrib, it won't work anymore.
Has anybody here got Clojure 1.3 working with embedded Fleetdb and if you do can I see your project.clj ?
Can't answer your question specifically as I haven't used FleetDB.
However the following page is very useful for seeing what happened to the various parts of contrib: http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go
I suspect that it would be possible using the above to get your project.clj right for 1.3.

What's a good open source django project to learn from?

What is a good django open source app that I can learn from? Something that follows best practices, and covers the majority of features and isn't overly complicated?
This would depend on your current level of knowledge of python and django.
If you are just starting to use django, I suggest you take a look in django documentation. It is well specified and clear. If you have some project in mind, start working on it while looking up for best practices about specific parts. For python coding style try to follow the pep 8 style guide.
If you already have done some work with django there are many sites lie these:
http://djangopackages.com/categories/apps/
http://www.django-apps.com/
What I do nowdays is look into django contrib apps (admin, auth, comments, flatpages), which are built based on the rest of django. This gives the best ways on how to write my apps.
Following the django comments framework (object independent), I am working on an app django-valuate (object independent attachment of ratings, likebuttons etc. through template tags)
These are some of my views. I have also starred this question, as I would like to know about some different perspectives and if mine are sound.
I've found djangobb (www.djangobb.org) to be a complete application, production quality and relatively simple. I use it as a base for my application which has nothing to do with forums and bb.
cloc output: only 3000 lines of python code in 30 files, another 2900 lines of templates html
I do not think there would be any one specific app that would cover all/most features of Django since the concept of the Django app itself is to perform specific/related functionality.
Having said that, a popular Django app is django-registration. Its popularity stems from the obvious requirement of most webapps to have User authentication and also its extremely easy to integrate with a Django project.
The best approach perhaps would be to keep trying the tons of open source Django apps available on the net. You can browse through http://www.djangopackages.com/ and http://www.django-apps.com/ to start getting your hands dirty.
snipt.net, a code sharing site:
https://github.com/lionburger/snipt
Review Board, a code review web app
https://github.com/reviewboard/reviewboard/tree/master/reviewboard
rietveld, another code review on app engine, by GVR himself. You need to know a bit of Django before digging into this source code since the Django models don't work on App Engine, GAE db model is used instead.
http://code.google.com/p/rietveld/source/browse/#svn%2Ftrunk

How do customize django-registration (pass parameters, use other built-in forms)

I a new to django and python. I have however managed to build a small part of my application and I am in the point where I want to add a user registration feature.
I have downloaded and installed django-administration and so far I have been impressed with the basic and default configuration. BUT upon trying to customize some of it's behaviour I am stuck for 3 hours now.
How do I go about changing the success_url?
How do I go about using RegistrationFormTermsOfService()?
The docs make it sound so easy but for a newbie like I am stuck and frustrated. It is too vague and assumes too much from newcomers.
Can anyone show me a very quick example on how to do this? What files to edit, etc.
Any reply would be greatly appreciated as I have been trying to figure this out for the last few hours.
Regards,
Wenbert
From django-registration FAQ
How do I pass custom arguments to the views?
Part 3 of the official Django tutorial, when it introduces generic views, covers the necessary mechanism: simply provide a dictionary of keyword arguments in your URLconf.

Need help choosing a framework for bilingual site

First, some background information... I'm coming up on a medium-scale website for a non-profit that will require both English and Korean translations. Feature-set includes: CMS for normal content, a blog, some form submission/handling (including CSV/PDF exports), a job posting board, a directory of related businesses and non-profits (that accepts visitor submissions), and a basic (probably blog-driven) newsroom.
I have a fairly strong development background, and I've done some sites using Drupal, built some basic custom CMSes using frameworks like CodeIgniter, and I've recently started getting into Django. These are the primary options that I am exploring, and I would consider using different tools for different portions of the project, but what I'm mainly interested in, is if anyone has any experience to share with regards to localization/internationalization. I haven't yet put together a site that supports multiple languages, so before I get in trouble by underestimating the task, or making poor assumptions, I'd like to get some input to help guide my decision-making process.
Do you have any recommendations for frameworks (Drupal, Django, CodeIgniter) that handle localization/internationalization/translation well for a CMS? I know they all support it, but I'm looking for real-world experience here (or suggestions for modules/plugins given explanations).
Sorry for the longwinded question, but I wanted to be clear as possible. Thanks in advance!
There is a distinction between "site" translation and content translation. Django handles the site translation great, out of the box. The content translation, however, requires making some decisions (there's no one right way at this point). This probably makes sense, because of the very nature of Django as a lower level framework (when compared to something like Drupal, which is intended to serve as a complete CMS).
There are applications for Django which are meant to add this functionality (in the form of translations configured at the model level):
Django-multilingual
Transmeta
Also, I found this question that is related.
The bottom line though, is that this is still being explored in the Django world, and neither approach has been decided upon for the framework. Also, although I haven't used it, Drupal has module support for this in the form of the i18n module.
I will update with more conclusions as I come to them. If you have anything to add about content translation in Django or in Drupal, feel free to add your own answer as well.
You probably already know that the native i18n support in django is quite good. As for translation, you might try the django-rosetta app which allows you to grant translation rights to a subset of users, who are then able to translate through an admin-like interface.
Zend_Translate is pretty comprehensive. And if you decide to use PHP, I suggest you take a look at it. It provides multiple interfaces (e.g. an Array, CSV, Gettext, etc.) to manage your translations, which makes it IMHO unmatched when it comes to PHP.
I'm not sure how well it plays with Drupal, since Drupal is hardly a framework but more a CMS -- or maybe a CMS framework. I'm pretty sure that Drupal either has a thing build in or that there is a plugin for it.
With CodeIgniter you would start from scratch and Zend_Translate plays well with it.
I liked Drupal over Joomla. You should also look into DotNetNuke, out of the box it has lot of things that will meet your needs.
Checkout django-blocks. Has multi-language Menu, Flatpages and even has a simple Shopping Cart!!