Re: Optimizing admin change view with inlines

2014-12-28 Thread Collin Anderson
Hi Petros, I think the raw_id_fields still display the __str__/__unicode__ of the selected object so therefore need to get queried. I wonder if select_related would possibly help? Collin On Wednesday, December 24, 2014 5:53:02 AM UTC-6, Ernest0x wrote: > > On 12/24/14 13:30, 'Petros Moisiadis'

Re: django problem with mysql and apache

2014-12-28 Thread Collin Anderson
Hi, 1. I don't do a lot of multilingual, but here's a start: https://docs.djangoproject.com/en/dev/topics/i18n/ If you have _content_ that's in multiple languages, you generally will want separate urls, like https://example.com/en/some/page/ 2. Not sure on the best forum software for django. 3.

Re: How to configure django and MySql with python properly ??

2014-12-28 Thread Collin Anderson
Hi, What happens when you try? Is this Ubuntu 14.04? Collin On Wednesday, December 24, 2014 1:54:14 PM UTC-6, Osman Goni Nahid wrote: > > I'm beginner in django , can't configure properly django , mysqldb in > python trying more time can't find where i make mistake . can anyone give > me an v

Re: Two Django projects with common models and business logic

2014-12-28 Thread Collin Anderson
Hi All, Another option which no one mentioned yet would be to keep all of the code for _both_ projects in the same repo and share common code that way. Collin On Tuesday, December 23, 2014 12:22:03 PM UTC-6, andy wrote: > > Hi, > > I have two Django Projects that have different use cases. There

Re: initial dta for model in Django 1.7 or newer

2014-12-28 Thread Collin Anderson
Hi, You are asking about initial data? Use RunPython or RunSQL. https://docs.djangoproject.com/en/dev/ref/migration-operations/#special-operations Collin On Thursday, December 25, 2014 9:06:35 AM UTC-6, Robert Jonathan Šimon wrote: > > Hi, > When i googled for this problem a found out, that wit

uni-code error in python : 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)

2014-12-28 Thread Hossein Rashnoo
Hi I use django and in my view i need to send a request as XML with some uni-code character that received from html page with post method. I tried these (Note that i save that input in fname variable) : xml = r"""my XML code with uni-code {0} """.format(fname) And fname = u"%s".encod

Re: uni-code error in python : 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)

2014-12-28 Thread Hossein Rashnoo
I Solved that with this code: fname = fname.encode('ascii', 'xmlcharrefreplace') xml = r"""my XML code with unicode {0} """.format(fname) On Monday, December 29, 2014 11:03:49 AM UTC+3:30, Hossein Rashnoo wrote: > > Hi > I use django and in my view i need to send a request as XML with some >