here is my model-
from django.db import models
import useraccounts
from librehatti.catalog.models import *
from django.contrib.auth.models import User
class QuotedOrder(models.Model):
quote_buyer_id = models.ForeignKey(User)
quote_is_debit = models.BooleanField()
I would recommend Intermediate Models as a good solution for these
type of weird situations
https://docs.djangoproject.com/en/dev/topics/db/models/#extra-fields-on-many-to-many-relationships
Cheers
L.
On 2 July 2014 12:20, Jorge Andrés Vergara Ebratt wrote:
> Hello
Hey Jorge,
I think you should extend the Abstract User instead of doing it the old
way, which is creating that OneToOne relationship with a custom model. So,
you'll end up with this:
class IndependentAgent(AbstractBaseUser, PermissionsMixin):
tipo_licencia = models.CharField(max_lenght=140)
Hello everyone,
I'm trying to create a system that has 3 different user types:
Independent Agent, that basically is what it sounds like, and Django's User
Model works fine for this one.
But the catch comes from the other 2, because it also needs to support
agencies and agencies have
Woah there.
Ok, well it's hard to help without more info, but here are some tips:
- please don't ask a community project to "reply soon". We will reply
when and if we can. Obviously ideally we would reply, and speedily,
but we get what we got.
- How to save the ForeignKey on an item? Well
I would like to set a float or decimal format like those set in
django.conf.locale.en.formats, for example a default format that
floatformat template filter could use to format my numbers by default
without decimal places. Something like settings.USE_THOUSAND_SEPARATOR that
django use by
On Tuesday, July 1, 2014 5:58:59 PM UTC+5:30, Lachlan Musicman wrote:
>
> Hi Aashita,
>
> There's a couple of things happening here. I'm no expert and this is a
> rushed end of evening email.
>
> For getting the obj.save() to work, here:
>
> cd = form.cleaned_data
>
On Tuesday, July 1, 2014 5:58:59 PM UTC+5:30, Lachlan Musicman wrote:
>
> Hi Aashita,
>
> There's a couple of things happening here. I'm no expert and this is a
> rushed end of evening email.
>
> For getting the obj.save() to work, here:
>
> cd = form.cleaned_data
>
PurchaseOrder has no use here, and yes item is foreign key to Product class
which consists of item's name i.e item__name. Actually my QuotedItem class
in models consist of 5 fields, and i want to save only two. Would this
method be work? And also can we save method item__name which is foreign
Thank you everyone. I solved the problem. It was a relative vs absolute url
issue. There was a line in the static/js/applications.js file that had to
be changed:
RELATIVE_URL = '/myproject'; //for development leave this blank. For
production it should be '/myproject'
This was hard to debug
you should only store the user password once, if you are trying to catch it
just to register in another application then you now have two problems
you should set django use the other system as authentication backend, new
users should just register there and change their passwords there, on the
On Tue, Jul 1, 2014 at 1:27 PM, guillaume wrote:
> Hi Tom,
>
> Yes indeed, I know that page, but there is no way I can make it the same
> than the other one which relies on SHA256, some system key I don't know and
> a random salt. So there is no way for me to find the
Hi Phil,
Actually not at the hasher level, because I need to know the user's details
as well, but it's a good hint. I should try to subclass to User Model
set_password method.
Thanks !
Guillaume
Le mardi 1 juillet 2014 15:03:58 UTC+2, Philip a écrit :
>
> If the username/whatever is
If the username/whatever is available within the hasher you could create
a subclass of the hasher you're using in Django and intercept the
plain-text password there, call your API and then call the superclass?
Phil
On 01/07/2014 13:27, guillaume wrote:
Hi Tom,
Yes indeed, I know that page,
Hi Tom,
Yes indeed, I know that page, but there is no way I can make it the same
than the other one which relies on SHA256, some system key I don't know and
a random salt. So there is no way for me to find the correct encryption for
the remote database, that's why I want to use it's API
On Tue, Jul 1, 2014 at 1:12 PM, guillaume wrote:
>
> Hi,
> thanks for your reply. Actually I don't want to store the uncrypted
> password, just submit it to another app registration system, which will hash
> it then. The two hashing systems are too different and
Hi,
thanks for your reply. Actually I don't want to store the uncrypted
password, just submit it to another app registration system, which will
hash it then. The two hashing systems are too different and complicated for
me to use the django encrypted password in the other application database.
Sorry... i meant Best Regards (without ? hahahaha... sorry)
--
Rafael E. Ferrero
2014-07-01 8:04 GMT-03:00 Rafael E. Ferrero :
> I see this too dangerous... it is not a good idea save uncrypted
> password... too many hacker attack result on public user-password list.
I see this too dangerous... it is not a good idea save uncrypted
password... too many hacker attack result on public user-password list.
Why not save encrypted password on the other application too?
Best Regards?
--
Rafael E. Ferrero
2014-07-01 6:41 GMT-03:00 guillaume
Hi list,
When registering a new user, or a password change, I need to register that
user, or his new password, in another application through an internal API.
I'm trying to catch the password from the different form they can be found
in, but without success. Even the signal pre_save is
20 matches
Mail list logo