Your if block in views.py is not well-formed. I haven't tested this but I'd
write it more like this:
# try username
user = auth.authenticate(username=username, password=password)
if user is not None:
auth.login(request, user)
return HttpResponseRedirect('/')
# fall
s automagically, so your call would look like
> something like:
>
> Tenant.sequence.get_value(tenant, sequence)
>
>
> On Tue, 13 Jan 2015 06:37:21 -0800 (PST)
> Matt Cooper > wrote:
>
> > Thanks Jani, good to hear someone has gone down this road before.
> >
ence_value=tenant.sequence_value)
> widget.save()
>
> That should do the trick. Another option could be using table triggers to
> automate
> that within a database table trigger(s).
>
> On Mon, 12 Jan 2015 21:26:54 -0800 (PST)
> Matt Cooper > wrote:
>
>
I'm building a multi-tenant application with a data model that simplifies
to:
class Tenant(models.Model):
name = models.CharField(max_length=50)
class Widget(models.Model):
owner = models.ForeignKey(Tenant)
sequence_id =
I want Widget.sequence_id to work like an AutoField (that is
Hi all
I'm looking at using Xeround as a DB backend. I've already come up against
that as it detects a version > 5.0.3 it tries to use savepoints which are
not supported.
http://stackoverflow.com/questions/10193449/how-to-use-django-1-4-with-xeround
Happy to carry on and try all the features b
5 matches
Mail list logo