'CharField' object has no attribute 'model'

2015-12-25 Thread Billu
I'm trying to make a single choice quiz (i.e. Choose one from 4 options). I'll populate the quiz (with 30 questions) depending upon what topic the user chooses. I'm made some models and forms, but when I try to migrate it says AttributeError: 'CharField' object has no attribute 'model' I don

Re: basic Django 10,000 foot view of users (associating Django User with model class)

2015-12-25 Thread Mike Dewhirst
On 26/12/2015 12:53 AM, Mitchell McConnell wrote: I am just getting started in Django, and probably need to slow down, but I am trying to work through the documentation *and* work on a real app that I have created in the past as a Python desktop app using WxPython. The app manages widgets for em

Re: Merry Xmass

2015-12-25 Thread LeoF
Merry Christmas and Happy new year! On 12/25/2015 10:17 AM, Robin Lery wrote: Merry Christmas! On Fri, Dec 25, 2015 at 3:09 AM, Andrea Mucci wrote: Merry

Re: Merry Xmass

2015-12-25 Thread Robin Lery
Merry Christmas! On Fri, Dec 25, 2015 at 3:09 AM, Andrea Mucci wrote: > Merry Xmass to all and all your family > Have a good djangoized new year > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and sto

admin search_fields performance

2015-12-25 Thread Maria Iakymova
Hello! I faced with the performance issue while searching in admin by long string. I have CompanyAdmin.search_fields = ['business_name', 'contact_persons__name',] and tried to find company by name like ''COMPANY - REAL ESTATE COMPANY NAME" and query handling took about 7 minutes. (There are about

basic Django 10,000 foot view of users (associating Django User with model class)

2015-12-25 Thread Mitchell McConnell
I am just getting started in Django, and probably need to slow down, but I am trying to work through the documentation *and* work on a real app that I have created in the past as a Python desktop app using WxPython. The app manages widgets for employees, who belong to an Organization (part of m

how to use lazy choice in model

2015-12-25 Thread 冯德玉
In my project, I have a dictionary in database, i want to get choices that used in model from this dictionary, I defined something as follows, expect it loaded lazy: class DictionaryChoices(object): def __getattr__(self, item): cursor = connections['default'].cursor() cu

Re: Running unittests on different databases

2015-12-25 Thread Mike Dewhirst
On 25/12/2015 7:09 PM, varun naganathan wrote: Hi, I basically want to know how i can run unittests on different databases like Postgres and Mysql.The documnetation says something about writing a custom settings file.However I'm unable to actually understand how actually the settings file must

Running unittests on different databases

2015-12-25 Thread varun naganathan
Hi, I basically want to know how i can run unittests on different databases like Postgres and Mysql.The documnetation says something about writing a custom settings file.However I'm unable to actually understand how actually the settings file must look. Could someone perhaps post a sample file