This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ micromasters git:(master) git checkout master | |
Already on 'master' | |
Your branch is up-to-date with 'origin/master'. | |
➜ micromasters git:(master) git pull | |
Already up-to-date. | |
➜ micromasters git:(master) node --version | |
v6.2.2 | |
➜ micromasters git:(master) npm --version | |
3.9.5 | |
➜ micromasters git:(master) sw_vers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ micromasters git:(manage-py-showmigrations) docker-compose run web ./manage.py showmigrations --list | |
[2016-11-08 14:21:46] DEBUG 1 [django.db.backends] utils.py:90 - [e06944c115f6] - (0.001) SELECT (1) AS "a" FROM "wagtailimages_rendition" WHERE "wagtailimages_rendition"."filter_spec" = '' LIMIT 1; args=('',) | |
[2016-11-08 14:21:46] DEBUG 1 [django.db.backends] utils.py:90 - [e06944c115f6] - (0.003) | |
SELECT c.relname, c.relkind | |
FROM pg_catalog.pg_class c | |
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace | |
WHERE c.relkind IN ('r', 'v') | |
AND n.nspname NOT IN ('pg_catalog', 'pg_toast') | |
AND pg_catalog.pg_table_is_visible(c.oid); args=None | |
[2016-11-08 14:21:46] DEBUG 1 [django.db.backends] utils.py:90 - [e06944c115f6] - (0.001) SELECT "django_migrations"."app", "django_migrations"."name" FROM "django_migrations"; args=() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ micromasters git:(correctly-handle-faculty-without-images) git checkout docker-compose-2 | |
Switched to branch 'docker-compose-2' | |
Your branch is up-to-date with 'origin/docker-compose-2'. | |
➜ micromasters git:(docker-compose-2) docker-compose --version | |
docker-compose version 1.8.1, build 878cff1 | |
➜ micromasters git:(docker-compose-2) docker version | |
Client: | |
Version: 1.12.2 | |
API version: 1.24 | |
Go version: go1.7.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Tier(models.Model): | |
program = models.ForeignKey(Program) | |
name = models.TextField() | |
description = models.TextField() | |
@property | |
def current_version(self): | |
return self.tier_versions.order_by('-active_at').first() | |
@property |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
class Parent(models.Model): | |
name = models.CharField() | |
class Category(models.Model): | |
"Each Parent object has its own set of categories" | |
parent = models.ForeignKey(Parent, related_name="categories") | |
name = models.CharField() |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ micromasters git:(improve-readme) docker-compose run web ./manage.py delete_realistic_search_data | |
System check identified some issues: | |
WARNINGS: | |
?: (1_8.W001) The standalone TEMPLATE_* settings were deprecated in Django 1.8 and the TEMPLATES dictionary takes precedence. You must put the values of the following settings into your default TEMPLATES dict: TEMPLATE_CONTEXT_PROCESSORS. | |
[2016-09-20 14:29:17] DEBUG 1 [django.db.backends] utils.py:89 - [7b117a7e72dc] - (0.001) SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined" FROM "auth_user" WHERE "auth_user"."username"::text LIKE 'fake.%'; args=('fake.%',) | |
[2016-09-20 14:29:17] DEBUG 1 [django.db.backends] utils.py:89 - [7b117a7e72dc] - (0.001) SELECT "roles_role"."id", "roles_role"."user_id", "roles_role"."program_id", "roles_role"."role" F |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ micromasters git:(master) docker-compose run web ./manage.py recreate_index | |
Pulling elastic (elasticsearch:latest)... | |
latest: Pulling from library/elasticsearch | |
8ad8b3f87b37: Already exists | |
751fe39c4d34: Already exists | |
b165e84cccc1: Pull complete | |
acfcc7cbc59b: Pull complete | |
04b7a9efc4af: Pull complete | |
b16e55fe5285: Pull complete | |
8c5cbb866b55: Pull complete |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
from flask_sqlalchemy import SQLAlchemy | |
app = Flask(__name__) | |
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///" | |
db1 = SQLAlchemy() | |
db2 = SQLAlchemy() | |
class Model1(db1.Model): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# revert https://github.com/mitchellh/vagrant/pull/7524 | |
% sudo vim /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/guests/ubuntu/guest.rb | |
% vagrant destroy | |
default: Are you sure you want to destroy the 'default' VM? [y/N] y | |
==> default: Forcing shutdown of VM... | |
==> default: Destroying VM and associated drives... | |
% vagrant up | |
Bringing machine 'default' up with 'virtualbox' provider... | |
==> default: Importing base box 'precise64'... | |
==> default: Matching MAC address for NAT networking... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.require_version ">= 1.6.5" | |
Vagrant.configure("2") do |config| | |
config.vm.box = "precise64" | |
config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
config.vm.network :private_network, ip: "192.168.33.10" | |
end |