It's ok by me to return something generic or even raise an exception if I'm
calling directly using RelatedStuff.objects.my_method().
Is it possible for my_method to access MainStuff instance or at least find
out which way it is accessed?
Imagine I got a instance of MainStuff like this...
main =
I have some issues with getting hold of the instance of a Model to which a
RelatedManager got contributed to.
Is that at all possible and if so, how?
>From *my_method* below I can get hold of the model *RelatedStuff* by calling
self.model but that really doesn't get me there.
class MainStuff(mo
I don't know if this will make you happy but when I researched this some
months ago I found no good solution.
During my search I came upon the following pages that sort of relate to
this...
- http://github.com/dcramer/django-idmapper
-
http://appengine-cookbook.appspot.com/recipe/hi
On Sep 6, 8:40 pm, raj wrote:
> Hi all,
> Why can't we use the aggregate function 'max' from within save()? I
> found it working to find the lot_max from among the objects filtered
> by prod_date and then if lot_max is None, lot_no must be 0, else it's
> just lot_max + 1. I don't know if I've mi
://ericholscher.com/blog/2010/jun/23/large-problems-django-mostly-solved-delayed-execut/
/kmpm
On Sep 6, 7:20 pm, Heath wrote:
> Thanks! yes,
>
> os.system() will launch the process and return control, but then I'd
> have to write a utility to get the PID and other data about the
>
On Sep 6, 6:52 pm, Preston Holmes wrote:
>
> what about a simple function that does something as low tech as
> checking a lock file. If you had multiple front end servers, this
> could be a running process on a server using semaphore lock.
>
> -Preston
Sort of thought about that as well.
Meanw
For anyone listening in...
the ticket http://code.djangoproject.com/ticket/2705 might also be
worth looking at
On Sep 6, 11:39 am, kmpm wrote:
> > UUIDs are your best bet. Even if you generated 100 billion UUIDs a
> > second for the next 100 years, the chance of one collision would
>
> UUIDs are your best bet. Even if you generated 100 billion UUIDs a
> second for the next 100 years, the chance of one collision would only
> be 50% [1].
>
> class ProducedEntity(models.Model):
>
> uuid = models.CharField(max_length=36, unique=True)
>
> def _hook_add_uuid(instance,
On Sep 6, 9:02 am, Mike Dewhirst wrote:
> On 6/09/2010 4:19pm, kmpm wrote:
>
> > I have a project running in a manufacturing industry that is actually
> > built upon django.
> > In this I need to generate a unique serial, batch or lot number
> > (depending on what y
I have a project running in a manufacturing industry that is actually
built upon django.
In this I need to generate a unique serial, batch or lot number
(depending on what you would like to call it) that is a running number
from 0 to whathever for each and every day.
There is a high risk of concurr
@klemens you are most definitely not alone.
I made a router that would allow me to have one database per app and I
get exactly the same type of error on both postgres and sqlite. Doing
syncdb on the default db work as it should but when I in this case do
a ./manage.py syncdb --database=ads I get th
Hi,
I will try to give my shot at this.
I would create one 'Item' model which have common fields like
description, product category etc.
For quantities I would create a system of units and unit conversion
tables for each item using one model called 'Unit' and one called
'ItemUnit' or similar.
Unit
12 matches
Mail list logo