Re: dump sqlite to file when testing

2010-10-21 Thread Russell Keith-Magee
On Fri, Oct 22, 2010 at 12:37 PM, Phlip wrote: > I just tried it: > > DATABASES = { >    'default': { >        'ENGINE': 'django.db.backends.sqlite3', > #  TODO restore        'NAME': ':memory:', >        'NAME': '/home/phlip/fun.db', >        'USER': '', >        'PASSWORD':

Re: dump sqlite to file when testing

2010-10-21 Thread Phlip
I just tried it: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # TODO restore'NAME': ':memory:', 'NAME': '/home/phlip/fun.db', 'USER': '', 'PASSWORD': '', 'HOST': '', 'PORT': '', } } Yes that's in my

Re: AutoField field that increments with regards to a foreign key?

2010-10-21 Thread orokusaki
Correction: I meant for the third ticket to have pk: 3. On Oct 21, 3:18 pm, Yo-Yo Ma wrote: > Example: > > Company has many Tickets > Tickets have a PK, as well as a "number". > Each Ticket's "number" should be the highest prior "number" for a > Ticket with the same

AutoField field that increments with regards to a foreign key?

2010-10-21 Thread Yo-Yo Ma
Example: Company has many Tickets Tickets have a PK, as well as a "number". Each Ticket's "number" should be the highest prior "number" for a Ticket with the same Company Ticket: pk: 1, number: 1, company: XYZ Ticket: pk: 2, number: 1, company: Acme Ticket: pk: 1, number: 2, company: XYZ

Re: Tutorial Error - TemplateDoesNotExist at /polls/

2010-10-21 Thread Robbington
Apologies, I wasnt sure which bit of the tutorial you where at. I think I see now the problem. Did you just stop reading after you entered the last bit of code in views.py? """Reload the page. Now you'll see an error: TemplateDoesNotExist at /polls/""" So index.html is in

Re: Tutorial Error - TemplateDoesNotExist at /polls/

2010-10-21 Thread TheNational22
I fully understood that and I thought it was implied in that I said I was working with the tutorial I would have that file created. You only asked where my template dir was directed to and that I put urls.py in my reply, I would have put this in there if you had requested. Here it is. Now, as far

Re: Tutorial Error - TemplateDoesNotExist at /polls/

2010-10-21 Thread Robbington
You see, what I tried to explain in the last message, my friend was that index in 'polls.views.index') doesnt point the url polls/ to the index.html but to the function you are suppose to create in the views.py file in your app directory. Your view.py file (inside your poll app folder)should look

Re: call more than one view action from an uri path?

2010-10-21 Thread Paul Winkler
On Oct 21, 10:39 am, Steve Holden wrote: > REST, however, has a fairly rigid one-URL-one-action structure Obligatory REST nitpick: REST maps URIs to resources, not actions. In HTTP, the HTTP methods specify the action to perform. (REST as described by Fielding also has

Re: Tutorial Error - TemplateDoesNotExist at /polls/

2010-10-21 Thread TheNational22
The index.html file is in the right location, what worries me is that the template loaders are showing that they are loading nothing. In all the other qustion in the google groups here that referenced an isssue with templates not loading, their traceback had something like unable to find documnet

Re: call more than one view action from an uri path?

2010-10-21 Thread ringemup
> You could try something like: > >     args = iter(args)    # may need args.__iter__() in earlier Pythons? >     for func in args: >         arg = next(args) # may need args.next() in earlier Pythons? >            ... > > >     if func in list_of_allowed_funcs: > >       func(arg) > >   return

Re: Adding relationship to User model

2010-10-21 Thread Shawn Milochik
http://docs.djangoproject.com/en/dev/topics/auth/#storing-additional-information-about-users This'll do the trick. ;o) Shawn -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com.

Re: call more than one view action from an uri path?

2010-10-21 Thread Phlip
> Well, like I said, I haven't tested that particular regex.  But it > should be possible to write a regex that does work. it turns out your regex works fine: print re.search(r'^((\w+)/(\d+)/)+$', 'fries/4/frobs/9/areas/ 2/').group(1) Django uses groups() instead of group(1), for whatever

Re: call more than one view action from an uri path?

2010-10-21 Thread Steve Holden
On 10/21/2010 2:24 PM, ringemup wrote: > #urls.py > #note: untested regex, but a regex should be able to do this > url('^((\w+)/(\d+)/)+$', 'myview', ...) > Oops. I omitted to point out (though the OP picked it up) that a repeated group in a regex only leaves behind its last match in the match

Re: call more than one view action from an uri path?

2010-10-21 Thread Steve Holden
On 10/21/2010 2:24 PM, ringemup wrote: > You can't do something like this? > > #urls.py > #note: untested regex, but a regex should be able to do this > url('^((\w+)/(\d+)/)+$', 'myview', ...) > > #views.py > # note: this is pseudocode > def myview(request, *args, **kwargs): > # iterate

Re: call more than one view action from an uri path?

2010-10-21 Thread ringemup
Well, like I said, I haven't tested that particular regex. But it should be possible to write a regex that does work. If Django's dispatcher chokes on subpatterns, then just use the ^(.+)$ approach and split it yourself in the view, then iterate. Either way, you shouldn't have to call multiple

Re: Tutorial Error - TemplateDoesNotExist at /polls/

2010-10-21 Thread Robbington
Where is your template_dirs in settings.py pointed too? If you can post your urls.py. Looking at the tutorial again, (r'^polls/$', 'polls.views.index'), means that the url 'polls' will serve the index function in the views.py file inside your polls app. Your index.html should lie inside the top

Re: call more than one view action from an uri path?

2010-10-21 Thread Phlip
> url('^((\w+)/(\d+)/)+$', 'myview', ...) Actually, no, that's only giving the last two matches: (u'areas/2/', u'areas', u'2') -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com.

Re: call more than one view action from an uri path?

2010-10-21 Thread Phlip
> You can't do something like this? > url('^((\w+)/(\d+)/)+$', 'myview', ...) Ah, I started with ^(.*)$ , and put the split on the inside. I will go with your + pattern, because it checks for trivial errors at the correct level. -- You received this message because you are subscribed to the

Strange Filter Behaviour With UUIDField

2010-10-21 Thread Jim Purbrick
I've just finished patching django.contrib.auth.User to use one of reverie's UUIDFields (http://gist.github.com/374662) as it's primary key. It's mostly been pleasantly straightforward, but I was slightly puzzled by the need for the patch below, which requires the filter to explicitly address the

Re: call more than one view action from an uri path?

2010-10-21 Thread ringemup
You can't do something like this? #urls.py #note: untested regex, but a regex should be able to do this url('^((\w+)/(\d+)/)+$', 'myview', ...) #views.py # note: this is pseudocode def myview(request, *args, **kwargs): # iterate through args two at a time for func, arg in args: if func

Tutorial Error - TemplateDoesNotExist at /polls/

2010-10-21 Thread TheNational22
I searched the posts for this, but I couldn't find my issue. I am getting TemplateDoesNotExist at /polls/ when after adding the index.html, but the template loaders show no directory being loaded. My traceback is here http://dpaste.com/261308/. Thanks for the input. -- You received this message

Re: call more than one view action from an uri path?

2010-10-21 Thread Phlip
> REST, however, has a fairly rigid one-URL-one-action structure which is > ideally suited to Django's URL dispatch. The only way to get what you > want is to layer another dispatching service atop Django's. I don't > think you can do it with urlconfs alone. knp. The point of urlconf is to adapt

Re: e-commerce - credit cards

2010-10-21 Thread Ted
If you have to ask, you don't want to do it. There is another solution that allows for essentially identical business logic - store the card number with your gateway. Authorize.net provides Customer Information Manager. Quantum Gateway provides "quantum vault". Last time I looked paypal/google

Re: Spaces in request.GET

2010-10-21 Thread Govindarajan
Thanks. I will try the quotes for now. I am just building a prototype now. Will quickly move to django form library. -G On Thu, Oct 21, 2010 at 8:17 PM, Thomas Guettler wrote: > Hi, > > please try this: > > > BTW, I would use the form library of django. It helps you to

Re: Comments and cascade delete

2010-10-21 Thread shacker
On Oct 21, 4:31 am, David De La Harpe Golden wrote: > > Hmm.  Appears to work okay for me (only tested Django-1.1.2), at least > for instance.delete().   Perhaps you could try the operation directly at > ./manage.py shell to see if there's anything odd going on: >

Re: dump sqlite to file when testing

2010-10-21 Thread Miguel Araujo
Thanks Russ, I couldn't find it in the documentation, IMHO I think it's a little bit hidden. Best regards, Miguel Araujo 2010/10/21 Russell Keith-Magee > On Wed, Oct 20, 2010 at 10:33 PM, Miguel Araujo > wrote: > > Hi everyone, > > Is there any

Re: moving from Postgres to MySQL

2010-10-21 Thread David De La Harpe Golden
On 21/10/10 15:06, Chris Withers wrote: > ...bt, why would dumpdata dump out something invalid? Why indeed, but that doesn't mean it isn't. (aside: of course the dumb regex match I suggested wasn't a proper date parse either, you might want to try an actual parse in the loop - which is what

Re: RelatedManager bug?

2010-10-21 Thread Daniel Roseman
On Oct 21, 4:01 pm, Lucasm wrote: > It seems that the following does not work as expected: > > from django.db import models > > class MyManager(models.Manager): >     def create(self, *args, **kwargs): >         print "I am called!" >         return super(MyManager,

RelatedManager bug?

2010-10-21 Thread Lucasm
It seems that the following does not work as expected: from django.db import models class MyManager(models.Manager): def create(self, *args, **kwargs): print "I am called!" return super(MyManager, self).create(*args, **kwargs) class OtherModel(models.Model): pass

Re: Spaces in request.GET

2010-10-21 Thread Thomas Guettler
Hi, please try this: BTW, I would use the form library of django. It helps you to reduce bugs and ist easy to use. Rule of thumb: Don't access request.GET or request.POST. Give one of these dictionaries to your form. Thomas Govindarajan wrote: > First off I have to say that I am new to

Re: Spaces in request.GET

2010-10-21 Thread ringemup
try this: Unquoted attributes are invalid HTML, and your browser is probably treating the second half of the string as a separate attribute. On Oct 21, 9:24 am, Govindarajan wrote: > First off I have to say that I am new to django. I am trying to get a > value from

Re: moving from Postgres to MySQL

2010-10-21 Thread ringemup
MySQL has a tool (mysqldump) that will output the contents of an entire database to a SQL file that can then be loaded directly into another database. Does Postgres not have anything analogous? On Oct 11, 8:58 am, Chris Withers wrote: > Hi All, > > I have an existing

Re: call more than one view action from an uri path?

2010-10-21 Thread Steve Holden
On 10/21/2010 9:36 AM, Phlip wrote: > On Oct 21, 5:26 am, Scott Gould wrote: > >> What's your use case? Are "nest, pest and rest" always "nest, pest and >> rest" -- or could they be "rest, pest and nest", or "nest, best, and >> rest"? > > Tx but - the use case is we can't do

django template “file name too long”

2010-10-21 Thread dereko
I'm very new to Python and Django so maybe someone can point me in the right direction. I have the following url.py line url(r'^$', direct_to_template, {'template':'index.html', 'extra_context':{'featured_actors': lambda: User.objects

Re: moving from Postgres to MySQL

2010-10-21 Thread Chris Withers
On 21/10/2010 14:48, David De La Harpe Golden wrote: On 21/10/10 13:31, Chris Withers wrote: ...which is a little odd, given that the file was created by 'dumpdata'. Any ideas? Do you see any genuine wierdness in the format of any stringified datetimes in the dumped json? Yes I know you've

Django-autocomplete - styling?

2010-10-21 Thread Derek
A quick question for anyone using the django-autocomplete ... where/how do I style the display box used for displaying the "static" text? Thanks! Derek -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: admin list_filter to display only non-empty values

2010-10-21 Thread derek
Alessandro Sounds like you need a custom FilterSpec; see for example: http://my.opera.com/curaloucura/blog/2009/02/17/custom-filter-on-django-admin On Oct 21, 11:06 am, Alessandro Ronchi wrote: > Is it possible to change the list_filter in admin to show only items

Re: moving from Postgres to MySQL

2010-10-21 Thread David De La Harpe Golden
On 21/10/10 13:31, Chris Withers wrote: > ...which is a little odd, given that the file was created by 'dumpdata'. > Any ideas? > Do you see any genuine wierdness in the format of any stringified datetimes in the dumped json? Yes I know you've got 132 megs, but I don't mean check totally

Re: Noob » Tutorial » UnicodeDecodeError in ‘bas ehttp.py’

2010-10-21 Thread PureVirtual
Sandro, it's obviously a good thing to do when using non-ASCII characters *in your code*. The problem is that this exception on my system showed up whenever the mimetypes.guess_type method was called, even if it is the only line of cod in source file (except the import line) and there are no

Re: moving from Postgres to MySQL

2010-10-21 Thread Chris Withers
On 21/10/2010 14:06, Jeff Green wrote: When I was using loaddata I found out that if I did not have a True or False value for any boolean fields, I would have an issue loading the data. Once, I set the value for any records to True or False I was successfully able to use loaddata. Hope that

Re: call more than one view action from an uri path?

2010-10-21 Thread Phlip
On Oct 21, 5:26 am, Scott Gould wrote: > What's your use case? Are "nest, pest and rest" always "nest, pest and > rest" -- or could they be "rest, pest and nest", or "nest, best, and > rest"? Tx but - the use case is we can't do it like you said. C-: The point is a REST

May I use an html form outside django to login?

2010-10-21 Thread Rodrigo
I have my doubts that csrf protection won't allow me, in that case I'd like to discuss how to circumvent that fact (if it's the correct way to do it) or which other kind if changes should I do to fullfill my needs. Thanks in advance. -- You received this message because you are subscribed to

Spaces in request.GET

2010-10-21 Thread Govindarajan
First off I have to say that I am new to django. I am trying to get a value from drop down select in HTML part. This value has spaces in it. However, when I retrieve it in the view code only the text up to the first space gets retrieved. Is there a to retrieve the whole string with all the spaces

Re: moving from Postgres to MySQL

2010-10-21 Thread Jeff Green
When I was using loaddata I found out that if I did not have a True or False value for any boolean fields, I would have an issue loading the data. Once, I set the value for any records to True or False I was successfully able to use loaddata. Hope that helps On Thu, Oct 21, 2010 at 7:31 AM, Chris

Re: moving from Postgres to MySQL

2010-10-21 Thread Chris Withers
On 11/10/2010 14:03, Shawn Milochik wrote: One way would be to use the dumpdata command to export everything, change your settings to point to the new database, then loaddata to restore. Okay, so I'm using buildout and djangorecipe for my deployment. On the postgres-backed server, I did:

Re: call more than one view action from an uri path?

2010-10-21 Thread Scott Gould
What's your use case? Are "nest, pest and rest" always "nest, pest and rest" -- or could they be "rest, pest and nest", or "nest, best, and rest"? If they're set in stone; that is, it's always nest, followed by pest, followed by rest, then it's easy enough to just parameterize the url:

Re: Adding relationship to User model

2010-10-21 Thread Daniel Roseman
On Oct 21, 8:59 am, easylancer wrote: > I want to create s many to one in the users model so that a account > can contain many users. How do i do this since User model exists in > django core? Create a userprofile model with a OneToOne relationship with User, and give that

Re: Noob » Tutorial » UnicodeDecodeError in ‘bas ehttp.py’

2010-10-21 Thread Sandro Dutra
To use unicode characters, I put on the top of source file: -*- coding: utf-8 -*- and before any string I put an "u", like: u"My unicode string". On templates, I save the file as utf-8. There's no workaround, only code. 2010/10/21 PureVirtual <1min...@gmail.com> > For people who might have the

Re: querying against two foreign keys

2010-10-21 Thread Daniel Roseman
On Oct 21, 12:47 pm, Franklin Einspruch wrote: > In my database there are tables for ArtworkImage, Artwork, and Artist. > Every ArtworkImage belongs to an Artwork, and every Artwork belongs to > an Artist. > > class Artist(models.Model): >     directory =

Re: About Thumbnails

2010-10-21 Thread Ekin Yalgın
Thumbnail si not working. On Thu, Oct 21, 2010 at 2:48 PM, Kenneth Gonsalves wrote: > On Thu, 2010-10-21 at 14:44 +0300, Ekin Yalgın wrote: >> The path is correct, because python gives no error and creates the >> tables about the easy_thumbnails. Model adds the image to the

Re: Oracle Database Other User Tables/Views

2010-10-21 Thread Christopher Conover
The quoting trick worked well. Thank You Chris >>> Ian 10/20/10 2:48 PM >>> On Oct 20, 8:20 am, "Christopher Conover" wrote: > Hello, > > I am using Django's multiple database support to connect to an existing > Oracle database (10g). I do not

Re: About Thumbnails

2010-10-21 Thread Kenneth Gonsalves
On Thu, 2010-10-21 at 14:44 +0300, Ekin Yalgın wrote: > The path is correct, because python gives no error and creates the > tables about the easy_thumbnails. Model adds the image to the its > directory. There is no problem, if you ask this, else i didn't > understand what you meant. Thanks again.

querying against two foreign keys

2010-10-21 Thread Franklin Einspruch
In my database there are tables for ArtworkImage, Artwork, and Artist. Every ArtworkImage belongs to an Artwork, and every Artwork belongs to an Artist. class Artist(models.Model): directory = models.CharField(max_length=128) # this is a lowercase version of the artist's name ... class

Re: About Thumbnails

2010-10-21 Thread Ekin Yalgın
The path is correct, because python gives no error and creates the tables about the easy_thumbnails. Model adds the image to the its directory. There is no problem, if you ask this, else i didn't understand what you meant. Thanks again. On Thu, Oct 21, 2010 at 2:39 PM, Kenneth Gonsalves

Re: About Thumbnails

2010-10-21 Thread Kenneth Gonsalves
On Thu, 2010-10-21 at 14:34 +0300, Ekin Yalgın wrote: > Thank you but it didn't work Do we need add something to templatetags > folder? I am saying this, because with django-thumbnail extension, > http://bitbucket.org/winsmith/django-thumbnail/wiki/Home > when i add thumb.py to templatetags

Re: About Thumbnails

2010-10-21 Thread Ekin Yalgın
Thank you but it didn't work Do we need add something to templatetags folder? I am saying this, because with django-thumbnail extension, http://bitbucket.org/winsmith/django-thumbnail/wiki/Home when i add thumb.py to templatetags folder it is working with it is working. It is creating a new

Re: Comments and cascade delete

2010-10-21 Thread David De La Harpe Golden
On 21/10/10 08:22, shacker wrote: > Thanks David, but I'm not sure I'm getting this. I've added that line > to the class, but it doesn't give me cascade delete behavior (I can > still delete a row and the comments linked to it remain in the db). Is > there something else I need to do? Hmm.

Re: About Thumbnails

2010-10-21 Thread Kenneth Gonsalves
On Thu, 2010-10-21 at 14:24 +0300, Ekin Yalgın wrote: > Sorry it is thumb = ImageField ... then what you have done is correct -- regards Kenneth Gonsalves Senior Associate NRC-FOSS at AU-KBC -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: About Thumbnails

2010-10-21 Thread Ekin Yalgın
Sorry it is thumb = ImageField ... On Thu, Oct 21, 2010 at 2:21 PM, Ekin Yalgın wrote: > It is something like this > > class Project(models.Model): >    avatar = ImageField(upload_to='images') > > On Thu, Oct 21, 2010 at 2:16 PM, Kenneth Gonsalves wrote:

Re: Strange cookie error, only for some IE users?

2010-10-21 Thread Ryan
Solved my own problem. User's clocks were set ahead so the Internet Explorer (pinnacle of stupid design) expired the cookie instantly. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: About Thumbnails

2010-10-21 Thread Ekin Yalgın
It is something like this class Project(models.Model): avatar = ImageField(upload_to='images') On Thu, Oct 21, 2010 at 2:16 PM, Kenneth Gonsalves wrote: > On Thu, 2010-10-21 at 14:11 +0300, Ekin Yalgın wrote: >> I assumed that iimage filed is named thumb. Must it be

Re: About Thumbnails

2010-10-21 Thread Kenneth Gonsalves
On Thu, 2010-10-21 at 14:11 +0300, Ekin Yalgın wrote: > I assumed that iimage filed is named thumb. Must it be 'photo' > certainly? you can name it anything you want - what is the name you have given it in the model? -- regards Kenneth Gonsalves Senior Associate NRC-FOSS at AU-KBC -- You

Re: e-commerce - credit cards

2010-10-21 Thread Tom Evans
For credit card companies to allow you to do that sort of behaviour, your site must be PCI-DSS compliant, and your site/code will be audited once a year (at your cost) by your acquiring bank. The requirements for PCI-DSS compliance are widely available on the internet. Due to these reasons,

Re: About Thumbnails

2010-10-21 Thread Ekin Yalgın
I assumed that iimage filed is named thumb. Must it be 'photo' certainly? On Thu, Oct 21, 2010 at 2:01 PM, Kenneth Gonsalves wrote: > On Thu, 2010-10-21 at 13:53 +0300, Ekin Yalgın wrote: >> It is a good extension, but in template page, >> >> >> {% load thumbnail %} >>

Re: Noob » Tutorial » UnicodeDecodeError in ‘bas ehttp.py’

2010-10-21 Thread PureVirtual
For people who might have the mentioned problem here is a simple solution (at least a workaround): rename non-ASCII keys from the registry path "HKEY_CLASSES_ROOT\MIME\Database\Content Type" (in my case there were three of them starting with "аудио" and "видео"). Source of solution (in Russian):

e-commerce - credit cards

2010-10-21 Thread django_jedi
Hello all, Regarding Django and e-commerce - has anyone ever built a site that stores credit card information for delayed processing? In other words, the customer makes a purchase, but the Web site "remembers" their information for future purchases? If you have, what special considerations are

Re: About Thumbnails

2010-10-21 Thread Kenneth Gonsalves
On Thu, 2010-10-21 at 13:53 +0300, Ekin Yalgın wrote: > It is a good extension, but in template page, > > > {% load thumbnail %} > ... > assume that the image field is named photo: will work (note it is not object.photo.url) -- regards Kenneth Gonsalves Senior Associate NRC-FOSS at

Re: About Thumbnails

2010-10-21 Thread Ekin Yalgın
It is a good extension, but in template page, {% load thumbnail %} ... ... this combination is not working for me. What should i do you think? On Tue, Oct 19, 2010 at 8:02 AM, Kenneth Gonsalves wrote: > On Mon, 2010-10-18 at 19:26 +0530, Venkatraman S wrote: >> Look

Adding relationship to User model

2010-10-21 Thread easylancer
I want to create s many to one in the users model so that a account can contain many users. How do i do this since User model exists in django core? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Custom filterspecs - ManyToMany, but inverted

2010-10-21 Thread thorstenkranz
Hi, I'm trying to get some filter for my admin page on a ManyToManyField. When I add it to the list_filter of the model admin, the filtering works like a charm. But this is not what I want: I'd like to invert the results, i.e. I want that only those list entries remain that do NOT have this

Strange cookie error, only for some IE users?

2010-10-21 Thread Ryan
At a client site, I have occasionally had her customers complain that they get cookie errors when they try to log in, even though they have cookies enabled and they are able to log in to other sites. Clearing out their cookies doesn't seem to help. Most (95-99%) users can log in fine. The

Re: Problems displaying image objects in a Django template using a custom template tag? (coding included)

2010-10-21 Thread tricks...@googlemail.com
Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this

admin list_filter to display only non-empty values

2010-10-21 Thread Alessandro Ronchi
Is it possible to change the list_filter in admin to show only items that have related values? I have a foreignkey to a model but I want to show only filters that points to non-empty sets. Thanks in advance, best regards. -- Alessandro Ronchi http://www.soasi.com Hobby & Giochi

Filtering drop-down lists at runtime with dynamic changes

2010-10-21 Thread Derek
I need to be able to both: (a) prefilter dropdown lists for existing entries (to avoid loading unneeded data); (b) allow pre-filtered dropdown lists to change dynamically at runtime I have, for example: class Country(models.Model): id = models.CharField(max_length=2, primary_key=True)

Re: Comments and cascade delete

2010-10-21 Thread shacker
On Oct 19, 9:42 am, David De La Harpe Golden wrote: > > So to get deletion behaviour you want, you need to define a reverse > generic relation back to comment on your model for django's deletion > cascade to follow the deletion in the generic case.  On your own