what is the status of inline unique_together non-fatal error messages?

2008-10-21 Thread bobhaugen
I mean the normal displayable and user-correctable form validation errors, not the fatal database IntegrityError. I found http://groups.google.com/group/django-users/browse_thread/thread/f0e245366b02411b/df6d03f32eb37f93 and http://www.djangosnippets.org/snippets/338/ both more than a year old.

Re: what is the status of inline unique_together non-fatal error messages?

2008-10-21 Thread bobhaugen
On Oct 21, 10:59 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > Have you tried whatever scenario you are particularly interested in on 1.0 > or current code? > > Though general model validation did not make it into 1.0, checking of unique > and unique_together was added in changeset [8805]. It m

Re: what is the status of inline unique_together non-fatal error messages?

2008-10-21 Thread bobhaugen
On Oct 21, 12:34 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > Well then the next step I would try is testing out the current patch for > general model validation, which is ticket #6845: > > http://code.djangoproject.com/ticket/6845 > > Status on this was most recently reported here, I think: >

Many-to-Many Intermediary Models vs just plain ForeignKeys

2008-10-22 Thread bobhaugen
What are the pluses and minuses of using a Many-to-Many Intermediary Model vs just putting a foreign key to the "owning" model in the "owned" model? Example: http://dpaste.com/86133/ Seems like you can do the same things either way, no? Any catches in the M2M field? (P.S. they both have the sa

trying to understand get_absolute_url, NoReverseMatch and url configs

2008-10-27 Thread bobhaugen
Altho I have read alot of the relevant documentation, and searched this group and the Web, I remain confused about these topics and their relationships. Something is not sticking in my brain. I usually get something working by blind cut and paste. Looking for a more conceptual explanation, or e

Re: trying to understand get_absolute_url, NoReverseMatch and url configs

2008-10-27 Thread bobhaugen
Shabda, Thanks for trying, but: > return ('orgs.views.org', [self.type.slug, self.slug]) In the shell, that gets me: TypeError: reverse() argument after ** must be a dictionary But do I understand correctly that the first argument shd be a view? And that what gets returned from get_absol

Re: trying to understand get_absolute_url, NoReverseMatch and url configs

2008-10-27 Thread bobhaugen
Tried going about this another way: In the template: {% url orgs.views.org org.type.slug, org_slug=org.slug %} That gets me this error message: Don't mix *args and **kwargs in call to reverse()! But how is that different from this example in the Django doc? http://docs.djangoproject.c

Re: trying to understand get_absolute_url, NoReverseMatch and url configs

2008-10-27 Thread bobhaugen
Got the url tag version working this way: Changed the url pattern to: url(r'^org/(?P[-\w]+)/(?P[-\w]+)/$', 'orgs.views.org', name='organization'), And the template to: {% url organization type_slug=org.type.slug, org_slug=org.slug %} And added the new keyword to the view. But I'm sti

Re: trying to understand get_absolute_url, NoReverseMatch and url configs

2008-10-27 Thread bobhaugen
Some followup, in case some other poor soul searches for this topic: I found some better doc for get-absolute-url() here: http://docs.djangoproject.com/en/dev/ref/models/instances/?from=olddocs#get-absolute-url Including a better example: @models.permalink def get_absolute_url(self): retur

Re: Django newbie observation

2008-11-13 Thread bobhaugen
You will find lots of excellent examples of Django projects that are open source and up-to-date with version 1.0. See http://djangoplugables.com/ http://pinaxproject.com/ is huge, but the basic_project is fairly simple. http://code.google.com/p/django-basic-apps/ is another suite of apps. --~-

Re: Best IDE for Django and python?

2008-11-25 Thread bobhaugen
On Nov 25, 4:59 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > I'm yet to see an IDE that can deal elegantly with the > capabilities of a dynamic language. This is really not relevant to the original question, but if you say that, you've never used Smalltalk or Lisp. The Smalltalk enviro

Re: HowTo: Django view as a class

2008-08-28 Thread bobhaugen
I would be interested to try this in the context of a whole simple app, if you ever publish such a thing. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djan

_CheckLogin object has no attribute _meta

2008-10-02 Thread bobhaugen
Has anybody seen this error: Exception Type: AttributeError Exception Value: '_CheckLogin' object has no attribute '_meta' See also http://dpaste.com/81918/ Possibly related technique: I'm trying to use multi-table inheritance and a form dictionary to get the form class based on a subc

Re: _CheckLogin object has no attribute _meta

2008-10-02 Thread bobhaugen
Never mind, ignore, stupid programmer error... > section_form = section_form_class(request.POST, > instance=report) Shd be: > instance=section) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

FileField in ModelForm gets required field error with valid entry

2008-10-02 Thread bobhaugen
See http://dpaste.com/81988/ Ran some tests, FileFields work fine in admin. In a ModelForm, when I select a file with the Browse button, then click the submit button, the FileField value disappears and I get a required field error. Did a bunch of googling, ran into this: http://appengineguy.com

Re: FileField in ModelForm gets required field error with valid entry

2008-10-02 Thread bobhaugen
Rajesh, Thanks a million. That advice got me almost all the way there. Needed one more twist, because the file url was unicode, so created this method: def file_url(self): return encoding.iri_to_uri(self.file.url) Now it all works. --~--~-~--~~~---~--~-

Django book says MSSQL works with 1.0...?

2008-10-09 Thread bobhaugen
...but Django documentation does not mention it. What is the real current story? http://www.djangobook.com/en/beta/chapter02/ says: "As of version 1.0, Django supports five database engines: [...] * Microsoft SQL Server (http://www.microsoft.com/sql/)" I also see these seemingly-active dja

Re: Django book says MSSQL works with 1.0...?

2008-10-09 Thread bobhaugen
On Oct 9, 6:00 am, Ulises <[EMAIL PROTECTED]> wrote: > I'm currently using django-mssql with Django 1.0 no problems at all. Ulises, thanks. What server did you use? If not Apache + mod-python or mod-wsgi, please say more about your setup? --~--~-~--~~~---~--~~ You

Re: Django book says MSSQL works with 1.0...?

2008-10-11 Thread bobhaugen
On Oct 10, 5:53 pm, "Adam V." <[EMAIL PROTECTED]> wrote: > > OT: I respect your position but, why you use mssql? > > Our IT systems at work are already Windows / SQL Server based, so it > made sense to do our new web development against the same database. In my case, it is a client requirement. -

admin-like filters in custom views

2009-01-27 Thread bobhaugen
Anybody done anything like: a) using the django admin change_list filters directly in custom views and templates outside of admin? or b) created something *like* the admin change_list filters for use in custom views and templates outside of admin? or c) got any tips on the simplest way one could d

Re: Auction app

2009-02-02 Thread bobhaugen
http://code.google.com/p/django-swaps/ is not an auction app, it's a swapping app (trade anything for anything between registered users of a django site, initially developed for pinax). But it might be useful as a starting point for an auction app if you can't find anything fully tailored. --~--~

Anybody had any problems increasing the length of a varchar field in PostgreSQL?

2009-02-25 Thread bobhaugen
This is on a populated production database. Want to increase a models.CharField from max_length=128 to 255. This is probably something that lots of people do all the time, but this will be my first such change on a production Django + PostgreSQL installation, so I thought I'd ask. --~--~

3 questions about DecimalFields

2009-08-16 Thread bobhaugen
1, I ran into this anomaly in updating a decimal field: The field: remaining = models.DecimalField(max_digits=8, decimal_places=2, default=Decimal("0")) The code that failed: 658 self.remaining -= qty 659 self.remaining = max([Decimal("0"), self.remaining]) 660

Re: 3 questions about DecimalFields

2009-08-16 Thread bobhaugen
On Aug 16, 11:24 am, bobhaugen wrote: > 2. This changeset says it has fixed ticket > #5903:http://code.djangoproject.com/changeset/9823 > > Also says it was fixed 6 months ago.  I did not find the ticket listed > in any of the milestones in the last 6 months, and the page do

Re: 3 questions about DecimalFields

2009-08-16 Thread bobhaugen
Karen, Once again, thanks for the detailed and useful response. On Aug 16, 1:17 pm, Karen Tracey wrote: > If the Python object was created on the fly and relied on the default value: > > dt1 = DThing() > dt1.save() > Then prior to the fix for that bug, dt1.remaining and dt2.remaining would be

Re: Editors of choice

2009-09-11 Thread bobhaugen
Do y'all Ubuntu Vim users install vim-gnome or vim-gtk or neither? Any differences re plugin compatibility? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

instancemethod expected at least 2 arguments, got 0

2009-04-26 Thread bobhaugen
Here's the traceback: http://dpaste.com/38000/ Here's the code that triggered the error: swaps = Swap.objects.filter( Q(state=2, proposing_offer__offerer=request.user) | Q(state=2, responding_offer__offerer=request.user)).order_by("- accepted_time") This may be related: http

Re: instancemethod expected at least 2 arguments, got 0

2009-04-26 Thread bobhaugen
Malcolm, thanks a lot for replying, and for the suggestions. But it looks like it wasn't a django problem or a problem with the quoted code. Resolved on that other thread: On Apr 26, 12:04 pm, Steve wrote: > Found the culprit!!! I was working on implementing site search with > django-search-lu

foreignkey values in formset initial data

2009-05-06 Thread bobhaugen
I have a formset with initial data for foreignkey fields. Unfortunately, the values of the foreignkey fields are not selected in the formset.forms. Not sure if I am doing something wrong or if this is a bug or known limitation. I have cut the code down to a small example that reproduces the prob

Re: foreignkey values in formset initial data

2009-05-06 Thread bobhaugen
Responding to myself: If I specify the object.id instead of just a reference to the object as the initial field value, the selections work correctly. E.g. 'product': item.product.id instead of 'product': item.product --~--~-~--~~~---~--~~ You received this

Re: When would you use Context instead of RequestContext?

2009-10-17 Thread bobhaugen
On Oct 15, 5:13 pm, bruno desthuilliers wrote: > On 15 oct, 18:28, ringemup wrote: > > > I don't think I've seen the two-function technique used much, if at > > all. > > To be true, I never saw it anywhere except in some of my own code. But > I wish I'd seen it more often... Also and FWIW, the "

Re: Thinking of Patterns

2010-06-12 Thread bobhaugen
On Jun 11, 7:17 pm, "James O'Connor" wrote: > Wel what I have in mind is wondering if it would be useful to build > full implementations of what would normally be called "Analysis > Patterns", like Designed Patterns but commone object modeling > solutions to common domain problems.   I've been st

Re: Existing sites using Django

2010-07-15 Thread bobhaugen
http://www.djangosites.org/search/?query=onion Huge. Massively popular. -- 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-us

Re: Logic

2010-07-16 Thread bobhaugen
On Jul 16, 7:56 am, Ravango wrote: > I mean by web server, running a web site, which anyone could use to > perform a specific task. In my case, I would be running a program that > people might be interested to use. Towards building a web server, > currently, using Django, I'm creating a local web

custom vocabularies vs translation

2010-08-09 Thread bobhaugen
I want to provide customizable vocabularies for an open-source django project, where each deployer can use different terms for strings that appear in templates (e.g. field names, form field descriptions, help text, page titles, etc.) Would django language files work for this purpose? Everything w

Re: custom vocabularies vs translation

2010-08-10 Thread bobhaugen
On Aug 9, 5:01 pm, cootetom wrote: > Using the language files is the solution here. Even if your site only > supports the English language, it still means that you can have .po > files for just English. Once you understand how it all hangs together > you'll be away. Thanks alot. Did a test run o

how to add a non-field text property to forms in a formset

2010-09-01 Thread bobhaugen
I often want to add properties to a formset that will fill a table cell with flexibly wrapping, read-only descriptive text. For example, the description of a product, where the enterable field is the quantity ordered. If I use a field, the widget gets a fixed width and the contents do not wrap (u

Re: how to add a non-field text property to forms in a formset

2010-09-01 Thread bobhaugen
On Sep 1, 12:17 pm, Bill Freeman wrote: > This seems to me to be a job for the template.  The forms documentation has > a section on custom rendering which shows you how to iterate through the > fields, or access them by name.  You would insert whatever HTML construct > was appropriate for your te

Re: how to add a non-field text property to forms in a formset

2010-09-02 Thread bobhaugen
Bill, Thanks a lot for sticking with this question. On Sep 2, 1:44 pm, Bill Freeman wrote: > I guess that what I'm saying is that when you get fussy about rendering, you > need to write the html/css yourself.  Because you say you want read only for > these fields, don't use the form field's rend

Re: how to add a non-field text property to forms in a formset

2010-09-02 Thread bobhaugen
On Sep 2, 2:54 pm, Bill Freeman wrote: > Let's start by agreeing on common terminology.  "property" has >  a meaning in Python slightly different than its usage in some > other languages, and I don't think that's what you mean. > > I'm thinking that what you mean by "property" on the form is what

Re: how to add a non-field text property to forms in a formset

2010-09-02 Thread bobhaugen
Bill, thanks a ton for the conversation. I will try some variations of that set of ideas over the weekend and report back here with what works. And you are correct, I am not now creating the formset forms in a loop, but might try that as one variation. -Bob -- You received this message becaus

Re: how to add a non-field text property to forms in a formset

2010-09-02 Thread bobhaugen
I am so dense sometimes... I had forgotten that initial data in a formset is a *list* of dictionaries. So I set up the initial data in a loop over the available products, and created a parallel list of product_descriptions in the same loop. Then set up the formset, and looped over formset.forms

Re: Wiki in Django?

2010-09-13 Thread bobhaugen
http://github.com/bartTC/django-wakawaka http://github.com/pinax/django-wakawaka Does not run on flat files, but it is being actively developed and used in Pinax. You might need to check the diffs to figure out which of the above versions to use. -- You received this message because you are sub

Re: Where do you put your business logic in django? Organizing big projects in django.

2010-09-28 Thread bobhaugen
Seems to be a general ferment on the topics of reusable Django apps and best practices for modularizing large projects. For example, http://groups.google.com/group/django-users/browse_thread/thread/22875fd287d0aa81 I expect the situation to improve, or at least change, a lot over the next year.

Re: representing a possible future object in a form?

2010-11-17 Thread bobhaugen
I've done this several times, and Toby's description is pretty much what I have done. Sometimes three levels of non-data-model classes to represent the matrix: a table class a row class a cell class Then formsets to populate the rows with data entry fields. Then builder methods to morph the data

Re: representing a possible future object in a form?

2010-11-18 Thread bobhaugen
On Nov 18, 12:18 am, Derek wrote: > It would be great if perhaps one of you could write up a more detailed > description (i.e with code) of this as a blog entry... or maybe a wiki page? Derek, before I posted the vague description above, I looked at my code for an example that is open source and

Do Django TestCases reload fixtures on every method?

2010-02-21 Thread bobhaugen
I see here http://toastdriven.com/fresh/whats-wrong-django-slight-return/ a claim that "TestCase-style tests truncate and reload all the fixtures in your database on every test method". Is that true? If so, how would I create a series of test methods that build on each other: for example, one vie

Re: Do Django TestCases reload fixtures on every method?

2010-02-21 Thread bobhaugen
On Feb 21, 9:43 am, Russell Keith-Magee wrote: > It sounds like what you actually want to write is one long test, > rather than N order dependent short tests. If you want to break things > into methods for the sake of clarity/code organization, you can - just > break the test_* entry method into s

Newbie sqlite3 dbshell confusion

2008-01-31 Thread bobhaugen
Installed the latest Django package from the Synaptic package manager on Ubuntu 7.10. I understand the Django version to be 0.96.1 (package says 0.96-1ubuntu0.1). I'm on the first django tutorial: http://www.djangoproject.com/documentation/tutorial01/ Got my sqlite database set up. Now trying t

Re: Newbie sqlite3 dbshell confusion

2008-01-31 Thread bobhaugen
On Jan 31, 10:38 am, Jeff Anderson <[EMAIL PROTECTED]> wrote: > The link you pasted assumes you are using the development version, which > has some differences. My personal recommendation is to remove 0.96 and > use django-svn. You are correct. I just tried some of the tutorial steps that determ

Re: Newbie sqlite3 dbshell confusion

2008-02-01 Thread bobhaugen
On Jan 31, 10:38 am, Jeff Anderson <[EMAIL PROTECTED]> wrote: > My personal recommendation is to remove 0.96 and > use django-svn. Ok, I did that. Or tried to do that, anyway. 1. Removed 0.96.1. 2. did: svn co http://code.djangoproject.com/svn/django/trunk/ django- trunk 3. did: sudo ln -s /djan

Re: Newbie sqlite3 dbshell confusion

2008-02-01 Thread bobhaugen
Brett, Thanks for the info on the Ubuntu 0.96 package. I really appreciate the replies from you, Jeff and Ramiro. Sorry to be so clueless, I'm new to Linux and Python as well as Django. (I know it's a bad idea to adopt more than one new technology at a time, but I got no choice, gotta plunge i

Re: Newbie sqlite3 dbshell confusion

2008-02-01 Thread bobhaugen
Thanks again, Brett. On Feb 1, 7:45 am, Brett Parker <[EMAIL PROTECTED]> wrote: > If you're just wanting to run the latest trunk then you can just use an > svn checkout and add that in to PYTHONPATH on the command line (you > might also want to add /bin to your PATH to get > django-admin.py there

Re: Newbie sqlite3 dbshell confusion

2008-02-01 Thread bobhaugen
On Feb 1, 11:09 am, Brett Parker <[EMAIL PROTECTED]> wrote: > On 01 Feb 08:00, bobhaugen wrote: > > > > On Feb 1, 7:45 am, Brett Parker <[EMAIL PROTECTED]> wrote: > PYTHONPATH is just an environmental variable, often if you're not > already using it it

Newbie trying to install django-trunk from svn on Ubuntu 7.10

2008-02-01 Thread bobhaugen
Following http://www.djangoproject.com/documentation/install/ I'm stuck at the steps of setting up the symlinks to django. Step 3. ln -s `pwd`/django-trunk/django SITE-PACKAGES-DIR/django Step 4. ln -s `pwd`/django-trunk/django/bin/django-admin.py /usr/local/ bin One possible problem: not thinki

Re: Newbie trying to install django-trunk from svn on Ubuntu 7.10

2008-02-01 Thread bobhaugen
On Feb 1, 2:23 pm, Brian Rosner <[EMAIL PROTECTED]> wrote: > Okay, to be honest, pretend you never read that. The bottom line is > that Django only needs to be in your PYTHONPATH. By default Python > already has its site-packages directory on the PYTHONPATH which is > where this stems from. You ca

Re: Newbie trying to install django-trunk from svn on Ubuntu 7.10

2008-02-01 Thread bobhaugen
On Feb 1, 3:37 pm, Brian Rosner <[EMAIL PROTECTED]> wrote: > export PATH=/path/to/django/bin:$PATH Thank you thank you! That is what I was missing. > Also, it appears you are relying on a relative path. I would highly > recommend you adjust the PYTHONPATH and how you setup the PATH to use > an

Re: Adding new field to model again

2008-02-07 Thread bobhaugen
Ok, I figured out the problems: 1. I turned on the verbose option to get some error messages: python manage.py loaddata mytest1.json --verbosity=2 2. I had my fixtures directory under my project, and not the app. When I moved it to be under the app, loaddata found it. 3. When I did dumpdata, i

Adding new field to model again

2008-02-07 Thread bobhaugen
I am trying to evolve a Django project in piecemeal-growth fashion. I was happy to learn that I cd easily add tables to an existing model using syncdb, but now I want to add a field. I read Django Fett's post about how to do it in this group, but I cheated a little (see below excerpt). He wrote

ordering by foreignkey again

2008-02-22 Thread bobhaugen
Django newbie wants admin list to be ordered by foreignkey names. I understand from googling that this is a known problem, and has apparently been fixed in the newforms admin branch. (Do I understand correctly?) Questions: 1. This is a new project. (On the other hand, I want to take it all the

Re: ordering by foreignkey again

2008-02-22 Thread bobhaugen
Tryingg to work around the problem: Previous Avail ordering statement: > ordering = ('week', 'orders_product.name', 'orders_producer.name',) Changed my models to have sortable foreign key values: class Producer(models.Model): name = models.CharField(max_length=32, primary_key=True)

Re: ordering by foreignkey again

2008-02-22 Thread bobhaugen
On Feb 22, 9:38 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > See the doc: > > http://www.djangoproject.com/documentation/model-api/#ordering > > where it states: "Note that, regardless of how many fields are in ordering, > the admin site uses only the first field." Ooops...how did I miss that?

HttpResponseRedirect not redirecting

2008-03-03 Thread bobhaugen
Yet another n00b problem...I'm sure I got another stupid mistake in here, but can't see it. Tried many variations. I cut this down to a simple example that reproduces the problem (the real thing is a lot more complex), and only included the relevant details here. Running django-trunk on Ubuntu 7

Re: HttpResponseRedirect not redirecting

2008-03-03 Thread bobhaugen
On Mar 3, 4:50 pm, Evert Rol <[EMAIL PROTECTED]> wrote: > Not 100% sure, but try adding a $ at the end of your regexes, to > indicate there's nothing after the url. That was the secret! Thanks alot. --~--~-~--~~~---~--~~ You received this message because you are s

Re: HttpResponseRedirect not redirecting

2008-03-03 Thread bobhaugen
On Mar 3, 5:00 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > Terminal says: > > [03/Mar/2008 16:16:27] "GET /addorder/results HTTP/1.1" 200 898 > > This means you're not hitting the redirect line. The HTTP status code > for a redirect is 302, whereas this is showing a 200 response, which i

Multiple multiple forms

2008-04-02 Thread bobhaugen
...or, multiple forms where each of the multiple parent forms has multiple child forms. What's happening here is that a group of farmers pool their goods and deliver them through a central point to a bunch of customers. Each customer order delivery item could be supplied by more than one farmer.

Re: Multiple multiple forms

2008-04-03 Thread bobhaugen
Apparently nobody has any suggestions about the original code. (If my presentation was too difficult to parse, wd I be better off putting it in dpaste? Or maybe it's too clueless in some way? Or too complicated?) I hesitate to respond to my own message, but I'm still stumped, and have more info.

Re: Multiple multiple forms

2008-04-03 Thread bobhaugen
Cancel request for help. I did it a better way - or at least simpler. Created the parent and child forms separately and attached the child forms to the parent outside the form itself. If anybody is interested, I'll post the code that worked. --~--~-~--~~~---~--~~

Re: Multiple multiple forms

2008-04-04 Thread bobhaugen
In response to a reply to author, here is the code that worked. DeliveryItemForm is the parent (representing an OrderItem), DeliveryForms are the children. The view contains multiple DeliveryItemForms, each with 3 DeliveryForm children. DeliveryForms without values are discarded after submissio

Eliminating DRY violations in urlpatterns

2008-04-07 Thread bobhaugen
My view that creates a new order ends with this statement: return HttpResponseRedirect('%s/%s/' % ('order', new_order.id)) The 'order' URL fragment is appended to the orderentry form URL like so: (first url) http://127.0.0.1:8000/orderentry/order/4/ You can get to the

Re: Eliminating DRY violations in urlpatterns

2008-04-07 Thread bobhaugen
Perfect. Thanks a lot, and sorry if I should have known that in the first place. On Apr 7, 11:32 am, Steve Potter <[EMAIL PROTECTED]> wrote: > On Apr 7, 11:08 am, bobhaugen <[EMAIL PROTECTED]> wrote: > > > My view that creates a new order ends with this statement

Re: How to use dojo toolkit in django?

2008-04-14 Thread bobhaugen
On Mon, 14 Apr 2008 00:13:35 -0700 (PDT) Duke <[EMAIL PROTECTED]> wrote: > Where to store the dojo toolkit in the project You can avoid all of the static files issues with dojo by serving it from AOL, like so: http://o.aolcdn.com/dojo/1.1.0/ dojo/dojo.xd.js"> I'm doing it that way, both in d

Q query question

2008-04-23 Thread bobhaugen
I'm trying to retrieve all Inventory Items whose onhand quantity is greater than zero, OR (whose date is within a specified range AND whose received quantity is zero). InventoryItems have three relevant fields for this query: onhand, inventory_date, and received. I currently have only 2 inventor

Re: Q query question

2008-04-23 Thread bobhaugen
Replying to myself with more clues: I see the problem: For this filter statement: items = InventoryItem.objects.filter( Q(inventory_date__range=(weekstart, thisdate), received__exact=0) | Q(onhand__gt=0)) ,,, the SQL generated looks like this: SELECT "orders_inventoryitem"."id","o

Re: Q query question

2008-04-23 Thread bobhaugen
On Apr 23, 9:00 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Complex Q-object combinations on trunk do have a few problems (bugs). It > turns out to be quite hard to get all the combinations working > correctly. This is one of the areas that development of the > queryset-refactor branch has

Re: Q query question

2008-04-23 Thread bobhaugen
> I'm experimenting (so far without success) with a bunch of ways to try > to turn a chain into a queryset. If anybody has any tips, I will be > grateful. Ok, got it, I think - using the idiom from this snippet: http://www.djangosnippets.org/snippets/26/ (My problem was using the chain to popul

Re: child edit causes duplication with model inheritance

2008-05-04 Thread bobhaugen
On May 4, 2:49 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > As a slight addendum to what James said, it will be implemented in the > newforms-admin branch, and will be available in trunk after the > merge(you can of course use the newforms-admin branch if you need > this). Does that mean

Re: child edit causes duplication with model inheritance

2008-05-05 Thread bobhaugen
On May 4, 3:37 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Sun, May 4, 2008 at 3:29 AM, bobhaugen <[EMAIL PROTECTED]> wrote: > > Does that mean newforms-admin includes qs-ref? That is, newforms- > > admin includes all of the most current svn trun

Getting field original value in overridden save

2008-05-13 Thread bobhaugen
If I override save() in a model, can I get the original value of a field to compare to the new value, to see if it has changed? I know it's easy to do in a form: form.initial['field_name'] But I want to do the same thing regardless of which form is used to change the model instance. In other wo

Re: How best to place multiple orders from same screen?

2008-05-18 Thread bobhaugen
There's also http://collingrady.wordpress.com/2008/02/18/editing-multiple-objects-in-django-with-newforms/ I used a combination of techniques from Malcolm and Collin (and from elsewhere). --~--~-~--~~~---~--~~ You received this message because you are subscribed to

confused about newform validation results

2008-05-22 Thread bobhaugen
I got a newform that fails validation but gives no errors. Have tried many variations, don't have any idea what is wrong. Here's the form: class PaymentTransactionForm(forms.Form): transaction_id = forms.CharField(widget=forms.HiddenInput) transaction_type=forms.CharField(widget=forms.Tex

Re: confused about newform validation results

2008-05-22 Thread bobhaugen
On May 22, 1:08 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > Of more interest than the html printed for the form would be the code you > use to create the form, and the template you use to display the form. > Without those it is hard to guess what is going wrong. Thanks for responding, Karen.

Re: confused about newform validation results

2008-05-22 Thread bobhaugen
On May 22, 1:40 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > This function may create either a bound or unbound form, depending on > whether data is given a value other than None. An unbound form returns > False for is_valid() yet has no errors. (form.is_bound tells you whether a > form is bo

SQL logic error or missing database

2008-06-17 Thread bobhaugen
I just got a new OperationalError message (in the subject line). Exception Type: OperationalError Exception Value:SQL logic error or missing database Exception Location: /home/bob/django-trunk/django/db/backends/ __init__.py in _commit, line 20 The code below has been running

Re: SQL logic error or missing database

2008-06-17 Thread bobhaugen
Replying to myself: maybe this is an instance of Ticket #7411? http://code.djangoproject.com/ticket/7411 "Saving db object while iterating over a queryset larger than ITER_CHUNK_SIZE breaks with sqlite" --~--~-~--~~~---~--~~ You received this message because you a

Re: SQL logic error or missing database

2008-06-17 Thread bobhaugen
Replying to myself again, closing the issue at least for me for now: On Jun 17, 10:02 am, bobhaugen <[EMAIL PROTECTED]> wrote: > Replying to myself: maybe this is an instance of Ticket > #7411?http://code.djangoproject.com/ticket/7411 > > "Saving db object while it

Re: psycopg2

2008-06-26 Thread bobhaugen
A suggestion for those of you who like psycopg2 and want a fancier site to show yr pointy-haired boss: make one. Either on your own, linked to the project site, or contribute to the project site (with the permission of the developer(s)). --~--~-~--~~~---~--~~ You r

Re: eclipse, your favourite plugins

2008-06-26 Thread bobhaugen
On Jun 25, 11:09 am, Thierry <[EMAIL PROTECTED]> wrote: > Subversive (don't use it actually, becomes to slow for large projects) I've used Subclipse on what I thought were reasonably large projects, with no particular problems. Don't know how big yours are. Biggest I got now is 2.5MB. Have had

Re: Django and social network

2012-02-24 Thread bobhaugen
Another angle on virtualenvs: if you install http://www.doughellmann.com/projects/virtualenvwrapper/ you will find them much much easier to use. You might even begin to like them, as many others have. Takes a little getting used to, though, like anything else that is different. -- You received

Re: Graphs for my Django Application

2012-06-08 Thread bobhaugen
> > http://d3js.org/ can handle both meanings of graphs: charts like bar charts, or visualizations of network structures. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://gro

Re: ANN: Maymyo Business Application Infrastructre Beta 0.3.3

2012-09-20 Thread bobhaugen
This is a very ambitious project. I wish you great success. I did some browsing of the doc and code and am very impressed by what you have accomplished so far. Your "glacial speed" comment is too modest. I am working on business applications in Django, but they are not enterprise-oriented. I

Re: ANN: Maymyo Business Application Infrastructre Beta 0.3.3

2012-09-20 Thread bobhaugen
Gaah! I just re-read my message about Maymyo and if it was from somebody else, I would think they were related to the project and shilling, or else trying to selling the OP something. I'm not, really. This is the first time I heard of the project. And I don't have anything to sell. But I am an

Re: ANN: eGenix mxODBC Connect - Python Database Interface 2.0.1

2012-09-26 Thread bobhaugen
I like to get open-source project announcements that are relevant to Django, but am not interested in commercial products. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg

Re: perfectionists... motto doesn't fit

2012-10-12 Thread bobhaugen
On Friday, October 12, 2012 7:56:52 AM UTC-5, Russell Keith-Magee wrote: > The reason I jumped on this was pre-emptive. We've had two threads on > Django-dev in a week, started by the same OP, which have quickly > degraded into *very* ugly territory. As Jacob has commented on the > other thread

Still getting IntegrityError in test fixture using dumpdata --natural

2011-10-11 Thread bobhaugen
Still getting "IntegrityError: columns app_label, model are not unique" when loading a test fixture created by dumpdata using the keyword --natural. I am probably missing something, but I understood the resolution to https://code.djangoproject.com/ticket/7052 to be to use the new -- natural keywor

Re: Still getting IntegrityError in test fixture using dumpdata --natural

2011-10-11 Thread bobhaugen
Replying to myself: temporary fix for dumpdata: --exclude contenttypes --exclude auth.permission The result now works as a test fixture. Not sure what to conclude: * the fix for issue #7052 does not work? * --natural does not fix the IntegrityErrors with contenttypes in test fixtures? * contentt

Re: Still getting IntegrityError in test fixture using dumpdata --natural

2011-10-12 Thread bobhaugen
On Oct 12, 9:12 am, Russell Keith-Magee wrote: > --natural isn't a magic wand Dang! I knew that "magic removal" was a bad idea... > Contenttypes are automatically created by syncdb. If your fixtures > *also* contain content types, you can potentially get IntegrityErrors > (because in the proces

Re: Django E-Commerce Framework

2011-12-07 Thread bobhaugen
I'm guessing that the OP wanted to develop a "standard" e-commerce site for a single company, in which case I agree with Stuart and Andre that the way to go is a well-tested e-commerce framework. I had to roll my own because I was doing something very different: B2B e-commerce with an efficient or

Re: Is DJango bad for conveying business-logic?

2011-12-14 Thread bobhaugen
I'm developing quite complex business systems in Django, and if you google for "django erp" you'll find a bunch of those. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsu

Re: Open-source or closed-source for SaaS?

2012-01-16 Thread bobhaugen
You might also want to consider: (1) Will anybody actually want to compete with you using your code or a fork of same? People often assume ravenous competitors when in real life, nobody is that interested, for whatever reasons. Or at least they will not become interested until you are way out in

  1   2   >