heroku-django | Heroku plugin alias for running Django management | Platform As A Service library
kandi X-RAY | heroku-django Summary
kandi X-RAY | heroku-django Summary
...takes way too long to type. How about:.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of heroku-django
heroku-django Key Features
heroku-django Examples and Code Snippets
Community Discussions
Trending Discussions on heroku-django
QUESTION
When I want to deploy my Django app to heroku with git push heroku master
, I got an error like this:
ANSWER
Answered 2019-Jan-02 at 09:00It seems that you try to use both Pipenv
and requirements.txt
. Delete Pipfile
if you want to use requirements.txt
and Heroku will install dependencies from that file.
QUESTION
I'm trying to install django-filer. But when I run manage.py migrate
I get AttributeError: 'Manager' object has no attribute '_inherited'. I don't know what that means. (I started this project with Heroku starter template https://github.com/heroku/heroku-django-template)
I initially thought that perhaps I forgot to install JPEG and ZLIB, but to my understanding they are default since Pillow 3.0.
...ANSWER
Answered 2017-Jan-05 at 10:11django-filer 1.2.5 is not working under Django 1.10
They are working on the 1.2.6 version which has support for Django 1.10
https://github.com/divio/django-filer/milestone/20?closed=1
This is the specific issue https://github.com/divio/django-filer/issues/899
QUESTION
I have a Django
application that is running on Heroku
. I am using Postgres
with Django
and when I first committed the files and ran heroku run python manage.py migrate
, the initial migrations worked fine. I then created a new app restaurant
in which I created a new model.
I ran the local makemigrations
and migrate
and it created a new file restaurant/migrations/0001_initial.py
.
The problem is that when I now run heroku run python manage.py migrate
it says there are no migrations to apply. I tried
heroku run python manage.py migrate restaurant
but there's an error CommandError: App 'restaurant' does not have migrations.
I have logged into the console and the migration files are there so I was wondering if I should be doing something like:
...ANSWER
Answered 2018-May-09 at 11:57Inside the migrations folder you also need to include __init__.py
or else Heroku
will treat the app as not having any migrations.
QUESTION
I have this program that I have managed to upload to heroku without error. But when I open it in the browser, then if I keep in there a line that uses Regexp, I get "internal server error". If I comment it out it's fine.
I have looked at similarly titled questions about Heroku giving "internal server error", but they don't involve Regexp, and they haven't given me any ideas as to what I need to do to make it work. For example Heroku deployment internal server error the person was using python and a package he had installed was incompatible, that doesn't seem relevant to my issue. This one Heroku + Django Internal server Error a guy had to import something called djcelery. Well, maybe I have to import something somewhere, but I don't know what, but it wouldn't be djcelery 'cos i'm not using django.
...ANSWER
Answered 2018-May-05 at 08:29As with all errors, the first thing to do is check the log. The log should (almost) always provide a better clue to the error than the generic "internal server error" that's public-facing.
However, in this case I'm almost certain the issue is that your local machine is using ruby version >= 2.4.0
(possibly 2.5.1
, which is the latest?), whereas heroku is running ruby version 2.3.7
. From the documentation:
If your
Gemfile
does not contain a ruby entry, you will getMRI 2.3.7
onCedar-14
andHeroku-16
stacks. OnHeroku-18
you will getMRI 2.4.4
.
To fix this, I would recommend including:
QUESTION
I'm trying to configure my django app on Heroku for the first time. I've made it to the point of pushing my code to "heroku master", but I'm getting a ModuleNotFound
error:
ModuleNotFoundError: No module named 'UsefulFunctions'
Here's the full trace:
...ANSWER
Answered 2018-Apr-13 at 16:39Instead of editing your PYTHONPATH to include the file, why not put UsefulFunctions in your existing PYTHONPATH? Django apps often conventionally have a utils
module (utils.py
) for such things. If it's specific to your Users app, you can put it at users/utils.py
, but if you need it more generally, it can be outside the app, next to manage.py
in the project.
That said, if you do want to keep it outside the project root and app dirs, I'm noticing that UsefulFunctions does not have a .py extension, so you'll have to make it a .py file at the very least.
QUESTION
--UPDATE SOLVED--
The problem wasn't my code, it was the HTTP server library I was using. Gunicorn apparently didn't work the way I needed it to out of the box, so this post below helped point me to Waitress as an alternative HTTP server library. Now my progress updates the way it's supposed to.
Link: http://blog.etianen.com/blog/2014/01/19/gunicorn-heroku-django/
=============================================
How things are working on my development runserver:
I have a Django app that updates a progress html tag using Ajax requests (currently I am using POST but I have used GET successfully as well on my development runserver). Everything works great. The Ajax request calls a function in my view.py that returns a JsonResponse with the updated data from my business logic happening in views. I am using setInterval with setTimeout to control the number of calls and clearInterval when I reach certain values.
Production deployment to Heroku:
I am currently trying to deploy to Heroku and have been 99% successful. My template renders correctly, so I can see my page and submit the form for processing. The 1% problem here is that my Ajax requests are not getting updated data and I don't know why. It's like my Ajax requests are just getting the initialized variable values of zero and continue to return those values.
I am console.logging the JSON returned from the Ajax call:
...ANSWER
Answered 2018-Jan-07 at 01:19The problem wasn't my code, it was the HTTP server library I was using. Gunicorn apparently didn't work the way I needed it to out of the box, so this post below helped point me to Waitress as an alternative HTTP server library. Now my progress updates the way it's supposed to.
Link: http://blog.etianen.com/blog/2014/01/19/gunicorn-heroku-django/
QUESTION
I am new to publishing django apps on heroku. I have read their tutorials and figured I would start simple by modifying their template django project.
So far everything was good.
Then I made an app as one does, made a model and ran
...ANSWER
Answered 2017-Sep-13 at 14:01You need to actually run the migrations on Heroku once you have pushed the code generated by makemigrations
. You do this via heroku run manage.py migrate
.
QUESTION
I have my Django application deployed on Heroku in a free dyno Currently, I am sending some GET and POST requests from JQuery-1.12.4 version
In my local development version of my application, the requests to my REST endpoints services it’s works Here an example of the fetch of posts of an user, consuming from ajax to endpoint rest service
This is my localhost Django server
I deploy on Heroku free dyno this same user interface, but the behavior is the following:
The server throw an error 500, although was happen some inusual or strange Previously, when I create an user for first time in my Heroku deployment to this user, the create and fetch post functionality it’s works O.K. like in my local environment development.
Heroku accept GET and POST request from JQuery AJAX ONLY to this user, such as follow in this picture:
I Unknown the reason which Heroku like production/testing server deployment does not accept or accept limited AJAX requests. Is possible (I think so, and will be too logic) that this behavior to be due to I am using free dyno heroku server?
Why only accept ajax request to just an user and other users like the images show above, does not works the ajax requests?
In this question talk about the topic, but I don’t have clear this subject
What other option suggest to me in relation to deployment of my project?
AWS EC2? may be?
The Heroku free dyno, don't let me look the logs due to in this free dyno, does not saved files ..
I appreciate some orientation about it.
Best Regards
UPDATE
I can look the logs in my heroku deployment, according to this answer
By the moment, the logs in the GET and POST operation only tell me about of status 500
This is the logs when I perform the GET request
...ANSWER
Answered 2017-Sep-01 at 21:37Mostly likely the problem you are having will not be solved by moving to a different hosting provider.
What you should do is find a way to see the full traceback of the error you are getting at your API url. You can do this in one of several ways:
- Setup django logging to receive traceback emails when errors occur
- Setup a 3rd party logging service such as Sentry
- (Easiest) Visit the API url directly in your browser instead of calling via AJAX. You will also need to set
DEBUG=True
in your settings to see the traceback in the browser
QUESTION
I am having trouble with deployment of twitter bootstrap on my heroku client. My html code is not showing like it should (alignment, special table layouts, etc)
All is working locally, but i assume it has to do with the static files that don't get transferred correctly.
This is the static file structure, but have a look how it looks like when i open the "source chrome console" on my live heroku verson.
View of how the folder structure should be
Folder structure of deployed code on heroku
It looks like some folders are "stitched" one to another. what could be my issue? should i avoid "-" and "_" in my file names?
thanks for the help.
based on extra questions, I added more info on my settings.py file. I followed a tutorial to get all the stuff right. Also whitenoise was installed, added to wsgi.py.
wsgi.py
...ANSWER
Answered 2017-Jul-19 at 15:36Go to heroku static assets documentation for Django:
Heroku Documentation: Django and Static Assets
Everything is illustrated there in detail, make changes in settings.py and install whitenoise
and it will work.
QUESTION
I have an Django app deployed on Heroku, but due to some requirement I had to create a basic nodejs file and I wish to run it on the same dyno. I googled for solutions but couldnt come up with much apart from the blogs, which all are same https://blog.heroku.com/heroku-django-node So, I did install buildpack mentioned, and my profiles are: Procfile:
...ANSWER
Answered 2017-May-11 at 09:21The Error: listen EADDRINUSE
error comes from calling .listen() twice with the same port in app.js.
You are on the right track. Here is an example of how to proxy /channel requests to a Node.JS app and all other requests to another app (a Django app in this case):
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install heroku-django
On a UNIX-like operating system, using your system’s package manager is easiest. However, the packaged Ruby version may not be the newest one. There is also an installer for Windows. Managers help you to switch between multiple Ruby versions on your system. Installers can be used to install a specific or multiple Ruby versions. Please refer ruby-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page