Skip to content
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

fix: creating change requests in private cloud UI #2953

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions api/app/templates/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Ignore Webpack Templates Folder
# Front-end production template builds are copied here by webpack. Files in this folder should not be committed to git.
# Front-end production template builds are copied here by webpack. HTML files in this folder should not be committed to git.

webpack
webpack/**.html
125 changes: 0 additions & 125 deletions api/app/templates/index.html

This file was deleted.

Empty file.
5 changes: 1 addition & 4 deletions api/app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ def index(request):
return HttpResponse(status=405, content_type="application/json")

template = loader.get_template("webpack/index.html")
context = {
"linkedin_api_key": settings.LINKEDIN_API_KEY,
}
return HttpResponse(template.render(context, request))
return HttpResponse(template.render(request=request))


def project_overrides(request):
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"typecheck": "tsc",
"dev": "cross-env npm run env && npx nodemon --watch ./api --ignore server/config/config.json --watch webpack --exec node ./api",
"bundle": "npx webpack --config ./webpack/webpack.config.prod.js",
"bundledjango": "mkdir -p ../api/app/templates/webpack/ && npx webpack --config ./webpack/webpack.config.django.prod.js && rm -f ../api/app/templates/webpack/index.html && rm -f ../api/static/static/project-overrides.js && cp ../api/static/index.html ../api/app/templates/webpack/index.html"
"bundledjango": "npx webpack --config ./webpack/webpack.config.django.prod.js"
},
"engines": {
"node": "16.x",
Expand Down
4 changes: 2 additions & 2 deletions frontend/webpack/webpack.config.django.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ module.exports = {
),

]).concat(require('./pages').map(page => new HtmlWebpackPlugin({
filename: `${page}.html`, // output template
template: `../api/app/templates/${page}.html`, // template to use
filename: `../app/templates/webpack/${page}.html`, // output template (relative from static dir)
template: `web/${page}.html`, // template to use (use the same template used for running FE outside of vercel)
'assets': { // add these script/link tags
'client': '/[fullhash].js',
'style': 'style.[fullhash].css',
Expand Down