-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Add Another <Model>' links not being generated, showing only 'javascript://' links #163
Comments
The 'Add Another' button isn't a link—it doesn't take you to a different page—it triggers a registered click handler in javascript that adds a new inline. The fact that the link says |
Hi Frankie,
Ah, the links aren't responding to clicks though. Save / edit works
just fine, I just can't add any new records. Any thoughts as to the cause?
(Normal django admin works fine, it's just the nested ones that don't
respond. Chrome browser)
Cheers,
Euan.
…On Sat, 29 Feb 2020, 08:08 Frankie Dintino, ***@***.***> wrote:
The 'Add Another' button isn't a link—it doesn't take you to a different
page—it triggers a registered click handler in javascript that adds a new
inline. The fact that the link says javascript:// in the browser
shouldn't cause any issues with whatever admin urls you're using.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#163?email_source=notifications&email_token=ANAKPNVAXTZD4VXAU7QJXALRFGRPPA5CNFSM4KW4OLMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENKTFGA#issuecomment-592786072>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANAKPNXBOZTJ343XVXCQQTDRFGRPPANCNFSM4KW4OLMA>
.
|
Are there any errors in the Web Developer console? |
I'm seeing the same issue. No there are no errors in the console. Running Django 2.1. This is the javascript showing up in the head tag. Actually looking at this closer it doesn't appear to be working at all. It is just loading the first inline and not the nested inline. Inlines
Models
Admin
I have run It does not appear as if any of the js or css files are being loaded at all. |
@euanmacinnes Are you by chance storing files to S3 and / or using the ManifestFilesMixin or S3Boto3Storage? |
@selected-pixel-jameson I see the issue. You need your admin class to extend |
The problem in the end was the Static files, as they didn't get installed into the published location that went through the reverse proxy. A quick file copy over later got it working again. |
Hi,
I'm using the django admin behind a reverse proxy, which uses the URL sub-folder path /pipeline/ to go to the individual Django apps and admin (which is in /pipeline/admin'),
so I've set up the rules as follows:
urlpatterns = [
path('pipeline/rules/', include('rules.urls')),
path('pipeline/materials/', include('materials.urls')),
path('pipeline/admin/', admin.site.urls),
path('pipeline/nested_admin/', include('nested_admin.urls')),
]
EDIT:
I also tried this with:
urlpatterns = [
path('pipeline/rules/', include('rules.urls')),
path('pipeline/materials/', include('materials.urls')),
path('pipeline/admin/', admin.site.urls),
url(r'^nested_admin/', include('nested_admin.urls')),
]
To no avail.
The nested inlines all appear in Django admin, and Saving the data all work fine, but the links to 'Add Another ' all just show 'javascript://' in the URL in the browser, rather than the expected URLs.
This has to go through a subfolder for many security reasons and multi-homed applications etc.. so I've no option to change this to a port or a different main address.
Any help given is greatly appreciated.
The text was updated successfully, but these errors were encountered: