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.IntegerField(blank=True, null=True)


Zero would have a meaning for this field (you can't buy any), however 
negative numbers don't have any meaning.

Hence, another option is just to use say, -1 as the value to represent no 
limit.

Any thoughts on either option, or which one is more "correct"?

Cheers,
Victor

-- 
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.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


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 represent no limit.

purchase_limit = models.IntegerField(blank=True, null=True)


If there is a purchase limit put it in. Otherwise there is no purchase 
limit. For me, None/Null would be comfortable. But I might be tempted to 
add functions in the model's clean() method which encapsulate the the 
business rules for the app - whatever they are.






Zero would have a meaning for this field (you can't buy any), however
negative numbers don't have any meaning.

Hence, another option is just to use say, -1 as the value to represent
no limit.

Any thoughts on either option, or which one is more "correct"?

Cheers,
Victor

--
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.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


--
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.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


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 thinking of just using NULL to represent no limit.
> 
> purchase_limit = models.IntegerField(blank=True, null=True)
> 
> 
> Zero would have a meaning for this field (you can't buy any), however 
> negative numbers don't have any meaning.
> 
> Hence, another option is just to use say, -1 as the value to represent no 
> limit.
> 
> Any thoughts on either option, or which one is more "correct"?

>From mathematical point integers forms an infinite (countable) set. Though in 
>computer science interger is usually a finite set. So what you need is just 
>define a logic. Note that this also makes impossible to enforce "unlimited" 
>amount to buy so there will definitely be some maximum amount you can really 
>buy.

NULL is usually interpreted as "no value defined" which would suit well in that 
sense. 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 personally would pick max value while leaving NULL to mean "no value defined".

-- 

Jani Tiainen

-- 
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.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


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 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.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


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 UTC+1, Peter wrote:
>
> Yep, that fixed it.  Thanks.
>
> I still think it's wrong of django not to find it by view name though...
>
>
>> Probably because you've included it under a namespace, so Django would 
>> need to look for it as "registration:whatever". There's no need to use the 
>> namespace in the include call.
>> --
>> DR. 
>>
>

-- 
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.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


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/views.py I assumed it ought to find that vew function in 
whichever urlconf it was defined

Thinking about it, it can't do that because you could easily have more than 
one url pointing to that function

It means if you have something like this in your root urlconf:
(r'^accounts/', include('django.contrib.auth.urls', namespace="auth")),

then the reverse isn't going to work because it would have to be:
reverse('auth:django.contrib.auth.views.password_reset_done')

in short, don't use a namespace on the built-in auth urls

Arguably, the auth views could work out what namespace they're under and 
handle it though, eg:
(django/contrib/auth/views.py #147)
resolver = resolve(request.path)
ns = ''
if resolver.namespace:
ns = resolver.namespace + ':'
post_reset_redirect = 
reverse('{0}django.contrib.auth.views.password_reset_done'.format(ns))

(admittedly this assumes you have imported all of the auth urls into the 
same namespace)

On Monday, 19 August 2013 12:27:57 UTC+1, anentropic wrote:
>
> 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 UTC+1, Peter wrote:
>>
>> Yep, that fixed it.  Thanks.
>>
>> I still think it's wrong of django not to find it by view name though...
>>
>>
>>> Probably because you've included it under a namespace, so Django would 
>>> need to look for it as "registration:whatever". There's no need to use the 
>>> namespace in the include call.
>>> --
>>> DR. 
>>>
>>

-- 
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.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


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 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.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


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 will be printed on
> the page that user 1 and 2 are on?
>
> --
> 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.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Rafael Luís de Souza Garbin
Computer Science Graduate - Software Developer
Linux Counter: Registered user #496288
http://rgarbin.github.com/ 
Phone: 051-96188806

-- 
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.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


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 augustus 2013 06:29:45 UTC+2 schreef Gerd Koetje:
>
> 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 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.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


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 model.py.  Has anyone done anything like this?
>
> Carl K
>
>

-- 
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.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


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, how do I go about this? I'm thinking of attaching a user_id field to 
the file when it is uploaded, and then filtering against that wen a logged 
in user goes to the list of files, but I'm not sure how I would implement 
this.
Any help greatly appreciated. 
Cheers, N/

-- 
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.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


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 according to
the user object?
If so, how do I go about this? I'm thinking of attaching a user_id field
to the file when it is uploaded, and then filtering against that wen a
logged in user goes to the list of files, but I'm not sure how I would
implement this.
Any help greatly appreciated.


Hi,

Your best option is to add a foreign key to your user model (usually 
django.contrib.auth.models.User) in your model that handles your datafiles.


from django.contrib.auth.models import User

class Datafile(models.Model):
user = models.ForeignKey(User)
...


When a user upload a datafile, don't forget to set the user field:

mydatafile.user = request.user


And then you can filter datafiles:

Datafile.objects.filter(user=request.user)


--
Laurent Meunier 

--
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.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


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 with an existing model instance and 
edit it rather than try to add a new one, so I've tried code that does the 
following:

- create a new model instance and save it
- get the change view URL for it
- construct a ModelForm with the model instance
- POST to the change URL using the form's initial dictionary as data
(full code below)

The POST returns some validation errors. Is there an easy way to construct the 
data that the admin change view needs? Obviously I could look at the code that 
builds the form on the admin page and add a POST parameter for every input 
field I find on the form, but this would require reading (and writing) a lot of 
code.

As promised here's the (non-working) code I have so far:

from django.contrib import admin
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.test.client import RequestFactory
from goway.admin import TripAdmin
from goway.models import Trip
from goway.tests.service.utils import create_trip


class TripAdminTests(TestCase):
def setUp(self):
self.factory = RequestFactory()

def test_message_when_no_derived_primary_destination(self):
# This is an attempt to create a trip and then post it unchanged to the 
admin change view.
# The next step would be to check that there was a "Couldn't 
automatically work out primary destination, please choose a primary destination 
manually." message.
# Couldn't get the post to the trip change view to work though - got 
validation errors.
old_get_inline_instances = TripAdmin.get_inline_instances
# Hack get_inline_instances() to return an empty list to avoid 
ValidationError: [u'ManagementForm data is missing or has been tampered with']
TripAdmin.get_inline_instances = self.get_inline_instances
try:
user = User.objects.create_superuser('testadmin', 
'nob...@devrx.org', 'secret')
self.client.login(username=user.username, password='secret')

trip = create_trip()
change_url = reverse('admin:goway_trip_change', args=(trip.pk,))
request = self.factory.get(change_url)
request.user = user

trip_admin = TripAdmin(Trip, admin.site)
form_class = trip_admin.get_form(request, trip)
form = form_class(instance=trip)

response = self.client.post(change_url, data=form.initial)

errors = response.context['adminform'].form.errors
self.assertEqual(0, len(errors), msg='Got validation errors: %s' % 
errors)

messages = response.context['messages']
print messages
finally:
TripAdmin.get_inline_instances = old_get_inline_instances

def get_inline_instances(self, *args, **kwargs):
return []

...and here's the output:

Failure
Traceback (most recent call last):
  File 
"/Users/francis/Code/Bright/python/goway/apps/goway/tests/service/trip_admin.py",
 line 41, in test_message_when_no_derived_primary_destination
self.assertEqual(0, len(errors), msg='Got validation errors: %s' % errors)
AssertionError: 0 != 7 : Got validation errors: mapSelect a valid choice. That 
choice is not one of the available choices.tour_itinerarySelect a valid choice. That choice is not one of the 
available choices.primary_destinationSelect a valid choice. That choice is not one of the 
available choices.placeholder_pageSelect a valid choice. That choice is not one of the 
available choices.dynamic_packageSelect a valid choice. That choice is not one of the 
available choices.excursionSelect 
a valid choice. That choice is not one of the available 
choices.typesThis field is 
required.

It isn't critical that I add a test for this - it's not the end of the world if 
the warning message doesn't get shown - but it would be nice to know how to do 
it if there's an easy way!

Thanks,

Francis

-- 
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.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


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", they get a list of results via
>> a popular search API.
>>
>> My issue is that I am using django-endless-pagination to paginate (no
>> kidding!) the API response - after some formatting, of course. When I click
>> next, the pagination appends url parameters. I am wondering which url
>> pattern to use to capture said parameters. The url scheme is as follows:
>>
>> http://127.0.0.1:8000/search/ -> works fine, goes to my search view.
>> http://127.0.0.1:8000/search/?**page=2->
>>  after a user clicks on the pagination links. I have no url pattern to
>> handle this.
>>
>> I am no regex expert. I also do not have an XKCD tee :-/
>>
>> SOS?
>>
>> Thanks.
>>
>> --
>> Regards,
>> Sithu Lloyd Dube
>>
>
> These are both caught by the pattern '^search/$'. Parameters after the ?
> are not part of the path, so are not processed in the URLconf, but are
> passed as part of request.GET, which you can examine in your view.
> --
> DR.
>
> --
> 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.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Regards,
Sithu Lloyd Dube

-- 
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.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


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.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


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 not true.

+1 to store as Null. 

On Monday, August 19, 2013 1:07:27 AM UTC-7, Jani Tiainen wrote:
>
> 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 thinking of just using NULL to represent no limit. 
> > 
> > purchase_limit = models.IntegerField(blank=True, null=True) 
> > 
> > 
> > Zero would have a meaning for this field (you can't buy any), however 
> > negative numbers don't have any meaning. 
> > 
> > Hence, another option is just to use say, -1 as the value to represent 
> no 
> > limit. 
> > 
> > Any thoughts on either option, or which one is more "correct"? 
>
> From mathematical point integers forms an infinite (countable) set. Though 
> in computer science interger is usually a finite set. So what you need is 
> just define a logic. Note that this also makes impossible to enforce 
> "unlimited" amount to buy so there will definitely be some maximum amount 
> you can really buy. 
>
> NULL is usually interpreted as "no value defined" which would suit well in 
> that sense. 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 personally would pick max value while leaving NULL to mean "no value 
> defined". 
>
> -- 
>
> Jani Tiainen 
>

-- 
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.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


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 = models.*ForeignKey(Word*, related_name='altword_rosword')
alt_ros_word = models.CharField(max_length=200)
wordy = models.*OneToOneField(Word*, related_name='wordy', 
primary_key=True)
votes = models.IntegerField(default=0)
pub_date = models.DateTimeField('date published')

def __unicode__(self):
return self.alt_ros_word
#___

-- 
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.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


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 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.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.