try-django-19
                                
                                 try-django-19 copied to clipboard
                                
                                    try-django-19 copied to clipboard
                            
                            
                            
                        attributeError when there is no post in database. i deployed to heroku there was no database there. on heroku it giving me only server error 500
AttributeError at /posts/create/ 'NoneType' object has no attribute 'id' Request Method: POST Request URL: http://127.0.0.1/posts/create/ Django Version: 1.11.3 Exception Type: AttributeError Exception Value: 'NoneType' object has no attribute 'id' Exception Location: C:\Users\Ahmed Kakar\Desktop\sublime\django\referenceCodes\src\posts\models.py in upload_location, line 37 Python Executable: C:\Users\AHMEDK~1\Desktop\sublime\django\REFERE~1\Scripts\python.exe Python Version: 3.6.1 Python Path: ['C:\Users\Ahmed Kakar\Desktop\sublime\django\referenceCodes\src', 'C:\Users\AHMEDK~1\Desktop\sublime\django\REFERE~1\Scripts\python36.zip', 'C:\Users\AHMEDK~1\Desktop\sublime\django\REFERE~1\DLLs', 'C:\Users\AHMEDK~1\Desktop\sublime\django\REFERE~1\lib', 'C:\Users\AHMEDK~1\Desktop\sublime\django\REFERE~1\Scripts', 'c:\program files\python36\Lib', 'c:\program files\python36\DLLs', 'C:\Users\AHMEDK~1\Desktop\sublime\django\REFERE~1', 'C:\Users\AHMEDK~1\Desktop\sublime\django\REFERE~1\lib\site-packages'] Server time: Tue, 25 Jul 2017 22:33:00 +0000