Django Admin, custom queryset, can't groupe by (Exception Value: 'dict' object has no attribute '_meta')

2015-02-21 Thread ebuild
I have this model which map to a postgresql view class AppModel(models.Model): nbr = models.BigIntegerField(blank=True, null=True) region = models.ForeignKey(AppWilaya,blank=True, null=True) date_preorder = models.DateField(blank=True, null=True) id =

Re: Seems like a geodjango bug with multiple databases

2015-02-21 Thread Luan Nguyen
Hi, sorry for my late response. Thanks for replying. I'm using django 1.7.4. Going with this Room.objects.using('another').select_related('hotel').get(pk=10) is fine, I can then get room.hotel without any problem. I also followed Jani's advice and changed default manager of Room to

Problem with aggregate(Sum())

2015-02-21 Thread Mark Caglienzi
Hello, I setup a minimal project here: https://github.com/mcagl/minimal_django_sum_test to demonstrate the problem. I'm working with Django 1.6.x and I noticed something that I don't understand. As you can see from the github repository, I have a Tag model and a Row model with a m2m towards

Re: How to filter results using forms in Django/Python (best approach) ?

2015-02-21 Thread Vijay Khemlani
If both forms are used in the same view, I see little reason to make them separate and ModelForms, the form class I put above should be a better choice. In order to do the actual filtering, you can do something like this class ScreeningForm(forms.Form): haircolor =

plugin visibile in admin, not in front end

2015-02-21 Thread gg4u
Hello! I purchased the provision of a cms, developers chose django. But they delivered a quite buggy cms, without any comments/documentation in the code, and unfortunately deny assistance for 'being busy with bigger clients'. I spent several days solving issues here and there, but the last

Re: Django App DB replicas - call for suggestions

2015-02-21 Thread Lane Campbell
To accomplish what you've explained you could move forward with the app on the PI for the clients. Each client would need to sync with a database somewhere. To achieve this I would explore how to individualize and track each machine in the field. Then setup another django app in the cloud

Re: Django App DB replicas - call for suggestions

2015-02-21 Thread Phang Mulianto
Hi, There is database do the offline and sync to main db server when connection available. See couchdb. or maybe for manual sync, in local db use sqlite, and your client app will sync when online to main db. Regards, mulianto On Sat, Feb 21, 2015 at 10:45 PM, Blazor

Re: Using data migration to create initial users errors

2015-02-21 Thread Matías Iturburu
Hey Ben. The only gotcha I had is that the password needs to be hashed. I ended up doing this to create a superuser: from django.db import migrations from django.contrib.auth.hashers import make_password def create_admin_user(apps, schema_editor): User = apps.get_registered_model('auth',

Django App DB replicas - call for suggestions

2015-02-21 Thread Blazor
Hi all, I was asked to design a new django app by a client whose needs are a little bit context-specific. The purpose of this app is to introduce computer-assisted technologies in a paper-based environment, in the e-Health domain. This client would like to access a central server with a few

Re: Writing your first Django app, part 5 Testing

2015-02-21 Thread Gavin Patrick McCoy
Ok. I get you. Thanks very much! On Saturday, 21 February 2015 11:56:50 UTC, Daniel Roseman wrote: > > You're doing this in the shell, which uses your devv database in which you > have obviously defined a poll already. > > The docs are taking about running this in a unit test, which would

Re: Writing your first Django app, part 5 Testing

2015-02-21 Thread Gavin Patrick McCoy
I got a code 200. Thanks for your reply. On Saturday, 21 February 2015 11:05:35 UTC, 严超 wrote: > > I think the purpose here is to test reverse() function. As long as you > got code 200, it's ok whatever html it returns. > Is it right ? > > *Best Regards!* > > > *Chao Yan--About me :

Re: How to filter results using forms in Django/Python (best approach) ?

2015-02-21 Thread Ronaldo Bahia
Hi Vijay, Thanks for your response. I've just updated my question in stackoverflow 'cause I forgot to show my forms. What I need is to enable a user (company) to filter results (candidates) based on forms selection (candidates' status and candidates' haircolors) And I don't know how to make

Writing your first Django app, part 5 Testing

2015-02-21 Thread Daniel Roseman
You're doing this in the shell, which uses your devv database in which you have obviously defined a poll already. The docs are taking about running this in a unit test, which would create a blank db without any polls. -- DR. -- You received this message because you are subscribed to the

Re: Writing your first Django app, part 5 Testing

2015-02-21 Thread 严超
I think the purpose here is to test reverse() function. As long as you got code 200, it's ok whatever html it returns. Is it right ? *Best Regards!* *Chao Yan--About me : http://about.me/chao_yan * *My twitter: @yanchao727 *

Writing your first Django app, part 5 Testing

2015-02-21 Thread Gavin Patrick McCoy
Hi, I'm on part 5 of the polls tutorial (https://docs.djangoproject.com/en/1.7/intro/tutorial05/) and I am running Django 1.7 and Python 3.4 on Windows 8. Just want to make sure I'm on the right track. For the following part of tutorial: >>> # get a response from '/'>>> response =

Re: Django 1.7 migrate for postgres fails: Charfield to ForeignKey

2015-02-21 Thread Martin Kapfhammer
Alright, so I uncommented the creation of the CharField and changed the AlterField to an AddField operation. Worked! :) Thank you -- 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

Re: Real time and Django - approaches

2015-02-21 Thread Aaron Reabow
Thanks Carlos. How did you find the implementation? Was it quite smooth, or did you hit a lot of problems along the way? On Friday, 20 February 2015 17:04:48 UTC+2, Carlos Aguilar wrote: > > I build something related with realtime using gevent-socketio more than 1 > year ago and works really