Re: updating site domain with data migration

2014-09-23 Thread Anil Jangity
22, 2014, at 9:16 AM, Markus Holtermann <i...@markusholtermann.eu> wrote: > On Mon, Sep 22, 2014 at 08:41:36AM -0700, Anil Jangity wrote: >> If I don't use syncdb, I should also create the super user account >> using data migration? If so, it seems like I need to go do >> Us

Re: updating site domain with data migration

2014-09-22 Thread Anil Jangity
like I need to go do User.objects.create_superuser(). Thanks! On Sep 21, 2014, at 6:55 PM, Markus Holtermann <i...@markusholtermann.eu> wrote: > Hey Anil, > > On Sun, Sep 21, 2014 at 05:29:18PM -0700, Anil Jangity wrote: >> $ python manage.py syncdb > > Just as a side n

updating site domain with data migration

2014-09-21 Thread Anil Jangity
I wanted to update the site domain/name using data migrations in Django 1.7: $ python manage.py makemigrations main Migrations for 'main': 0001_currencies_locations_posts_userprofile.py: - Create model Currencies - Create model Locations - Create model Posts - Create model

multi org and user site

2014-05-13 Thread Anil Jangity
I would like to create a web site that will have multiple organizations with it's own set of user accounts. Something like a "reseller" account. e.g. Org1 user1, user2, user3 Org2 user1, userA, userB Each Org would have it's own billing, user info. Does anyone have any sample demo code

Re: custom signup form

2013-09-08 Thread Anil Jangity
of some of its features (like > clean_username). > > > On Sun, Sep 8, 2013 at 11:41 AM, Anil Jangity <an...@me.com> wrote: > class SignupForm(forms.ModelForm): > class Meta: > model = User > fields = ["username", "mail", "

Re: custom signup form

2013-09-08 Thread Anil Jangity
nathan Baker <jonathandavidba...@gmail.com> wrote: > Can you post your entire SignupForm class? I think a bit more context will > help me diagnose. > > > On Sun, Sep 8, 2013 at 11:27 AM, Anil Jangity <an...@me.com> wrote: > I tried that too earli

Re: custom signup form

2013-09-08 Thread Anil Jangity
You need to run the password through the 'set_password' method of the User > class to hash it. See: > https://docs.djangoproject.com/en/1.0/topics/auth/#django.contrib.auth.models.User.set_password > > Hope this helps, > JDB > > > On Sun, Sep 8, 2013 at 11:02 AM, Anil Ja

custom signup form

2013-09-08 Thread Anil Jangity
New to Django. When I submit a signup form with this, the password is human readable in the database. It seems like it should be hashed? Looking at some Google pages, it seems I need to subclass UserCreationForm. I tried that instead of forms.ModelForm and now it complains my form doesn't have

Re: too much customization - ldap user model

2012-11-17 Thread Anil Jangity
So, the bottom line is, what do I need to do after I do a authenticate() to have the login persist in the session and in the other views? Thanks On Nov 15, 2012, at 8:23 PM, Anil Jangity <an...@me.com> wrote: > I am trying to build a custom User model with a custom authenticatio

Re: too much customization - ldap user model

2012-11-15 Thread Anil Jangity
t implemented LDAP > authentication for Django? > > http://packages.python.org/django-auth-ldap/ > > Yours, > Russ Magee %-) > > On Fri, Nov 16, 2012 at 12:23 PM, Anil Jangity <an...@me.com> wrote: >> I am trying to build a custom User model with a custom authen

too much customization - ldap user model

2012-11-15 Thread Anil Jangity
I am trying to build a custom User model with a custom authentication backend (ldap). Here is what I've done so far: Custom LDAP authentication backend: class LDAPBackend: def get_user(self, user_id): try: return LDAPUser.objects.get(pk=user_id) except

custom User model and login()

2012-11-11 Thread Anil Jangity
I am trying to build a User model with a dedicated LDAP backend. I have no SQL database. def login(request): ... login(request, user) request.user.is_authenticated() ---> return True return HttpResponseRedirect("/manage") def manage(request): print