Crispy forms and its "coercing to unicode need string or buffer nonetype found"

2016-08-11 Thread RompePC
I was working on an admin panel, and when I try to get to the add/update view of the model, it just throws this error. I've been checking Google for all the morning, but the solutions I've just found aren't the problem I've (no problem with unicode, I check if the related object is None, etc.).

Parent initialization don't working

2016-08-11 Thread RompePC
I'll say first that I'm using *xadmin*, although it doesn't matter for this problem. Python 2.7.3 with Django 1.9.5 The problem is in this piece of code (take it as an example): class ParentAdmin(object): def __init__(self): # Boring stuff self.list_filter = ["name"] # Calling

Re: Trying to use Django 1.9.5, django_pyodbc, MS SQL Server 2012 on 64bit Windows 7

2016-08-11 Thread John Fabiani
Prove to yourself that the pyodbc connection is working correctly without django. On Wed, Aug 10, 2016 at 6:37 PM, Mike Dewhirst wrote: > On 11/08/2016 5:11 AM, Evan Roberts wrote: > >> I'm struggling to get a project going. I'm new to python and django. >> >> Is django_pyodbc supported on Pytho

Re: Trying to use Django 1.9.5, django_pyodbc, MS SQL Server 2012 on 64bit Windows 7

2016-08-11 Thread Evan Roberts
> > Hi Mike, Thanks for the suggestion. Yes, postgres would be a good answer, but not really a possibility at this point. Let me give you the back ground. I inherited this project. The original project is written using django 0.95 and SQL Server 2003. The project that was written by a long

Re: Trying to use Django 1.9.5, django_pyodbc, MS SQL Server 2012 on 64bit Windows 7

2016-08-11 Thread Evan Roberts
> > Hi John, > Excellent suggestion. Using python shell and pyodbc I was able to connect and perform several simple queries. Just worked, no heroics needed. I'm fairly sure my problem lies in django_pyodbc, it is making sure the connection to the database is sane. I'm not sure the support

Re: Trying to use Django 1.9.5, django_pyodbc, MS SQL Server 2012 on 64bit Windows 7

2016-08-11 Thread Evan Roberts
Thanks for the help and guidance. I found a solution. I installed these libs and was able to connect: Django (1.9.9) django-pyodbc-azure (1.9.9.0) pip (8.1.2) pyodbc (3.0.10) I connected using these settings: DATABASES = { 'default': { 'ENGINE': 'sql_server.pyodbc', 'HOST':

Re: Crispy forms and its "coercing to unicode need string or buffer nonetype found"

2016-08-11 Thread Constantine Covtushenko
Hi Rompe, >From you have posted I can suggest check your model. Can you post here code of it? Regards, On Thu, Aug 11, 2016 at 1:11 PM, RompePC wrote: > I was working on an admin panel, and when I try to get to the add/update > view of the model, it just throws this error. I've been checking G

Re: Parent initialization don't working

2016-08-11 Thread Constantine Covtushenko
Hi Rompe, As for your admin models it seems like they should extend: `admin.ModelAdmin`, see django documentation I am not sure that this is a problem you have encountered. But to move further please do like said in the documentation fir

Re: Trying to use Django 1.9.5, django_pyodbc, MS SQL Server 2012 on 64bit Windows 7

2016-08-11 Thread Constantine Covtushenko
Great job done. You welcome! Regards, On Thu, Aug 11, 2016 at 8:46 PM, Evan Roberts wrote: > > Thanks for the help and guidance. I found a solution. I installed these > libs and was able to connect: > Django (1.9.9) > django-pyodbc-azure (1.9.9.0) > pip (8.1.2) > pyodbc (3.0.10) > > I connect

"add another" for inline in admin disappeared in 1.10

2016-08-11 Thread Chris Gray
After upgrading from 1.9 to 1.10, I noticed that the "add another" link for inline elements in the admin interface no longer displays. I reverted to 1.9 and the links came back. It looks like the code embedded in the page is totally different between 1.9 and 1.10. -- You received this messag

Re: "add another" for inline in admin disappeared in 1.10

2016-08-11 Thread Tim Graham
Are you using any third-party enhancements that might need to be updated? I see "Add another Choice" at a page like /admin/polls/question//change/ for the tutorial. More specifics about how to reproduce the issue are needed. On Thursday, August 11, 2016 at 4:55:04 PM UTC-4, Chris Gray wrote: >

Re: Crispy forms and its "coercing to unicode need string or buffer nonetype found"

2016-08-11 Thread RompePC
Hi there, I apprecciate the help, but the models' code is secret (I'm not allowed to show it anywhere). It is like it sends a non-existent field to the form, and don't know why. And the model is the same as the previous version, its very weird. And didn't found anything about that error in a cr

Re: Parent initialization don't working

2016-08-11 Thread RompePC
Thanks for the response, but I tried that before and didn't helped. In xadmin you inherit from object (yeah, weird), and there you've your model panel. The matter is that some set up works in that parent class (like *form_layout*), but others not, and raising and exception to see their values s