Re: Thread safe language switching?

2010-02-26 Thread Jarek Zgoda
? Is there any other way how to get verbose_name of the model for each defined language? From the code it looks like this is thread safe, thread-local seems to be used to store the translation catalog. -- Artificial intelligence stands no chance against natural stupidity Jarek Zgoda, R, Redefine

Re: i18n: date translation in Python

2009-12-22 Thread Jarek Zgoda
Wiadomość napisana w dniu 2009-12-22, o godz. 12:39, przez Jarek Zgoda: > Wiadomość napisana w dniu 2009-12-22, o godz. 09:29, przez Baurzhan > Ismagulov: > >>> Maybe what I did can help you: in case you want to put the day name >>> in >>> the template yo

Re: i18n: date translation in Python

2009-12-22 Thread Jarek Zgoda
cales to work at the same time. I'd propose to use Babel (http://babel.edgewall.org/) which has nice Django integration (http://babel.edgewall.org/wiki/BabelDjango). You can format dates, times and currencies in different formats and specify locales in formatting functions. -- Artificial intelli

Re: Best practice for implementing alternate templates (themes)

2009-12-22 Thread Jarek Zgoda
ared not enough for one of customers and we added extra template loader for the case similar to your 2nd approach. -- Artificial intelligence stands no chance against natural stupidity Jarek Zgoda, R, Redefine jarek.zg...@redefine.pl -- You received this message because you are subscribed to th

Re: Forms Delay

2009-12-16 Thread Jarek Zgoda
using this problem? The default value is calculated once, at compilation time. Future form creation calls inherit this calculated value. Use GetGameChoices without braces, the callable will be called when necessary. -- Artificial intelligence stands no chance against natural stupidity

Re: psycopg2 and "idle in transaction" messages

2009-12-11 Thread Jarek Zgoda
had such problem when using only Django ORM. -- Artificial intelligence stands no chance against natural stupidity Jarek Zgoda, R, Redefine jarek.zg...@redefine.pl -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group

Re: MySQL error 1406 while running syncdb

2009-12-02 Thread Jarek Zgoda
ckages\django\contrib\auth\management \__init__.py", line 28, in create_permissions defaults={'name': name, 'content_type': ctype}) Do you have any custom-defined permissions for your models? -- Artificial intelligence stands no chance against natural stupidity Jarek Zgoda, R, Redefine

Re: Django + Cherokee Web Server

2009-11-30 Thread Jarek Zgoda
error handling routine. Anyway, I never encountered such behaviour when working with nginx and lighttpd and all Django error handling machinery has been fully loaded - only in cases when Django initialization has been interrupted. -- Artificial intelligence stands no chance against natu

Re: Django + Cherokee Web Server

2009-11-26 Thread Jarek Zgoda
formation is to turn on FastCGI debug. -- Artificial intelligence stands no chance against natural stupidity Jarek Zgoda, R, Redefine jarek.zg...@redefine.pl -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, se

Re: Avoiding MIME_BASE64_TEXT SpamAssassin Test when sending Email From Django?

2009-11-24 Thread Jarek Zgoda
Wiadomość napisana w dniu 2009-11-23, o godz. 17:43, przez rmschne: > I'm using Django's email sending functions (http:// > docs.djangoproject.com/en/dev/topics/email/#topics-email) to send > mail. > > I construct the simple HTML mail with a small bit of Python code which > is based on data from

Re: Urls.py: Match a leading Question Mark

2009-09-25 Thread Jarek Zgoda
) And that's all. -- Artificial intelligence stands no chance against natural stupidity Jarek Zgoda, R, Redefine jarek.zg...@redefine.pl --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gro

Re: Save model as new record in db

2009-09-07 Thread Jarek Zgoda
ert on the save method with no success. You can clear the value of pk in the save() method: self.pk = None super(MyModel, self).save(*args, **kw) -- Artificial intelligence stands no chance against natural stupidity Jarek Zgoda, R, Redefine jarek.zg

Re: 500 error when DEBUG = False but not True

2009-08-28 Thread Jarek Zgoda
es actual source of the error. See http://docs.djangoproject.com/en/dev/topics/http/views/#the-500-server-error-view . When DEBUG == True the 500 errors are processed by debugging view. -- Artificial intelligence stands no chance against natural stupidity Jarek

Re: Execute code after sending a http response?

2009-08-28 Thread Jarek Zgoda
t.com/en/dev/topics/signals/ . -- Artificial intelligence stands no chance against natural stupidity Jarek Zgoda, R, Redefine jarek.zg...@redefine.pl --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users&quo

Re: Check server type at runtime?

2009-08-20 Thread Jarek Zgoda
he >>>> development server? >> >>>> Thanks! Long ago I tried to check the value of os.environ['SERVER_SOFTWARE'], but I cann't recall if this was succesful. -- Artificial intelligence stands no chance against natural stupidity Jarek Zgoda, R, Redefine jarek.zg...

Re: Accent-insensitive queryset filter

2009-08-20 Thread Jarek Zgoda
this is not possible. There was some project during GSOC 2008 to allow database- level collation definitions for PostgreSQL (CREATE COLLATION etc.), but I don't know the result. -- Artificial intelligence stands no chance against natural stupidity Jarek Zgoda, R, Redefine jarek.

Re: Need for an internationalization/translation system not request-based

2009-08-13 Thread Jarek Zgoda
internationalization subsystem as stable API so I'd not worry. get_language() gives you current language for the thread, which may be already different than request.LANGUAGE_CODE. -- Artificial intelligence stands no chance against natural stupidity Jarek Zgoda, R, Redefine ja

Re: Need for an internationalization/translation system not request-based

2009-08-13 Thread Jarek Zgoda
Wiadomość napisana w dniu 2009-08-12, o godz. 17:11, przez Andrea Zilio: > I'm sorry, can you explain a little bit this problem? Or where I can > get info about it? > > On Aug 12, 3:48 pm, Jarek Zgoda <jarek.zg...@redefine.pl> wrote: >> Wiadomość napisana w dniu 2009-08-

Re: Need for an internationalization/translation system not request-based

2009-08-13 Thread Jarek Zgoda
stands no chance against natural stupidity Jarek Zgoda, R, Redefine jarek.zg...@redefine.pl --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django

Re: Need for an internationalization/translation system not request-based

2009-08-12 Thread Jarek Zgoda
tic translation (not request-based). -- Artificial intelligence stands no chance against natural stupidity Jarek Zgoda, R, Redefine jarek.zg...@redefine.pl --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users&

Re: Timezones in Django

2009-08-11 Thread Jarek Zgoda
tag - my memory is fuzzy) to > convert the > UTC time to the specified timezone for displaying. If your app stores time in UTC (which is good habit btw), you can use Babel (http://babel.edgewall.org/) to display time information with any timezone supported by pytz. -- Artificial int

Re: HttpResponseRedirect and encoding

2009-08-05 Thread Jarek Zgoda
ry to decode it to unicode using default codec, which is ascii. -- Artificial intelligence stands no chance against natural stupidity Jarek Zgoda, R, Redefine jarek.zg...@redefine.pl --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Re: Page security

2009-08-05 Thread Jarek Zgoda
_required. -- Artificial intelligence stands no chance against natural stupidity Jarek Zgoda, R, Redefine jarek.zg...@redefine.pl --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: MS Word Characters

2009-07-29 Thread Jarek Zgoda
intelligence stands no chance against natural stupidity Jarek Zgoda, R, Redefine jarek.zg...@redefine.pl --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: encoding question

2009-07-29 Thread Jarek Zgoda
assing to open(). Generally do not mix bytestrings and unicode objects in string interpolation because Python will try to encode/ decode using default codec (which is ASCII, usually) and this is not the thing you want. -- Artificial intelligence stands no chance against natural stupidity Jar

Re: Optional user foreign key - for tracking viewing history

2009-07-15 Thread Jarek Zgoda
ey(User, blank=True, null=True) (blank is only for admin validation). >timestamp = models.DateTimeField(auto_now=True,editable=False) -- Artificial intelligence stands no chance against natural stupidity Jarek Zgoda, R, Redefine jarek.zg...@redefine.pl --~--~-~--~~---

Re: best practice to have a list of mixed objects

2009-07-02 Thread Jarek Zgoda
votes, photo.votes) you may use attrgetter() to sort ordinal Python list, eg.: import operator my_objects.sort(key=operator.attrgetter('votes')) -- Artificial intelligence stands no chance against natural stupidity Jarek Zgoda, R, Redefine jarek.zg...@redefine.pl --~--~-~--~~--

Re: Modifying deserialized Model instances before saving, good idea or bad?

2009-06-05 Thread Jarek Zgoda
Wiadomość napisana w dniu 2009-06-05, o godz. 14:06, przez Jarek Zgoda: > try: > instance = Model.objects.get(uniq_property=obj.object.uniq_property) > # we have one already, no import necessary > except Model.DoesNotExist: > referred = OtherModel.objects.get(prop=obj

Modifying deserialized Model instances before saving, good idea or bad?

2009-06-05 Thread Jarek Zgoda
OtherModel instance has been succesfully imported and exists in database at the time of importing Model instance. Am I abusing Django serialization? -- Artificial intelligence stands no chance against natural stupidity Jarek Zgoda, R, Re

Re: Django deployment

2009-06-03 Thread Jarek Zgoda
al import * except ImportError: # no local specific modifications pass Putting these imports at the bottom of settings.py will cause the values will be overwritten with imported ones. -- Artificial intelligence stands no chance against natural stupidity Jarek Zgoda, R, Redefine jarek

Re: user.is_authenticated

2009-06-02 Thread Jarek Zgoda
acces to the user.is_authenticated method. >> For completeness sake: RequestContext *and* django.core.context_processors.auth in TEMPLATE_CONTEXT_PROCESSORS (it's there by default unless one changes configuration). -- Artificial intelligence stands no chance against natural stupidity Jarek

Re: Django and release mode

2009-05-29 Thread Jarek Zgoda
s.DEBUG = True doesn't > affect launch mode, but > this was expected. > Any suggestion? Run your application as WSGI, FastCGI or under mod_python - dev server is not suited for production use. -- Artificial intelligence stands no chance against natural stupidity Jarek Zgoda, R, R

Re: Format dates using a specific locales under mod_python

2009-05-29 Thread Jarek Zgoda
will replace all my .strftime() with > django.utils.dateformat.format(), I don't like the idea to require > unusual server configuration for my app. OR use Babel (http://babel.edgewall.org/) which does not require setting locale process-wide. Some Django integration is also available (temp

Re: Unhandled exception

2009-05-06 Thread Jarek Zgoda
ng to do with Flup's error handling. In Django 1.0.X you have to modify line 128 in django.core.servers.fastcgi and change wsgi_opts['debug'] = False to wsgi_opts['debug'] = True -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda,

Re: TemplateDoesNotExist registration/login.html

2009-05-05 Thread Jarek Zgoda
d_template_source: > /usr/lib/python2.5/site-packages/django/contrib/admin/templates/ > registration/login.html > (File does not exist) See http://docs.djangoproject.com/en/dev/topics/auth/#django.contrib.auth.views.login -- We read Knuth so you don't have to. - Tim Peters

Re: Unhandled Exception

2009-05-04 Thread Jarek Zgoda
n by flup before django's 500 handler is loaded, eg. something wrong with your settings module. To see the actual error you can start the app with runfcgi debug=true. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine jarek.zg...@re

Re: Django development on OS X. Accessing development server from local network

2009-04-28 Thread Jarek Zgoda
nt to deploy apache on local PC for testing > > Please help me to understand how to test it. > Start dev server listening on 0.0.0.0:8000, eg. $ python manage.py runserver 0.0.0.0:8000 -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine ja

Re: Running two django version from same python.

2009-04-16 Thread Jarek Zgoda
's no way to run different versions of Django side-by-side. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine jarek.zg...@redefine.pl --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &quo

Re: Supported Django version of Googale app engine

2009-02-16 Thread Jarek Zgoda
ling Django Development Version". -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine jarek.zg...@redefine.pl --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gr

Re: trouble with the Database_Engine name in settings.py. i've unsuccessfully tried sqlite3

2009-01-16 Thread Jarek Zgoda
information. >>>> import sqlite3 > Traceback (most recent call last): > File "", line 1, in > ImportError: DLL load failed with error code 193 > > > On Jan 16, 8:53 am, Jarek Zgoda <jarek.zg...@redefine.pl> wrote: >> Wiadomość napisana w dniu 20

Re: trouble with the Database_Engine name in settings.py. i've unsuccessfully tried sqlite3

2009-01-16 Thread Jarek Zgoda
nfigured, "Error loading %s module: %s" % > (module, exc) > django.core.exceptions.ImproperlyConfigured: Error loading sqlite3 > module: DLL load failed with error code 193 Try to import sqlite3 from interactive Python shell. Does this produce any error? -- We read Knuth so you do

Re: the last line is plone\Python\lib\site-packages\django\db\backends\sqlite3\base.py

2009-01-15 Thread Jarek Zgoda
Wiadomość napisana w dniu 2009-01-14, o godz. 23:45, przez Briel: > All you need is to create the db-file, and then give the name/path to > it in settings.py Syncdb will create it for you if not exists. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine ja

Re: User Messages

2009-01-15 Thread Jarek Zgoda
ed to get_and_delete_messages(), user.message_set.all() is normal queryset so you can retrieve objects without deleting them. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine jarek.zg...@redefine.pl --~--~-~--~~~---~--~~ You re

Re: Why Django doesn't force testing?

2009-01-05 Thread Jarek Zgoda
, not "agile framework"? Just guessing, I'm not a core dev. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine jarek.zg...@redefine.pl --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

Re: Performance of include tag

2009-01-01 Thread Jarek Zgoda
much. However I'm not sure if Django does not have some > kind of similar mechanism in its core. See http://www.djangosnippets.org/snippets/507/ for one of possible optimization techniques. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Re

Re: Newbie question - Deploying Django apps

2008-12-29 Thread Jarek Zgoda
Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine jarek.zg...@redefine.pl --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-use

Re: link to a text file without "txt" extension

2008-12-28 Thread Jarek Zgoda
go to your HTTP server config and modify it to treat and serve this particular file as readable plain text, not a binary file. Django templates (and HTML links) have nothing to do with this, I think. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine jarek.zg...@redefin

Re: no module named _sqlite3 on Mac OS X

2008-12-25 Thread Jarek Zgoda
o is not seeing it for some reason. Am I > missing a link? You need also py25-sqlite3 and (surprisingly) py25-hashlib to have sqlite backend working on OS X. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine jarek

Re: login_required redirects always to LOGIN_REDIRECT_URL?

2008-12-23 Thread Jarek Zgoda
omething that would save me from writing actual code. Django makes me too lazy, I have to get my hands dirty with Spring again. ;) -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine jarek.zg...@redefine.pl --~--~-~--~~~---~--~~ You r

login_required redirects always to LOGIN_REDIRECT_URL?

2008-12-22 Thread Jarek Zgoda
I'm seeing strange behaviour of login_required decorator: any view decorated with it first sends to login page, then to url defined in LOGIN_REDIRECT_URL. The url to decorated view is supplied in next parameter (/login/?next=/path/to/view/) but is never executed. Looking at login view code I see

Re: SOAPpy and pyxml installation/usage

2008-12-12 Thread Jarek Zgoda
ammer as > well. From Dive into Python it has this great example about how to > handle SOAP calls. > http://www.diveintopython.org/soap_web_services/index.html Drop SOAPpy and ZSI, they are not documented and nearly dead. Try suds. -- We read Knuth so you don't have to. - Tim Peters

Re: Change message unicode issue

2008-12-05 Thread Jarek Zgoda
)s for %(name)s "% > (object)s".') ... Check if __unicode__ method of this object really returns unicode object. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this mess

Re: Solution for use Django with Ejabberd ?

2008-12-04 Thread Jarek Zgoda
django-and-comet/ This example uses IRC, but apart of protocol the idea should be the same with Jabber/XMPP. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message becau

Re: Address Book Contact Importer in Python/Django?

2008-11-27 Thread Jarek Zgoda
s. I know of > plenty of paid PHP scripts around that allow gmail, hotmail, aol etc. > Is there an equivalent in Python? Even if such thing exists, don't do this. http://www.codinghorror.com/blog/archives/001128.html -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R,

Re: order by ... nulls [first|last]

2008-11-26 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-11-26, o godz. 10:20, przez Thomas Guettler: > I am missing order by nulls [first|last] > > Either I am blind, or it is not possible. I think this is database-dependent. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefi

Re: I18N not working

2008-11-25 Thread Jarek Zgoda
wn catalog but I left them untranslated there (as they are already translated). If the things would work as described, the strings from registration app would appear untranslated because I do not have LocaleMiddleware installed. Of course, they appear in Polish, as I expected. -- We read Knuth so

Re: I18N not working

2008-11-25 Thread Jarek Zgoda
ot;. There is no need to use LocaleMiddleware if you do not want to change translations (eg. depending on browser settings). -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You r

Re: NoReverseMatch question

2008-11-21 Thread Jarek Zgoda
op up if the view function you declared to handle the url is not importable. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: NoReverseMatch question

2008-11-21 Thread Jarek Zgoda
lug. Maybe I have some outdated code here, but where would it reside? Python doctionaries do not have any notion of "ordering". -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You

Re: Custom column in admin change list table

2008-11-19 Thread Jarek Zgoda
tp://docs.djangoproject.com/en/dev/ref/contrib/admin/#list-display Additionally, set allow_tags=True property of the method returning link. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You rec

Re: Default custom settings

2008-11-17 Thread Jarek Zgoda
p.settings import * in main settings module. Of course, all settings have defaults (I'm doing getattr(settings, 'MY_SETTING', 'foo')) and are documented. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PROTECTED] --~--~-~--~~

Re: How to access the request object in a decorator

2008-11-17 Thread Jarek Zgoda
ike that > > > @anonymous_only > def register(request): Take a look at the content of django.contrib.auth.decorators module (the _CheckLogin class, a call in user_passes_test and login_required). -- We read Knuth so you don't have to

Re: Dynamic Paths for File Uploads

2008-11-13 Thread Jarek Zgoda
the option would be to (temporarily) store the file somewhere using semi-static information you already have, then move it to final location and update the path stored in model's FileField in view code. -- We read Knuth so you don't have to. - Tim Peters Jarek

Re: Custom prepopulated SelectField's in DjangoAdmin

2008-11-10 Thread Jarek Zgoda
t; for example: field for Ms/Mrs/Mr... > > simple link to explanation would do... You can supply choices argument in model's field constructor. Or replace the form's field with the one that has choices in modelform for this model. -- We read Knuth so you don't have to. - Tim Peters Jare

Re: sorting a list of model instances

2008-11-07 Thread Jarek Zgoda
not return a copy) and never saw such problems. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users&quo

Re: Date format question

2008-11-05 Thread Jarek Zgoda
date format. It seems you did not search The Site No. 1 - Django's own documentation. Built-in filter date does what you want. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You rec

Re: help for RSS Feed

2008-11-03 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-11-03, o godz. 11:59, przez please smile: > Can anybody please send me a small RSS feed application using django. > Thanks. Google code has plenty of them. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PRO

Re: best practice to change allowed characters in a username

2008-10-29 Thread Jarek Zgoda
e way i'm going about to > change the allowed characters ok? It's OK if it works. I think the only problem is form validation, so registering your own form seems to be the way. Anyway, it should not break anything. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, R

Re: best practice to change allowed characters in a username

2008-10-29 Thread Jarek Zgoda
had the same error when i wanted to change the permissions > on the default User. You have to unregister the admin class for User model before registering your own. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PROTECTED] --~--~-

Re: help for Date base generic views

2008-10-29 Thread Jarek Zgoda
s (Chapter 4). Also, the blog tutorial by Ross Poulton (http://www.rossp.org/blog/2006/feb/02/building-blog-django-2/ ) has a section on this topic - although generally outdated, this document explains how it works. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMA

Re: How to get the Html representation of forms.Fields

2008-10-28 Thread Jarek Zgoda
ncrete - their representation can be obtained by calling render()). -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

Re: web 2.0 apps with django

2008-10-27 Thread Jarek Zgoda
tutorials that will teach you writing applications. Could you evaluate what are your objectives? -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

Re: Handling Subdomain Requests

2008-10-27 Thread Jarek Zgoda
The above example code requires that you maintain a mapping (dictionary) of subdomain names to urlconf modules. In any other case I'd suggest configuring virtual host and serve it with another application. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefin

Re: Custom include tag to parse locale into filename

2008-10-24 Thread Jarek Zgoda
s? I'd suggest writing your own template loader, it works also with {% include %} tag. There is a section on this in Django Book (maybe this should find its way to official docs too?). -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PROTECTED] --~--~-~-

Re: About running django 1.0 and MySQL

2008-10-23 Thread Jarek Zgoda
s here? You have to install MySQLdb package (I don't know what's the exact name on RHEL, on Ubuntu it's python-mysql) and configure application database settings following http://docs.djangoproject.com/en/dev/ref/databases/#ref-databases -- We read Knuth so you don't have to. - Tim Peters Ja

Re: Mercurial or Git

2008-10-22 Thread Jarek Zgoda
Larger teams are too rare for me to have any opinion on the situation, though... -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: i18n all languages not displayed

2008-10-21 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-10-21, o godz. 09:30, przez Jarek Zgoda: >> gettext = lambda s: s >> >> LANGUAGES = ( >>('en', gettext('English')), >>('ta', gettext('Tamil')), >>('hi-IN', gettext('Hindi')), >>

Re: i18n all languages not displayed

2008-10-21 Thread Jarek Zgoda
ation for the language you cann't get to work. There is "ta" translation, but not "hi". You might want to check this list, the translations are located in your / conf/locale directory. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PROT

Re: separate users from django admin'able users

2008-10-20 Thread Jarek Zgoda
ill be unable to login to admin site. On the front side, you can check for this bit in your Python code, this is normal model attribute. I did this many times and had no problems, I think this is what people usually do. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, R

Re: Migration problems (old svn version to 1.0 and new server)

2008-10-20 Thread Jarek Zgoda
.logout_view'), > > ) > > Anything untoward here? If any of these throws an error upon importing, you'll get "reverse not found". Try to manually import each of them from shell. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PROTEC

Re: Migration problems (old svn version to 1.0 and new server)

2008-10-19 Thread Jarek Zgoda
to fix this error? Double check your urlconf - all views used there have to be importable. The error pobably means you have some error in your views (or some url pattern pointing to view that does not exist). -- We read Knuth so you don't have to. - T

Re: separate users from django admin'able users

2008-10-19 Thread Jarek Zgoda
rdinary" users that are not allowed to log in to admin interface. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &

Re: internationalization and template magic caching

2008-10-17 Thread Jarek Zgoda
to False. Anyway, I am not sure what happens if Django gets more that one translation for the same key (is there any order of preference?), I just never tried it. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefin

Re: internationalization and template magic caching

2008-10-16 Thread Jarek Zgoda
for long time and never saw such oddity, updated translations should be visible after server restart (yes, even dev server has to be restarted). Please, check if you are updating right translation catalogs (these located in your LOCALE_PATHS). -- We read Knuth so you don't have to. - Tim Peter

Re: a bug about models EmailField

2008-10-14 Thread Jarek Zgoda
urn '%s : %s ' % (self.name, self.email) > > r1 = Reporter() > r1.name = 'edison' > r1.email = 'x' > r1.save() > r1.id = 1 > > Why it can be save ? > there's not a valid email, Not a bug. Model-level validation does not exist in current Django. Sorry. -- We read Kn

Re: macports and django problem

2008-10-12 Thread Jarek Zgoda
ameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/django/__init__.pyc' >>> What is worth noticing, the /opt/lcoal/bin path comes first on list. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PROTECTED] --~--~-~--~~--

Re: Django Hosting Survey

2008-10-07 Thread Jarek Zgoda
'm also considering to take it... > > Is it OK for production site as well? I wouldn't go into production with shared hosting if you expect at least moderate popularity. You'd end up paying more than dedicated hosting would cost you (eg. at hetzner.de). -- We rea

Re: Generating widget based on class type for a Custom Form

2008-10-07 Thread Jarek Zgoda
tes to widget output. Using these attributes in surrounding element, you'd end up with: -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: alphabetize options in a ForeignKey dropdown?

2008-10-02 Thread Jarek Zgoda
u just want to override a > single field, but I'm a fan of just doing the form. Ouch, that was obvious. :) Thank you. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this mess

Re: alphabetize options in a ForeignKey dropdown?

2008-10-02 Thread Jarek Zgoda
ing across the whole site. To change ordering only in admin app just define ordering in admin class for the model. Anyway, I seem to be unable to change ordering of FKs relating to User object. Any hint? -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R,

Re: locale aware number formats

2008-09-24 Thread Jarek Zgoda
locations and languages, event those not supported by standard NLS machinery. Plus on linux it does not require installing appropriate language support - you can do eg. Hungarian date, number and currency formatting without installing Hungarian language support package (language-pack-hu on

Re: locale aware number formats

2008-09-23 Thread Jarek Zgoda
always. Take a look at Babel package and Django helpers - http://babel.edgewall.org/ -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

Re: OS path in python

2008-09-22 Thread Jarek Zgoda
ng in the "whatever" directory, how can i find > the domain name under which the file resides? > > > > Thanks for helping a noob. > > -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PROTECTED] --~--~-~--~~--

Re: FileSystemStorage preventing large file uploads

2008-09-18 Thread Jarek Zgoda
o I think nginx was behaving properly. Received data did not show any signs of truncation, thats why I was blaming browser for wrong calculation of content length. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PROTECTED] --~--~-~--~---

Re: FileSystemStorage preventing large file uploads

2008-09-18 Thread Jarek Zgoda
ing files that were > still being written to by some application and thus were changing in > length. Right, these were POST requests made by some ajax. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PROTECTED] --~--~-~--~~~---

Re: FileSystemStorage preventing large file uploads

2008-09-18 Thread Jarek Zgoda
on a request? I saw actual request bodies larger than declared in content-lentgh with Firefox 2, this browser often was lying to my nginx in cases of small bodies by 1-4 bytes. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PROTECTED] --~--~-~--

Re: FileSystemStorage preventing large file uploads

2008-09-18 Thread Jarek Zgoda
ld I use that? request["Content-length"] or > something like > that. You can use, but you can not rely. Browsers are notorious liars, even if they provide any data in this header field. -- We read Knuth so you don't have to. - Tim Pe

Re: How to trigger html traceback and verbose django environmental variable list

2008-09-18 Thread Jarek Zgoda
quot;persistently", but putting assert False in view code will raise AssertionError and trigger debug page when settings.DEBUG == True. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You

[ANNOUNCE] Polish Django tutorials

2008-09-18 Thread Jarek Zgoda
backends are next in queue. Once these 4 topics will be covered, the tutorials with code will be packaged for easy download. This is early beta version, so stream of changes should be expected. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R, Redefine [EMAIL PROTECTED

Re: Dynamic images

2008-09-17 Thread Jarek Zgoda
es and load the file-system > for nothing plus I would need a method to clean up the files > afterwards. You can just return the content (bytes) in HttpResponse with appropriate content-type header. First argument to HttpResponse constructor is the content. -- We read Knuth so you don't have

  1   2   3   >