Re: Is it possible to have 1-to-Many and 1-to-1 relationships for one specific table?

2013-08-19 Thread Huu Da Tran
On Monday, August 19, 2013 3:03:25 PM UTC-4, Pepsodent Cola wrote: > Is it possible to have 1-to-Many and 1-to-1 relationships for one specific > table? > Because the database doesn't do what I wish for. > What is the intended goal? -- You received this message because you are subscribed to th

Is it possible to have 1-to-Many and 1-to-1 relationships for one specific table?

2013-08-19 Thread Pepsodent Cola
Is it possible to have 1-to-Many and 1-to-1 relationships for one specific table? Because the database doesn't do what I wish for. #___ class Altword(models.Model): #rosword = models.ForeignKey(Word) rosword = m

Re: Representing infinity or "no limit" in an integer field?

2013-08-19 Thread Jason Arnst-Goodrich
> > Problem is that usually databases aren't very fast to search NULL values > so if you have to for example produce often list of products that you can > buy "infinite amount", you would like to consider using value(s) that don't > conflict from valid set of values. I'm pretty sure that's no

could someone please help me with the following SO doubt on creating a db migration with south - http://stackoverflow.com/questions/18320225/migrating-an-existing-app-via-south Thansks!

2013-08-19 Thread Andrew Stewart
-- 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 email to django-users@googlegroups.com. V

Re: Capturing a search query + params in Django 1.5

2013-08-19 Thread Sithembewena Lloyd Dube
Thank you, Daniel. That works great. On Sat, Aug 17, 2013 at 9:58 PM, Daniel Roseman wrote: > On Saturday, 17 August 2013 20:04:22 UTC+1, Lloyd Dube wrote: >> >> Hi, >> >> I have a simple web application in which I have a search box. When a user >> enters a query in the box and hits "search", th

Writing a test that POSTs to the admin change view

2013-08-19 Thread Francis Devereux
Hi, I would like to write a test that verifies that a particular message is shown when a model is saved in the admin that meets certain criteria (it's a warning message). First off I need to figure out how to post to the admin change view from test code. I figured it would be easier to start w

Re: Using django.contrib.auth...

2013-08-19 Thread Laurent Meunier
On 19/08/2013 17:05, Nigel Legg wrote: In the app I am building for data analysis, I want all logged in users to be able to access all parts of the system, but only to have access to the datafiles they hae uploaded themselves. Can I use django.contrib.auth to filter the full list of datafiles ac

Using django.contrib.auth...

2013-08-19 Thread Nigel Legg
In the app I am building for data analysis, I want all logged in users to be able to access all parts of the system, but only to have access to the datafiles they hae uploaded themselves. Can I use django.contrib.auth to filter the full list of datafiles according to the user object? If so, h

Re: MySql Workbench

2013-08-19 Thread Daniel Lichtblau
Yeah, old post but google still find it.. here is a Mysql Workbench Export Module http://sourceforge.net/projects/mysqlworkbenchdjangomodule/ Am Sonntag, 10. Juni 2007 22:05:17 UTC+2 schrieb CarlFK: > > I use MySql Workbench for data modeling. It might be a good idea to > have it create django's

Re: Django signals to all connections?

2013-08-19 Thread Gerd Koetje
but can it also update a message on a page where that user is without reloading the page? lets say user 1 is on page http://www.domain.com/acertainview/ and at that moment i start a signal as admin with the text hello there Can i update the text on his page to that text (live) Op maandag 19 au

Re: Django signals to all connections?

2013-08-19 Thread Rafael Garbin
Yes, always one user logged in, django will look for receiver and running the method. 2013/8/19 Gerd Koetje > omg god bless python/django.. > > > So this really works? > > user 1 is logged in to my app > user 2 is logged in to my app > > As admin i send a signal with the text hello all and it w

Re: Django signals to all connections?

2013-08-19 Thread Gerd Koetje
omg god bless python/django.. So this really works? user 1 is logged in to my app user 2 is logged in to my app As admin i send a signal with the text hello all and it will be printed on the page that user 1 and 2 are on? -- You received this message because you are subscribed to the Google

Re: Django signals to all connections?

2013-08-19 Thread Rafael Garbin
from django.contrib.auth import user_logged_in @receiver(user_logged_in) def my_func(...) -- 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.

Re: Reverse Lookup Failure on password change/reset views

2013-08-19 Thread anentropic
Hmm, well after looking at the source of the `reverse` method I can see that it's not doing what I imagined it was... I am so used to always naming my urls in urlconfs, when I saw a full import path to a view function like: reverse('django.contrib.auth.views.password_reset_done') in the auth/vie

Re: Reverse Lookup Failure on password change/reset views

2013-08-19 Thread anentropic
This seems a bug in Django... the `reverse` function is passed the name of a view function, not a named url, so the fact that the url it's being asked to match is included under a namespace shouldn't matter? (here because I just hit the same problem myself) On Saturday, 27 July 2013 08:20:18 UT

Re: Django signals to all connections?

2013-08-19 Thread Avraham Serour
maybe you can use a middleware to log access On Mon, Aug 19, 2013 at 7:29 AM, Gerd Koetje wrote: > Is is possible to start an event at all connected users with signals? > If this is possible can someone show me an example of it. > > > Greetz > Gerd > > -- > You received this message because you

Re: Representing infinity or "no limit" in an integer field?

2013-08-19 Thread Jani Tiainen
On Mon, 19 Aug 2013 00:39:09 -0700 (PDT) Victor Hooi wrote: > Hi, > > I have a Django IntegerField that I'm using to store the purchase limit for > a product. > > purchase_limit = models.IntegerField() > > > I also need to represent no limit (i.e. infinity) as well in that field. > > I was

Re: Representing infinity or "no limit" in an integer field?

2013-08-19 Thread Mike Dewhirst
On 19/08/2013 5:39pm, Victor Hooi wrote: Hi, I have a Django IntegerField that I'm using to store the purchase limit for a product. purchase_limit = models.IntegerField() I also need to represent no limit (i.e. infinity) as well in that field. I was thinking of just using NULL to represe

Representing infinity or "no limit" in an integer field?

2013-08-19 Thread Victor Hooi
Hi, I have a Django IntegerField that I'm using to store the purchase limit for a product. purchase_limit = models.IntegerField() I also need to represent no limit (i.e. infinity) as well in that field. I was thinking of just using NULL to represent no limit. purchase_limit = models.IntegerF