Skip to content

Instantly share code, notes, and snippets.

$ brew install homebrew/apache/httpd24 --with-mpm-event
Updating Homebrew...
==> Downloading https://homebrew.bintray.com/bottles-portable-ruby/portable-ruby-2.3.7.leopard_64.bottle.tar.gz
######################################################################## 100.0%
==> Pouring portable-ruby-2.3.7.leopard_64.bottle.tar.gz
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
https://github.com/Homebrew/brew#donations
==> Auto-updated Homebrew!
Updated 2 taps (heroku/brew and homebrew/core).
==> New Formulae
ValueError at /testnewsletter
The view stylesite.views.EmbedNewsletterSubscribeView didn't return an HttpResponse object. It returned None instead.
Request Method: GET
Request URL: http://127.0.0.1:8000/testnewsletter
Django Version: 2.0.2
Exception Type: ValueError
Exception Value:
The view stylesite.views.EmbedNewsletterSubscribeView didn't return an HttpResponse object. It returned None instead.
Exception Location: /Users/barbaradonnini/Documents/stylevenv/lib/python3.6/site-packages/django/core/handlers/base.py in _get_response, line 139
Python Executable: /Users/barbaradonnini/Documents/stylevenv/bin/python
###############
## This is just for trying to get the newsletter sign-up form on a new page, not the other issue I mentioned
## This is literally all I added
###############
# views.py
from newsletter.models import Newsletter
class EmbedNewsletterSubscribeView(TemplateView):
template_name = 'testnewslettersubscribe.html'
def get_context_data(self, **kwargs):
@bld2104
bld2104 / _entry_detail_base.html
Created March 13, 2018 20:53
How I reformatted the zinnia blog page. Images aren't working in production.
{% load i18n %}
{% load zinnia %}
<div class="container">
<article id="entry-{{ object.pk }}" class="hentry{% if object.featured %} featured{% endif %}" itemscope itemtype="http://schema.org/Article">
{% block entry-header %}
<header class="entry-header">
{% block entry-title %}
<h2 class="entry-title" itemprop="name">
<a href="{{ object.get_absolute_url }}" title="{{ object.title }}" rel="bookmark" itemprop="url">
new-host:boxplot-theme barbaradonnini$ gcloud app deploy
WARNING: Automatic app detection is currently in Beta
Deployment to Google App Engine requires an app.yaml file. This
command will run `gcloud beta app gen-config` to generate an app.yaml
file for you in the current directory (if the current directory does
not contain an App Engine service, please answer "no").
Do you want to continue (Y/n)? y
This looks like a Python app. If so, please enter the command to run
@bld2104
bld2104 / heroku logs states error
Created March 22, 2016 17:58
heroku logs states error
2016-03-10T22:17:59.603409+00:00 app[web.1]: Started PATCH "/shop/cart" for 100.14.176.16 at 2016-03-10 22:17:59 +0000
2016-03-10T22:17:59.606164+00:00 app[web.1]: Processing by Spree::OrdersController#update as HTML
2016-03-10T22:17:59.606267+00:00 app[web.1]: Parameters: {"utf8"=>"✓", "authenticity_token"=>"ixp4G4AU6/SCWb6Pqd7t4k7wNib+2YYa2FdaE4jLE7kem5IEuQd4li9ig+nO0t5xtqNTfBriu3J+DZlWcnFPfA==", "order"=>{"line_items_attributes"=>{"0"=>{"quantity"=>"1", "id"=>"1"}, "1"=>{"quantity"=>"1", "id"=>"2"}}}, "checkout"=>""}
2016-03-10T22:17:59.610508+00:00 app[web.1]: Spree::Preference Load (2.8ms) SELECT "spree_preferences".* FROM "spree_preferences" WHERE "spree_preferences"."key" = $1 LIMIT 1 [["key", "spree/frontend_configuration/locale"]]
2016-03-10T22:17:59.614534+00:00 app[web.1]: Spree::User Load (2.2ms) SELECT "spree_users".* FROM "spree_users" WHERE "spree_users"."deleted_at" IS NULL AND "spree_users"."id" = $1 ORDER BY "spree_users"."id" ASC LIMIT 1 [["id", 1]]
2016-03-10T22:17:59.618957+0
@bld2104
bld2104 / RAILS_ENV=production bin-rake assets:precompile
Last active March 10, 2016 17:35
RAILS_ENV=production bin-rake assets:precompile
bld2104:~/workspace/sfunique2 (master) $ RAILS_ENV=production bin/rake assets:precompile
DEPRECATION WARNING: The configuration option `config.serve_static_assets` has been renamed to `config.serve_static_files` to clarify its role (it merely enables serving everything in the `public` folder and is unrelated to the asset pipeline). The `serve_static_assets` alias will be removed in Rails 5.0. Please migrate your configuration files accordingly. (called from block in <top (required)> at /home/ubuntu/workspace/sfunique2/config/environments/production.rb:79)
[WARNING] You are not setting Devise.secret_key within your application!
You must set this in config/initializers/devise.rb. Here's an example:
Devise.secret_key = "8aec2b518ac0ac33741d4f6ca0694eda863186b58a97b18d252a3bfb133018860874699bee7218b9564b02f5f0322e6abdf4"
/usr/local/rvm/gems/ruby-2.2.1/gems/actionpack-4.2.2/lib/action_dispatch/routing/route_set.rb:555:in `add_route': Invalid route name, already in use: 'spree'
You may have defined two routes w
bld2104:~/workspace/sfunique2 (master) $ git push heroku master
Counting objects: 10, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (6/6), 533 bytes | 0 bytes/s, done.
Total 6 (delta 3), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Using set buildpack heroku/ruby
2016-03-09T18:43:55.392870+00:00 app[web.1]: Started POST "/shop/admin/products/large-csa-box/images" for 100.14.176.16 at 2016-03-09 18:43:55 +0000
2016-03-09T18:43:55.394667+00:00 app[web.1]: Processing by Spree::Admin::ImagesController#create as HTML
2016-03-09T18:43:55.394731+00:00 app[web.1]: Parameters: {"utf8"=>"✓", "authenticity_token"=>"1SW154/zj2YpEFHv2+4nUR1pUHygLikN+cnup8FmtRxVNlPdu+MLjIVjg6ReQ4yVZuTTOCh2pbuRoQ0UxX69zw==", "image"=>{"attachment"=>#<ActionDispatch::Http::UploadedFile:0x007f766033da00 @tempfile=#<Tempfile:/tmp/RackMultipart20160309-3-10u1w1k.jpg>, @original_filename="csa-box-large.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"image[attachment]\"; filename=\"csa-box-large.jpg\"\r\nContent-Type: image/jpeg\r\n">, "viewable_id"=>"1", "alt"=>""}, "button"=>"", "product_id"=>"large-csa-box"}
2016-03-09T18:43:55.396535+00:00 app[web.1]: Spree::Preference Load (0.7ms) SELECT "spree_preferences".* FROM "spree_preferences" WHERE "spree_preferences".
@bld2104
bld2104 / logs when i try to add an image
Last active March 9, 2016 01:40
logs when i try to add an image with amazon installed
2016-03-09T01:39:25.345484+00:00 heroku[router]: at=info method=GET path="/shop/admin" host=sweetfields.herokuapp.com request_id=fc34ac37-8da0-4666-b14a-358eee24591f fwd="100.14.176.16" dyno=web.1 connect=1ms service=22ms status=302 bytes=1303
2016-03-09T01:39:25.336840+00:00 app[web.1]: Started GET "/shop/admin" for 100.14.176.16 at 2016-03-09 01:39:25 +0000
2016-03-09T01:39:25.339928+00:00 app[web.1]: Processing by Spree::Admin::RootController#index as HTML
2016-03-09T01:39:25.343118+00:00 app[web.1]: Spree::Preference Load (0.7ms) SELECT "spree_preferences".* FROM "spree_preferences" WHERE "spree_preferences"."key" = $1 LIMIT 1 [["key", "spree/backend_configuration/locale"]]
2016-03-09T01:39:25.346028+00:00 app[web.1]: Spree::User Load (0.8ms) SELECT "spree_users".* FROM "spree_users" WHERE "spree_users"."deleted_at" IS NULL AND "spree_users"."id" = $1 ORDER BY "spree_users"."id" ASC LIMIT 1 [["id", 1]]
2016-03-09T01:39:25.347302+00:00 app[web.1]: Redirected to https://sweetfields.herokuapp.com/