Returning unique values from a foreign key in a ListView

2017-03-31 Thread Richard Jackson
Hi everyone, *Goal* - I have a ListView built around ModelA. - ModelA has a foreign key to ModelB. - I want to return a list with all unique entries of a required field (i.e. 'foo') from ModelB. *Context* I have a table of clients (ModelA) and a table of jobs I do (ModelB), connected via

Re: Would it be a good idea to build a IM app using django channels?

2017-03-31 Thread Andrew Godwin
Hi Vic, Channels would be a suitable building block for such an app, certainly, but you'd need to do a lot more work on top of it. Online presence management, chat history, login, authentication, and the protocol would all be the things you need to solve - Channels just gives you a basic eventing

Re: Adding fields in model, migrating a sqlite.db in production...good idea?

2017-03-31 Thread kalinski
super thanks! i hoped for that answer! -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send

Re: Adding fields in model, migrating a sqlite.db in production...good idea?

2017-03-31 Thread ludovic coues
Make a copy of your sqlite file and try makemigration on your copy. Everything should go smoothly. If that's the case, you can now use your copy as your new production database. As a side note, I don't think using an sqlite database is bad practice. It make it super easy to backup your data.

Adding fields in model, migrating a sqlite.db in production...good idea?

2017-03-31 Thread kalinski
Hello, I have a sqlite db that already holds important production data. Well same time I am developing that application adding functions while I need them. Well I know not exactly best practice. Now I need to add two fields to a model (boolean and char), I want to makemigrations, git add, git

Would it be a good idea to build a IM app using django channels?

2017-03-31 Thread Vic Wei
I'm trying to build a django Instant Massage app, but I have some confusions, My app should the following needs: 1.be able to communicate in real time with browser, iOS, and Android native apps. 2.one user can send messages to another user in private 3.users can chat in serval chat room at a

Re: Django 10.6 throws 'mbcs codec error' on Windows 10 machine in autoload.py

2017-03-31 Thread Владислав Котвицкий
I study Django too and my first lesson was be here https://tutorial.djangogirls.org/en/ use virtualenv С уважением, Владислав Котвицкий г.Краснодар, +7(988)4112077 2017-03-29 12:28 GMT+03:00 Paul Rusu-Tibreanu : > Hi to all, > > I am trying to get started with Django. So

Ajax Call is sending empty request.POST or request.body

2017-03-31 Thread Camilo Torres
Hi. The difference is explained here: https://docs.djangoproject.com/en/1.10/ref/request-response/ You are sending the data in the ajax call as Jason (I suppose, from the content type), then in your view you should probably use request.body to read the json document. I also noticed you are