Re: MultiTenant Connections

2016-11-18 Thread Emanuel Araújo
This link resolved a question: https://gist.github.com/bubenkoff/005ea57b63251dafe81f I needed only change some line to work a python3 version. Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop re

Re: Django Docs not returning search results - 1.10

2016-11-18 Thread Sayth Renshaw
On Friday, 18 November 2016 00:31:42 UTC+11, Tim Graham wrote: > > It's a known issue: https://github.com/django/djangoproject.com/issues/713 > > The Django docs don't contain information about third-party packages, > however, so searching there to find information about kivy isn't the > correc

django_admin database creation, after sql command depreciated

2016-11-18 Thread Yalın Aksoy
Hello, I was using django 1.3 and python 2.4 for a big scale project. I decided to update it to django 1.9 and python 2.7. Since django_admin's sql parameter is depreciated in 1.9, the update database creation method changed a lot. I am using the command: "python /usr/local/django//manag

Template Data

2016-11-18 Thread 'dtdave' via Django users
As still learning django I have a simple issue. I have the following models: class Contactnumber(TimeStampedModel): phone_number = models.CharField(max_length=100, unique=True) contact = models.ForeignKey(‘contacts.Contact') class Contact(TimeStampedModel): contact = models.CharFi

Re: django admin interface

2016-11-18 Thread Derek
Not a direct answer, but its much easier to use the in-built options to extend admin actions: https://docs.djangoproject.com/en/1.10/ref/contrib/admin/actions/ Otherwise you will probably need to extend/override the admin template to add the code&link for your button; e.g. see: http://stackoverf

Re: Template Data

2016-11-18 Thread Vijay Khemlani
In your model a contact may have multiple phone numbers (multiple Contactnumber instances with foreign key to the same Contact instance) so your question is a bit vague. If you wanted to list all numbers for a given contact you could do somethinkg like {% for contact in practice.contacts.all %}

how to run django under apache on windows 10

2016-11-18 Thread bob gailer
Goal: run django under apache on windows 10. I have tried many things, none of which have worked. Errror messages up to wazoo. Google has not been my friend: I found a lot of articles Everything I read is either oriented to linux and/or assumes knowledge I don't have. Example: today I discover

Re: how to run django under apache on windows 10

2016-11-18 Thread Daniel Roseman
On Friday, 18 November 2016 13:58:41 UTC, bob gailer wrote: > > Goal: run django under apache on windows 10. I have tried many things, > none of which have worked. Errror messages up to wazoo. Google has not > been my friend: I found a lot of articles Everything I read is either > oriented to li

Re: Template Data

2016-11-18 Thread 'David Turner' via Django users
Thankyou for this, although for some reason it does not work. What other infromation would you need to further advise me. Thanks On 18 November 2016 at 13:42, Vijay Khemlani wrote: > In your model a contact may have multiple phone numbers (multiple > Contactnumber instances with foreign key to t

Re: Can I use Django Channels to solve this architectural prolem?

2016-11-18 Thread psaod8fza9s
Hi Andrew, thanks for the advice. Since I implement websockets to serve my users the live logs, I would just route the service commands (e.g. "service.start") through the websocket, too. That way I also don't have to block other things while waiting for the response whether the command was succ

Re: Template Data

2016-11-18 Thread Vijay Khemlani
Test the "contact.contactnumber_set.all" in a shell, I'm not sure 100% sure on the syntax On Fri, Nov 18, 2016 at 11:51 AM, 'David Turner' via Django users < django-users@googlegroups.com> wrote: > Thankyou for this, although for some reason it does not work. > What other infromation would you ne

Re: Annotate a List of Values

2016-11-18 Thread Nate Granatir
As demonstrated here: https://docs.djangoproject.com/en/1.10/topics/db/examples/many_to_many/ If you have a ManyToMany relationship set up in your models, say: class SerialNumber(models.Model): serial = models.CharField(max_length=50) class Item(models.Model): item_name = models.CharFi

ANN: eGenix PyRun - One file Python Runtime 2.2.2

2016-11-18 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix PyRun - One file Python Runtime Version 2.2.2 An easy-to-use single file relocatable Python run-time - available for Linux, Mac OS X and Unix

Re: django_admin database creation, after sql command depreciated

2016-11-18 Thread Michal Petrucha
On Fri, Nov 18, 2016 at 12:07:40AM -0800, Yalın Aksoy wrote: > > > Hello, > > > I was using django 1.3 and python 2.4 for a big scale project. I > decided to update it to django 1.9 and python 2.7. > > > Since django_admin's sql parameter is depreciated in 1.9, the update > database creation

Re: Can I use Django Channels to solve this architectural prolem?

2016-11-18 Thread Andrew Godwin
On Fri, Nov 18, 2016 at 6:57 AM, wrote: > Hi Andrew, thanks for the advice. Since I implement websockets to serve my > users the live logs, I would just route the service commands (e.g. > "service.start") through the websocket, too. That way I also don't have to > block other things while waiting

Re: Django URLS

2016-11-18 Thread Stefano Probst
Hi, I think you search something like django-subdomains . regards Stefano Am Donnerstag, 17. November 2016 19:17:37 UTC+1 schrieb Lekan Wahab: > > If i have a url like *fruits.com*, does anyone know how i can write my > subdomain urls in dja

ManyToMany without through table

2016-11-18 Thread 'kgardenia42' via Django users
Lets say I have a User who I want to allow to have many different UserProfile objects (for multi-tenancy). class User(models.Model): # other user fields ... profiles = models.ManyToManyField('UserProfile', related_name='profiles', blank=True, null=True) class User

ManyToMany without through table

2016-11-18 Thread 'kgardenia42' via Django users
Lets say I have a User who I want to allow to have many different UserProfile objects (for multi-tenancy). class User(models.Model): # other user fields ... profiles = models.ManyToManyField('UserProfile', related_name='profiles', blank=True, null=True) class UserProfile(models.Model)