microsoft / autogen

A programming framework for agentic AI 🤖
https://microsoft.github.io/autogen/
Creative Commons Attribution 4.0 International
32.7k stars 4.76k forks source link

AttributeError at /register/ 'str' object has no attribute 'POST' #2645

Open Nissanx opened 6 months ago

Nissanx commented 6 months ago

Describe the bug

view.py When I fill the code in " view.py" for registration application the description below: def register(request): if request.method.POST =='POST': username= request.POST.get('username') email= request.POST.get('email') password = request.POST.get('password')

    if len(password)<3:
        messages.error(request,"Password too short")
        return redirect('register')

    get_all_users_by_username= User.objects.filter(username=username)
    if get_all_users_by_username:
        messages.error(request,'Username is already taken ')
        return redirect('register')

    new_user = User.objects.create_user(usernam=username,email=email,password=password)
    new_user.save()

return render(request,'cartes/registe.html',{})

def loginpage(request): return render(request,'cates/login.html',{})

I've got the message: AttributeError at /register/ 'str' object has no attribute 'POST'

I tried all the cases possible, but no real solution, even though I change my models many times depending on some who had some suggestions in that way.

Steps to reproduce

No response

Model Used

No response

Expected Behavior

No response

Screenshots and logs

No response

Additional Information

No response

Hk669 commented 5 months ago

@Nissanx this issue doesnt seem related to AutoGen, if it is, can you please add more context and logs to the above issue. Thanks