Re: Thinking out loud: move auth.Messages into the sessions app?

2006-12-12 Thread Favo
We have a abstract for message, if anonymous, use add_session_message, if auth user, use add_auth_user_message. +1 if django move auth message to session. The problem mentioned by James Bennett seems not a big issue. --~--~-~--~~~---~--~~ You received this mess

Re: fixed the problem about simplejson in utf-8 when use chinese

2006-12-07 Thread Favo
Same effect json_data = simplejson.dumps((json_data), ensure_ascii=False) return HttpResponse(json_data, mimetype=text-x-json; charset=utf-8') """ If ``ensure_ascii`` is ``False``, then the some chunks written to ``fp`` may be ``unicode`` instances, subject to normal Python ``str`` to ``

Output utf-8 in templates?

2006-12-07 Thread Favo
My website is based on utf-8. all data in database is in utf-8. but django didn't auto encode string to unicode for model field. So I have to encode them manually for template render. In fact I need use slice filter. otherwise it will break the utf-8 bits. could django assume all data in database

Re: Generic FK Bug

2006-11-28 Thread favo
Thanks oyvind.saltvik i could use it now. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this

Re: Generic FK Bug

2006-11-28 Thread favo
yes, hope we could fix trac spam problem first. then we could use trac to feedback bug and patch. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to djan

Re: override __hash__ in django.db.base.Model

2006-10-22 Thread favo
I was totally wrong to open this ticket, since http://docs.python.org/ref/customization.html: """ If a class defines mutable objects and implements a __cmp__() or __eq__() method, it should not implement __hash__() """ And django model is a mutable object. so we can't implement __hash__() --~

Re: override __hash__ in django.db.base.Model

2006-10-19 Thread favo
see #2936, #2937 http://code.djangoproject.com/ticket/2936 http://code.djangoproject.com/ticket/2937 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to dj

override __hash__ in django.db.base.Model

2006-10-19 Thread favo
Since django Model has override __eq__ method, should override __hash__ method too. {{{ def __eq__(self, other): 86 return isinstance(other, self.__class__) and self._get_pk_val() == other._get_pk_val() }}} one possible implementation I think is, {{{ def __hash__(self): return ha

Re: INSTALLED_APPS partially shown in admin with mod_python

2006-08-02 Thread favo
sorry, "move" should be "remove" urls.py is quite simple: from myproject.myapp.models.category import Category urlpatterns = patterns('', ... ) since I only have apache mod_python on my production server and my app is very large, very hard to debug. I 'll try to set mode_python on my develop-sta

Re: INSTALLED_APPS partially shown in admin with mod_python

2006-08-01 Thread favo
seems we should find a way to let mod_python load all model first. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com T

r3507 - django/trunk/django/db/models/fields cause many-to-many object error!

2006-08-01 Thread favo
After updated to r3507, meets error when visit m2m field. AttributeError: 'ManyToManyRel' object has no attribute 'get_related_field' --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To pos

Re: INSTALLED_APPS partially shown in admin with mod_python

2006-08-01 Thread favo
I find a way to repeat this problems a snapshot of my apps' Directory Structure: \myapp\models\ \myapp\models\__init__.py \myapp\models\category.py -- a model, manually specify app_label = "myapp" in Meta \myapp\urls.py -- import category.py in urls.py, if we import category.py then the app

Re: INSTALLED_APPS partially shown in admin with mod_python

2006-07-31 Thread favo
I meet the same error these day, have any solution now? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscri

a bug of admin delete funciton

2006-07-31 Thread favo
seems a bug of admin delete funciton. when a model has a many-to-many relationship, you have to has the change permission of your m2m related model even the object's m2m field is empty. in admin/view/main.py, _get_deleted_objects(), rel_objs is always true, seems it should be below:

Re: Manipulators going away?

2006-07-11 Thread favo
Hope new manipulator replacement is flexible and with some back backward compatible. we have many funcition based on custom manipulator(form ) or automatic ones. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Djan

Re: rss for wiki?

2006-07-10 Thread favo
Oh, cool! thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAI

rss for wiki?

2006-07-09 Thread favo
Do we have rss for wiki recent change? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this grou

Re: Error when iexact meets integer field.

2006-06-25 Thread favo
Thanks for helping :-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to

Error when iexact meets integer field.

2006-06-24 Thread favo
iexact use ILIKE as backend. this will cause error when effect on a integer field. we just need "!=". select id from auth_user where id ILIKE 5; select id from auth_user where id != 5; --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Django magic removeral DON'T support models in multiple files.

2006-05-31 Thread favo
That's right. I just put app_label as a Meta option. and I hope one day we don't need to set this app_label manaully if somebody refator the code in ModelBase.__new__ to let our models app_label set automatically. Thanks for all your help. :-) --~--~-~--~~~---~--~---

Re: Django magic removeral DON'T support models in multiple files.

2006-05-31 Thread favo
Thanks a lot ,I have follow the patch put my appsname int hte Meta. it works. Thanks. Michael!! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-

Django magic removeral DON'T support models in multiple files.

2006-05-31 Thread favo
I hope someone can see the post because I don't want to repeat it. http://groups.google.com/group/django-users/browse_thread/thread/cb3d55413a92151a I think is easy to fix. anywhere we have the function in 0.91. Thanks. --~--~-~--~~~---~--~~ You received this mes

Re: some bugs on magic removral page

2006-04-19 Thread favo
and there's also some index with wrong name, which is not really a problem. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegro

some bugs on magic removral page

2006-04-19 Thread favo
on this section: http://code.djangoproject.com/wiki/RemovingTheMagic#Databasechangesyoullneedtomake for postgresql part, 1)correct: ALTER TABLE django_content_type DROP CONSTRAINT "$1"; should be --> ALTER TABLE django_content_type DROP CONSTRAINT "content_types_package_fkey"; 2) lack : ALTER T