heroku

Django Front End Search

六眼飞鱼酱① 提交于 2020-01-06 08:46:31
问题 Currently using Django 2.1,Python 3.6, PostgreSQL 11, and hosting the DB on Heroku. I would like to implement a user search on a device view that I have setup. Current Page Layout This page will list people in our DB and will provide a link to details about them. What I would like is for a user to be able to search for a particular person and have the list populate accordingly. Django documentation provides some steps to implement this but is not entirely clear about an action plan. Thanks

Why doesn't this query work on Heroku?

痞子三分冷 提交于 2020-01-06 08:13:33
问题 Trying to implement a simple search with RoR and Heroku. This works fine on localhost but as soon as I push to Heroku, the search returns no results. I'm using SQlite locally and Heroku uses Postgres, correct? I think this is the problem but after quite a bit of research I can't seem to find the solution. Any idea what might be going on? Help appreciated as always. def self.search(search) if search where("title LIKE ? OR description LIKE ?", "%#{search}%", "%#{search}%") else find(:all) end

Django admin site does not pick current image URL

泄露秘密 提交于 2020-01-06 08:09:27
问题 I am trying to edit the fields of one of my objects in the Django admin site, I also have a Cloudinary image field in my model. The issue is, anytime I try to make an edit to one of the CharField s of my object, I get the error: value too long for type character varying(100) which I later found out that every time I finish my edits and I am trying to save, it looks for a new image to replace the current image of my imagefile even though I did not touch my imagefile , thus it returns an empty

Handling all website one-off root static files like favicon.ico reliably and elegantly?

霸气de小男生 提交于 2020-01-06 07:34:06
问题 Perhaps I'm missing something (I hope I am!), but it seems awfully clunky to have to have deal with the one-off root website files requested by the browser, such as favicon.ico and things like apple-touch-icon-precomposed.png (on the iPad). Right now, I'm getting a 500 server error whenever I encounter one of these for which I'm not explicitly serving up a file. My questions: Is there an up-to-date list of all such files for all major browsers that my webapp should be handling? As a failsafe,

Heroku (PlayFramework/Scala) app automatically redirect to https

房东的猫 提交于 2020-01-06 07:25:38
问题 I have an PlayFramework App developed using Scala running on Heroku; I only mention the development language and framework because any posts I've found regarding this issue relate to PHP! I have http and https running on a custom domain but I would like to force http requests to be redirect to https. I've found that I need to update the .htaccess file with the following: ##Force SSL #Normal way (in case you need to deploy to NON-heroku) RewriteCond %{HTTPS} !=on #Heroku way RewriteCond %{HTTP

Heroku can't find server.js

余生颓废 提交于 2020-01-06 05:58:24
问题 I'm having problems figuring out why Heroku can't find my server.js file under the 'app' folder which is where it's looking for it. I have followed the following steps more than once: 1. Deleted the existing .git folder and the existing Heroku respository. I then init a new git respository and created a new Heroku respository and push to Heroku. Here are my docs: server.js const express = require('express'); const app = express(); const path = require('path'); app.use(express.static(__dirname

babel-node is not getting installed on Heroku

こ雲淡風輕ζ 提交于 2020-01-06 05:35:32
问题 I'm using babel-node for ES6 syntax on Heroku, but I get a build error when I deploy. It says "babel-node: not found". I've tried a clean install on my local computer and it works perfectly. Package.json: { "name": "secret", "version": "0.0.0", "private": true, "scripts": { "start": "./node_modules/.bin/babel-node ./bin/www" }, "engines": { "node": "7.5.0", "npm": "5.0.3" }, "dependencies": { "babel-cli": "^6.24.1", "babel-preset-es2015": "^6.24.1", "babel-preset-stage-0": "^6.24.1", ... } }

Why threads stopped in heroku?

大城市里の小女人 提交于 2020-01-06 05:34:12
问题 I have been uploaded my project in heroku, and my script create 4 threads, each thread perform specific task, but sometimes log file tells me that some threads stopped like this, (Thread 13)! How can I solve it? this is the code! segmentationProcess = SegmentationProcess() dataList = request.body.decode("utf-8").split(',') data = segmentationProcess.preProcess(dataList) lock = multiprocessing.Lock() thread1 = ThreadWithLogAndControls(target=segmentationProcess.searchWorkExperience, args=(data

Rails tutorial chapter3 heroku cannot find controller StaticPagesController

六月ゝ 毕业季﹏ 提交于 2020-01-06 04:36:04
问题 I have a page doesn't exist problem with my sample_app from the tutorial. I just followed all the steps and my code looks like this: Routes Rails.application.routes.draw do root 'static_pages#home' get 'static_pages/home' get 'static_pages/help' get 'static_pages/about' get 'static_pages/contact' end Controller - the file name is static_pages_controller.rb class StaticPagesController < ApplicationController def home end def help end def about end def contact end end On GET "/" i'm getting

Problems Deploying Yeoman app to Heroku

瘦欲@ 提交于 2020-01-06 04:21:28
问题 I've been trying to deploy my AngularFullstack (node) app to Heroku. I created the app in the terminal with: yo angular-fullstack . Whenever I try to deploy to Heroku I get the following when I go to my deployed app: Application Error An error occurred in the application and your page could not be served. Please try again in a few moments. If you are the application owner, check your logs for details. The logs are: 2015-07-24T06:57:35.184227+00:00 heroku[web.1]: State changed from up to