How to customize django-rosetta admn page - django

Since when I open django-rosetta on the admin page by setting ROSETTA_SHOW_AT_ADMIN_PANEL = True in the settings file. I am able to open it on the admin page, but when it opens it takes full-page, and I am unable to go back to the homepage(as there is no button) except when I press the back button of the browser. Is there any solution for this, or do I have to override the rosetta home page?

eventually i have to override html page for this, no other option :(

Related

Django Admin StackedInline

I have a stackedinline Django admin. This is used to add multiple products for a shop. However, when I click on 'Save and add another' it sometimes shows 'Entity too large', even when the files are below the allowed size, or sometimes it shows 'DATA_UPLOAD_MAX_NUMBER_FIELDS' error. My question is, does Django stackedinline admin save each and every object each time we click on save? If no, then what could be the reason for this error?
StackedInline is saved only when you click on main save.
It does save all through building the formsets and it does not use ajax requests for each of the rows -> source
Also you can easily check this by inspecting and opening network tab

How to add button in django admin site?

I do want to know how to add button in django admin site.I tried many stuff but I couldn't able to do the stuff.I want to add a reset button for an attribute in the model where it should regenerate the value for the attribute.
You're going to have to edit the admin files to add this button, it may be easier to inject a piece of JavaScript code and a button into the admin template to reset the form fields.

Change Opencart 2 success page

Where can I change the URL for my OpenCart 2 success page?
The way that my site is set up, open cart is a module of the larger site.
On completion of an order I need the user to be returned to a page within the main site rather than the opencart.
Alternately, changing the URL for the "Continue" button would work, but from an analytics perspective , that would be inferior.
Go to Catalog/view/theme/yourtheme/common/header.tpl
And add this code to it
$current_url = $_SERVER['REQUEST_URI'];
if (strpos($current_url,"checkout/success")) {
header("Location: Yourdomain");
}
And you change the "Yourdomain" to the page that you want it to be redirected to just copy and paste your domain.
If you are using some custom URL's that a module generates them than you need to change the "checkout/success" to what ever URL your success page is at.
Just add this to controller/checkout/success.php
$this->response->redirect('http://www.yoursite.com');
Just make sure that redirect code is added after cart and session clearing. In my version you, can add it to line 47.

opencart show a blankpage when a customer login

i,m using Opencart 1.5.6.1 for my store
everything is good, but when a customer register and then click the submit button OR when a customer want to login to own profile the page show blank
when the page is blank my URL is : www.mysite.com/index.php?route=account/login
Note: when blank page is showed, i reload the page, after reload everything works correctly and the next page shows!!
i enable error reporting in index.php and config files but doesn't show me any error!
i fixed my problem
the problem is the my theme persian language
first reuploaded pesian language and doesn't fix my problem
then i edit only account>login language file and everything works correctly
the problem is related only to language files

Cannot login to Django admin

My admin login in development stopped working suddenly. It used to be working fine for almost a year. I am able to see the login page and type the superuser credentials. When I click on the login button, nothing happens. The admin log also does not show anything. I have tried changing the port number and ran the server.
I even created a new project and new database and tried running the simple admin page, no luck. I tried running the admin for other projects in development, still nothing happens on clicking the login button.
My settings does have:
AUTHENTICATION_BACKENDS = (
('django.contrib.auth.backends.ModelBackend'),
)
Another thing that I noticed was I do not get a new row in the django_session table even after I login with the correct superuser credentials
I suggest you to clear your localhost cookies and try with another browser.
I've issues with chrome v28 that I don't have in firefox v22.
Let me know if it helps.
Regards.
-- EDIT --
Try to put this line in your settings.py. It solved for me.
SESSION_COOKIE_DOMAIN = None
Opening the application in chrome's incognito mode resolved this issue for me.