Custom Query (27206 matches)


Show under each result:

Results (28 - 30 of 27206)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Ticket Resolution Summary Owner Reporter
#29312 invalid How to use form data to query the database, then use the results in a calculation. nobody Colton Proctor

I am using a model that contains data about real estate listings in order to do comparisons. I want to use information such as location, type of building, and acreage of land to acquire similar listings from my database. I then want to use these results in order to give them an estimate of their properties value. I'm not sure how to do this as most of the tutorials are about allowing people to add to the database, rather than do operations on the results of the query.

#29311 duplicate Ease customizing URLField validation nobody Arthur Pemberton

Example URL: "myscheme://server/group-name/item-name"

Problem 1: models.URLField needs to be subclassed to change allowed schemes Problem 2: forms.URLField needs to be subclassed to change allowed schemes Problem 3: validators.URLValidator needs to be subclassed to change regex to allow netloc that is a hostname without a domain ad TLD

At the very least, making these changes should be documented better. The message accompanying ValidationError gives no hint as to the source issue with a URL.

#29310 duplicate ManyRelatedManager.add() does not accept `bulk` kwarg as described in documentation nobody Brenton Partridge
Description suggests that RelatedManager.add(*objs, bulk=True) accepts the bulk kwarg regardless of the type of relationship. However, for many-to-many relationships, does not accept any kwargs. (Master branch as of the submission of this ticket.)

This leads to errors like add() got an unexpected keyword argument ‘bulk’.

This could be fixed in documentation, since for many-to-many the inserts are going to be bulk regardless. But then RelatedManager wouldn't have a consistent interface across all types of relations. Alternately, we could just add the kwarg to the code and ignore it, and document more clearly that "all many-to-many adds are inserted in bulk, regardless of the choice of bulk kwarg." But we shouldn't just error out on a developer who attempts to follow the documentation.

Any thoughts?

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Note: See TracQuery for help on using queries.
Back to Top