Click here to Skip to main content
15,879,326 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm trying to return form if request is get request

What I have tried:

Python
def add_movie(request, add_type):
    if request.method == "GET":
        if add_type == 'movie':
            form = MovieForm(request.GET)
            return form


when i call this function i get this error
'MovieForm' object has no attribute 'get'
Posted
Comments
Richard MacCutchan 11-Jun-20 4:48am    
Check the documentation for the MovieForm class.
Ahmed7fathi 11-Jun-20 17:05pm    
which documentation i created this form
Richard MacCutchan 12-Jun-20 3:20am    
Well then you know whether it has a 'get' attribute or not.
Ahmed7fathi 14-Jun-20 20:20pm    
thank u i was doing some dump things

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900