There's this problem am having right now where there's no error in my code and yet the code won't run. Am still a newbie trying out something
I developed a little django project and pushed to github, went to my pythonanywhere console and cloned it. Now I went back to console and created a new app ( startapp command) added to INSTALLED_APPS and added some lines of code in the new app.
Problem is that the URLs in the new are not going through and even the ls command is not listing the app
Is this a git issue?
Related
I have created a new Heroku site and I am developing it on my Linux box, using Django. The standard "getting started" site Heroku created for me is called "gettingstarted". How can I change that / configure Heroku to forget about it?
I was reading through the Django tutorial, which explains how to create a new site (django-admin startproject my_site). I did this successfully for a demo project. Then I tried to do it under the Heroku directory, because I wanted a better name for my site than "gettingstarted". I noticed that every time I start the Heroku server under my project, it says ...using settings 'gettingstarted.settings'. I found that this is configured in manage.py and I change it.
This is the directory layout I have
/some/path/heroku_random_name/gettingstarted/settings.py
/some/path/heroku_random_name/my_site/settings.py
/some/path/heroku_random_name/my_app
This is what I have in
/some/path/heroku_random_name/manage.py
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'my_site.settings')
so I would expect that the site that matters is my_site.
I got it to the point where I can run the site successfully on my local machine, and I can tell that it using the settings from my_site. But when I deploy the project to Heroku, it does not recognize my_app until I register it in gettingstarted/settings.py. In other words, when running in Heroku, it is still using gettingstarted as the site to run.
I am new to all this, so I left gettingstarted in the project, because I am afraid to break things. But how can I configure Heroku to execute settings from my_site and not from gettingstarted?
Found it: it's configured in Procfile.
It's confusing because it's configured in one place for running locally and in a different place for running hosted at Heroku.
I've created a basic Django app and I wanted to deploy it with Heroku. I have followed all the instructions given on Heroku but there was one error I made which was naming the file "procfile" instead of "Procfile". Now the website has been deployed but it only opens up to an application error. Upon checking the log, I have found the error code to be H14. I have since renamed the "procfile" to "Procfile" but the change doesnt seem to be integrated. How do I fix this?
Add the change on your repository, commit it, and push the applicable branch to Heroku. Finally, try to run Heroku again.
I've started learning django. Through the django docs, I am using vscode for the project. The matter is that I've started a new project named "mysite" in the project folder named "web-project" by using the following commands as mentioned in the screenshot
But if you noticed an error in the last of the screenshot. It pops every time I tried to run the server
I was wondering if it is possible to deploy to heroku with out putting my django project on git?
My another question. I already have my app on heroku. Now I want to make changes to it. But the computer I had the soruce code crashed. So how do I download my project files from heroku?
No. ( But there is a plugin to do that, but I would say why bother. But.. - https://github.com/ddollar/heroku-push)
But all you have to do is git init to setup a repo, and push to the heroku remote after setting up an app. You don't have to publish your repo anywhere.
You can get back your code by using:
heroku clone <appname>
this is app-engine-patch http://code.google.com/p/app-engine-patch/
i download it ,and unzip , but can't running on my google-app-engine launcher
why ?
updated
but the patch has app.yaml, and i can't find aep-sample
updated2
when i python manage.py runserver
so can app-engine-patch running on gae launcher ?
App Engine Patch isn't an App Engine app, it's a library to use with your app. If it doesn't have an app.yaml file, it won't be able to be run.
It looks like there's an aep-sample app included in the .zip file, try running that.
(response to edit)
The app.yaml file you found references aep-sample as the app's name, but the app listed in the launcher says "patch", so something's wrong there.
Have you read the Getting Started page on the project's site? Reading the documentation is generally a helpful first step.