I am very new with svelte and svelte(kit), apologies if this might be a naïve question.
I have an issue where svelte(kit) displays %sveltekit.head% and %sveltekit.body% instead of the actual svelte page being rendered.
This issue is only when I try to point the flask endpoint to svelte's html page but the application independently runs perfectly fine.
This is my first question, so incase if you need more details on this, let me know.
I tried running 'npm run build' -> cd package -> npm publish to create and publish the package but it doesn't work. Not sure if I am doing something wrong.
I also tried to read documentations and understood something like svelte(kit) has its own backend and frontend but not sure what I should be doing.
Svelte(kit) with Flask Backend - Some Questions
This question here is kind of similar, but I cannot understand what or how I could solve where I am stuck.
Related
This question is related to: Ember Octane How to Clear Form Errors?
I have been asking a lot of questions on how to upgrade my Ember Classic project to Ember Octane. Some users in the community have suggested that I post an Ember-Twiddle for them to see what is going on. I have tried doing that, but I cannot get it to work. This is another tool for me to learn and I am struggling a bit to make heads or tails of it while trying to also NOT post my entire project as that seems unnecessary.
Why do I not see the page links for change-password and myroute2?
https://ember-twiddle.com/364eaf05a2e1072994b61f255032eb62?openFiles=templates.application%5C.hbs%2C
The hint is the browser's console:
you first trying to extend your change-password from unknown mixin and after fixing that you'd see another error re unknown services in the change-password controllers. Comment them out and everything works.
first of all many thx in advance.
I have deployed my django(1.11) project to azure, it works together with the postgresql db. Now for the frontEnd I would like to build up a live chart/figure, which means that every time when the postgresql db receive any update (from the function app on azure, not the django self), my chart/figure should be automatically refreshed.
I have tried Signal, but it only react to the update which is made by django self. Then I try channels + redis, followed up the example(chat), but still not sure how to make it.
my question is: which package/ components/ Tech should I use in this case? can you guys give me some example or a link to the certain tutorial?
Look forward to the fancy idea from u guys.
I installed Django CMS through Powershell using the command:
pip install djangocms-installer
I'm new to this, and the tutorial that I've been following suggested that I should be asked questions to set up Bootstrap and the SuperUser account. These questions weren't asked. Does anybody know why and how I could change this by hand? The django docs don't seem to be much help here because they assume that the questions are asked.
It occurs when I create a new project using:
djangocms -p . project
It just runs through rather than asking questions - no errors to report
I don't know if this helps but I had all sorts of headaches the first time I tried to install Django-cms. After much head scratching I did get it to successfully install and I was able to get up and running with it. I also created a crib sheet along the way of all the steps I took.
I have published this crib sheet on my website and you are welcome to go and review it, print it off etc. It will take you right back to the very beginning which may be unnecessary but hopefully you might be able to cherry pick the bits that you need. Hope it helps.
http://www.ubsltd.co.uk/index.php/creating-a-cms-website-with-django
I recently did a successful Django install, and everything went as expected. No errors. But, nothing shows up. It is as if I had never installed Django.
There are no errors. Checking Django/Python versions returns as expected. From the console, I can create new projects/apps, run migrations, create users, etc. Everything seems to work. Except, when I go to mydomain.com, it just loads the old site's index.html as if Django doesn't exist.
I realize the above question isn't a good question. I figured out my problem before posting the question and decided to post my answer below with the question for future reference should others have the same issue later.
After the fruitless task of deleting and recreating my project files, I eventually figured out what happened with my Django installation. I had never enabled Passenger. On the web host in this case, DreamHost, it is just a simple checkbox in the control panel to enable, but I never did.
Other than the fact that I should have remembered I need to do enable Passenger for Django to show up, a couple things should have tipped me off. There was no tmp folder with a restart.txt file. I manually added it (that file's important), but didn't stop to think about why it wasn't there. Also, the html files were loading without being in the public folder.
That gave me an hour or so of frustration today, so I thought others might google this later and find this useful. Searching for "Django site has no errors but still doesn't work" wasn't a fruitful avenue for me.
It is my first time trying to get a Django application live on the net but I am having an issue with the URls.
The working local URL of my application is
http://localhost:8000/surveythree/ - This works as expected.
However when I upload my project to my hosting account I cant seem to locate the relevant page using the shortened URL as provided by the URLconf, in this case it should be /surveythree/
url(r'^surveythree/$', SurveyWizard.as_view([SurveyForm1, SurveyForm2, SurveyForm3, SurveyForm4, SurveyForm5])),
I can locate the page if I use the full filepath however.
http://www.mywebsite.com/bias_experiment/src/survey/templates/formtools/wizard/wizard_form.html
I thought the benefit of the URLconf was to shorten the URL to something like one of the following
http://www.mywebsite.com/bias_experiment/surveythree/
http://www.mywebsite.com/bias_experiment/src/surveythree/
http://www.mywebsite.com/bias_experiment/src/survey/surveythree/
Is there something simple that I am missing here? If anyone could tell me what the shortened URL should be based on the above it would be great. I have been trying multiple combinations for a while now but I don't know if I am going around in circles or doing it wrong.
Thanks in advance.
It doesn't look like you have actually deployed your site with a proper server. You can't just upload the files to any webserver and expect then to run: you need to configure a wsgi server and connect it to your app.
The documentation is here but to be honest I'd be amazed if your college server supported it at all, if all you have is a shared folder. You may be able to get it to work with FastCGI, but I wouldn't hold out a whole lot of hope.
(And even though you say that going to that long URL "works", I'd guarantee that all you're seeing is the raw HTML template. There's no way that any actual dynamic functionality will be working like that, as you'd see if you actually tried to submit the form at that URL.)
Deploying Django apps is much more complicated. To run in more "production" environment you will need to configure:
virtualenv to keep pip modules which your app required separate from global environment.
nginx for hosting static files ( you can copy them to some folder with ./manage.py collectstatic.
WSGI server: uWSGI or Gunicorn are both nice choices.
supervisor: for running and restarting WSGI and any other apps (for example celery) running in background
It's a lot for a start, so it's good to follow some tutorial and use ready to use config snippets.