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 request.user.is_authenticated(
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 LDAPUser.Do
hentication for Django?
>
> http://packages.python.org/django-auth-ldap/
>
> Yours,
> Russ Magee %-)
>
> On Fri, Nov 16, 2012 at 12:23 PM, Anil Jangity wrote:
>> I am trying to build a custom User model with a custom authentication
>> backend (ldap).
>
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 wrote:
> I am trying to build a custom User model with a custom authentication backend
> (ldap).
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
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 Jangity wro
onathan Baker
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 wrote:
> I tried that too earlier.
>
> I added these to the SignupForm class:
>
>
t; clean_username).
>
>
> On Sun, Sep 8, 2013 at 11:41 AM, Anil Jangity wrote:
> class SignupForm(forms.ModelForm):
> class Meta:
> model = User
> fields = ["username", "mail", "password"]
>
> def
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 UserP
seems like I need to go do User.objects.create_superuser().
Thanks!
On Sep 21, 2014, at 6:55 PM, Markus Holtermann wrote:
> Hey Anil,
>
> On Sun, Sep 21, 2014 at 05:29:18PM -0700, Anil Jangity wrote:
>> $ python manage.py syncdb
>
> Just as a side note: "syncdb" is
for 'main':
0001_initial.py:
- Create model Currencies
- Create model Locations
- Create model Posts
- Create model UserProfile
On Sep 22, 2014, at 9:16 AM, Markus Holtermann wrote:
> On Mon, Sep 22, 2014 at 08:41:36AM -0700, Anil Jangity wrote:
>> If I don
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 tha
12 matches
Mail list logo