Closed Chitrank-Dixit closed 11 years ago
Using Bootstrap documentation to create Modal for "sign up" and "sign in" feature Bootstrap Modal: http://getbootstrap.com/javascript/#modals (done)
resolved the problem of black transparent screen above the modal and the whole site by making modal outside the navbar tag (just after body tag) in trackleech/blog/templates/django_component_include/header.html
see this stackoverflow question by me http://stackoverflow.com/questions/18166340/django-application-does-not-properly-load-twitter-bootstrap-3-modal?noredirect=1#comment26613638_18166340
but now our dropdown menu is not working.
Sign up and Sign in feature needed for the site uses the Django built in model form Users and we need just to add (at the very first time match if someone else is active with the same username) and match the user (user already existing) if so then login other wise not.
We need to keep into consideration urls.py , models.py, views.py and for creating user forms we need to make a new file named forms.py that would define the forms and may later be imported in views.py for further use if any request through form been made by the user.
refer these stackoverflow links for more better explaination and more links
http://stackoverflow.com/questions/10388033/csrf-verification-failed-request-aborted http://stackoverflow.com/questions/11287485/taking-user-input-to-create-users-in-django http://stackoverflow.com/questions/2601487/django-registration-django-profile-using-your-own-custom-form http://solutoire.com/2009/02/26/django-series-1-a-custom-login-page/ http://lightbird.net/dbe/forum3.html
Errors and their respective solution while making a simple signup in Django
csrf token defined but RequestContext not defined http://stackoverflow.com/questions/8408545/django-csrf-verification-failed-even-after-adding-csrf-token http://stackoverflow.com/questions/10388033/csrf-verification-failed-request-aborted
User object has not backend http://stackoverflow.com/questions/6034763/django-attributeerror-user-object-has-no-attribute-backend-but-it-does
The view trackleech.blog.views.signup didn't return an HttpResponse object. http://stackoverflow.com/questions/16746232/the-view-views-create-didnt-return-an-httpresponse-object
Problem with loggin in to the Django admin panel has been resolved if http://localhost:8000/admin/
settings.py needed to be changed
The code segment before change AUTHENTICATION_BACKENDS = ( ('django.contrib.auth.backends.RemoteUserBackend'), )
The code segment after change AUTHENTICATION_BACKENDS = ( ('django.contrib.auth.backends.ModelBackend'), )
Please refer this link: http://stackoverflow.com/questions/8844536/admin-page-on-django-is-broken
Problem with session has been resolved, I have added in settings.py
TEMPLATE_CONTEXT_PROCESSORS = ( 'django.contrib.auth.context_processors.auth', 'django.core.context_processors.request', )
also corrected some lines in the urls.py
url(r'^signin/', 'trackleech.blog.views.signin',name='signin'), url(r'^signout/', 'trackleech.blog.views.signout',name = 'signout')
also implemented signout method in views.py ( http://stackoverflow.com/questions/11241080/django-contrib-auth-logout-in-django ) def signout(request): logout(request) return redirect('home')
Solved the signup and signin authentication bugs refered Mike Hibbert Video on Python Django Tutorials on YouTube
http://www.youtube.com/playlist?list=PLxxA5z-8B2xk4szCgFmgonNcCboyNneMD
Our website would have the profiles for the users those would log into it. So we need to make simple login authentication for that purpose.
Find resources on the web and there is also Django based authentication over third party APIs to login with FB , G+ , Yahoo and Twitter. see this: https://github.com/Chitrank/Django-Socialauth
Cheers