Skip to content

Commit

Permalink
fix: creating change requests in private cloud UI (#2953)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewelwell committed Nov 10, 2023
1 parent 6f830e2 commit 8eedf55
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 135 deletions.
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

3 comments on commit 8eedf55

@vercel
Copy link

@vercel vercel bot commented on 8eedf55 Nov 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs – ./docs

docs-git-main-flagsmith.vercel.app
docs.flagsmith.com
docs.bullet-train.io
docs-flagsmith.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 8eedf55 Nov 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 8eedf55 Nov 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.