I have a problem with Django admin. I can login and so on but I have way to create company profiles to Django and display them on website.
When I want to edit some profile in the admin page from my browser, it shows:
net::ERR_INCOMPLETE_CHUNKED_ENCODING.
Only browser that opens the page is Microsoft Edge.
I am not a developer, so I will try my best to make it as clear as possible.
Related
I'm quite new to django.
I've made a website that makes use of user auth for login, logout and registration.
Whenever I log into the admin panel, it also gets reflected in the actual website. The admin account gets logged into the website on its own.
I know this is the default behaviour of the django auth system, but I want to separate the auth session of admin panel and the actual website.
How can I do so?
The screenshots below show the thing which I'm talking about.
👇 Here I've logged into the Admin panel.
👇 The Admin account got logged into the website on its own by using the admin session..
I just want that both admin panel and website should have separate auth sessions and shouldn't be linked to each other.
The website is hosted online here
Thanks in advance!
You could write middleware for this, to explicitly logout authenticated users in non-admin pages as suggested in this answer:
https://stackoverflow.com/a/57357586/2135738
Is there a way to redirect to other page and automatically log into that page?
So it's like I make django webpage with login and create link to facebook. When user clicks to facebook link, it should automatically login to his facebook page. Of course, I will have his facebook username and password on db I used to create the website.
Is this possible? Basically, I am trying to create interface page on django with link to several different webpage and make user access to his page by simply logon to this interface page alone.
I suggest that you have a look at the Django-allauth, which is an Integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (social) account authentication
It does most of the things you want, you can go through the documentation
https://django-allauth.readthedocs.io/en/latest/index.html
I have added my django app to my iphone home screen with the safari bookmark. As it has been described here, when the app is opened trough this bookmark, the user is every time logged out.
I wonder how can I keep my user logged in to my django app.
Is there a way to manage this with Django?
I am developing an application using Django 1.4. When I log into admin site in another tab in the browser, the application interface in which I am already logged in automatically logs out. Please help me in solving this issue. The browser I am using is Firefox. Thanks in advance.
Admin is also a user in django. So, you can't have more than one user logged in at the same time in the same browser, can you? Try the same scenario on facebook. This is what it is. You re fine, there's no problem.
On the side note, if you are just getting started with your project use Django 1.5.
Well you cannot log into the same website with different login ids simultaneously until and unless you dont use some plugins for this feature or you are opening different ids in the incognito window.
Since admin is a superuser(still a user), hence you cannot open a multiple django accounts in the same browser. One account will be logged out in order to open the other one. This is no issue. Happy coding.
The Django admin site is just another page of your Django main website. Say if you have foo.com, then foo.com/admin/ shows you the admin portal.
And we already know that two users cannot be simultaneously logged in to the same website from the same browser.
So, you can test on your foo.com site, being an admin user itself. Experience on the Django website for any user will be same, it doesn't change with user being a staff member or superuser. Only admin site has different permissions based on these factors.
In this case, you'll be able to use both the main site, as well as admin portal.
But if you really want to use different user accounts for admin site and main site, then you should either use different browsers or Private window in Firefox.
I am using Django for a small one-person tool. I would like to add/adapt my models via the admin interface, but I don't want to login everytime.
How can I switch off the required authentication at /admin/?
I highly recommend against you doing down that road:
Is it possible? No; the admin relies on the django auth app being with your settings' INSTALLED_APPS; of course this is because the admin relies on permissions and permissions rely on the admin user being authenticated.
The admin is built to edit not simply "your" models but also the models enabling the admin itself, mainly the models exposed by the auth app itself.
What to do ... 2 options:
Quickly develop a simple solution requiring no authentication using Django's ModelForms - docs and another good link here.
If it's a "one-person tool" then simply keep your authentication details saved in the browser you use; i.e. let the browser remember your username and password, so you just have to hit the "login" button rather than re-enter your data.