Skip to content

Instantly share code, notes, and snippets.

@andres-torres-marroquin
Created April 3, 2012 20:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andres-torres-marroquin/7484a84aac4f09b290a8 to your computer and use it in GitHub Desktop.
Save andres-torres-marroquin/7484a84aac4f09b290a8 to your computer and use it in GitHub Desktop.
Last login: Tue Apr 3 13:36:22 on ttys002
[andres@Mac-Pro-de-Andres ~]$ cd Projects/
[andres@Mac-Pro-de-Andres Projects]$ mkdir django-1,4-test
[andres@Mac-Pro-de-Andres Projects]$ cd django-
-bash: cd: django-: No such file or directory
[andres@Mac-Pro-de-Andres Projects]$ cd django-1,4-test/
[andres@Mac-Pro-de-Andres django-1,4-test]$ virtualenv --no-site-packages .
The --no-site-packages flag is deprecated; it is now the default behavior.
New python executable in ./bin/python
Installing setuptools............done.
Installing pip...............done.
[andres@Mac-Pro-de-Andres django-1,4-test]$ source bin/activate
(django-1,4-test)[andres@Mac-Pro-de-Andres django-1,4-test]$ pip install django==1.4
Downloading/unpacking django==1.4
Downloading Django-1.4.tar.gz (7.6Mb): 7.6Mb downloaded
Running setup.py egg_info for package django
Installing collected packages: django
Running setup.py install for django
changing mode of build/scripts-2.7/django-admin.py from 644 to 755
changing mode of /Users/andres/Projects/django-1,4-test/bin/django-admin.py to 755
Successfully installed django
Cleaning up...
(django-1,4-test)[andres@Mac-Pro-de-Andres django-1,4-test]$ SPARKER_URL=https://raw.github.com/andres-torres-marroquin/django-sparker/master/
(django-1,4-test)[andres@Mac-Pro-de-Andres django-1,4-test]$ curl -O ${SPARKER_URL}files/.gitignore
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 172 100 172 0 0 328 0 --:--:-- --:--:-- --:--:-- 457
(django-1,4-test)[andres@Mac-Pro-de-Andres django-1,4-test]$ curl -O ${SPARKER_URL}files/requirements.txt
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 63 100 63 0 0 145 0 --:--:-- --:--:-- --:--:-- 176v
i(django-1,4-test)[andres@Mac-Pro-de-Andres django-1,4-test]$ vim requirements.txt
(django-1,4-test)[andres@Mac-Pro-de-Andres django-1,4-test]$ django-admin.py test_project
Unknown command: 'test_project'
Type 'django-admin.py help' for usage.
(django-1,4-test)[andres@Mac-Pro-de-Andres django-1,4-test]$ django-admin.py startprojec ttest_project
Unknown command: 'startprojec'
Type 'django-admin.py help' for usage.
(django-1,4-test)[andres@Mac-Pro-de-Andres django-1,4-test]$ django-admin.py startproject test_project
(django-1,4-test)[andres@Mac-Pro-de-Andres django-1,4-test]$ cd test_project/
(django-1,4-test)[andres@Mac-Pro-de-Andres test_project]$ ./manage.py runserver
-bash: ./manage.py: Permission denied
(django-1,4-test)[andres@Mac-Pro-de-Andres test_project]$ chmod 755 manage.py
(django-1,4-test)[andres@Mac-Pro-de-Andres test_project]$ ./manage.py runserver
Validating models...
0 errors found
Django version 1.4, using settings 'test_project.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
[03/Apr/2012 15:14:48] "GET / HTTP/1.1" 200 1963
^C(django-1,4-test)[andres@Mac-Pro-de-Andres test_project]$ cd ..
(django-1,4-test)[andres@Mac-Pro-de-Andres django-1,4-test]$ ls
bin include lib requirements.txt test_project
(django-1,4-test)[andres@Mac-Pro-de-Andres django-1,4-test]$ st
fatal: Not a git repository (or any of the parent directories): .git
(django-1,4-test)[andres@Mac-Pro-de-Andres django-1,4-test]$ git init
Initialized empty Git repository in /Users/andres/Projects/django-1,4-test/.git/
(django-1,4-test)[andres@Mac-Pro-de-Andres django-1,4-test master]$ st
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .gitignore
# requirements.txt
# test_project/
nothing added to commit but untracked files present (use "git add" to track)
(django-1,4-test)[andres@Mac-Pro-de-Andres django-1,4-test master]$ git add .
(django-1,4-test)[andres@Mac-Pro-de-Andres django-1,4-test master]$ git commit -m "Django 1.4 test"
[master (root-commit) 5c153e2] Django 1.4 test
6 files changed, 233 insertions(+), 0 deletions(-)
create mode 100644 .gitignore
create mode 100644 requirements.txt
create mode 100755 test_project/manage.py
create mode 100644 test_project/test_project/__init__.py
create mode 100644 test_project/test_project/settings.py
create mode 100644 test_project/test_project/urls.py
create mode 100644 test_project/test_project/wsgi.py
(django-1,4-test)[andres@Mac-Pro-de-Andres django-1,4-test master]$ st
# On branch master
nothing to commit (working directory clean)
(django-1,4-test)[andres@Mac-Pro-de-Andres django-1,4-test master]$ heroku create --stack cedar django-1-4-test
git push heroku master
Creating django-1-4-test... done, stack is cedar
http://django-1-4-test.herokuapp.com/ | git@heroku.com:django-1-4-test.git
Git remote heroku added
(django-1,4-test)[andres@Mac-Pro-de-Andres django-1,4-test master]$ git push heroku master
Counting objects: 11, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (11/11), 3.74 KiB, done.
Total 11 (delta 0), reused 0 (delta 0)
-----> Heroku receiving push
-----> Python app detected
-----> Preparing Python interpreter (2.7.2)
-----> Creating Virtualenv version 1.7
New python executable in .heroku/venv/bin/python2.7
Also creating executable in .heroku/venv/bin/python
Installing distribute.............................................................................................................................................................................................done.
Installing pip...............done.
Running virtualenv with interpreter /usr/local/bin/python2.7
-----> Activating virtualenv
-----> Installing dependencies using Pip version 1.0.2
Downloading/unpacking django==1.4 (from -r requirements.txt (line 1))
Creating supposed download cache at /app/tmp/repo.git/.cache/pip_downloads
Storing download in cache at /app/tmp/repo.git/.cache/pip_downloads/http%3A%2F%2Fa.pypi.python.org%2Fpackages%2Fsource%2FD%2FDjango%2FDjango-1.4.tar.gz
Running setup.py egg_info for package django
Installing collected packages: django
Running setup.py install for django
changing mode of build/scripts-2.7/django-admin.py from 600 to 755
changing mode of /tmp/build_2y5c9jogv2d5d/.heroku/venv/bin/django-admin.py to 755
Successfully installed django
Cleaning up...
-----> Discovering process types
Procfile declares types -> (none)
-----> Compiled slug size is 8.9MB
-----> Launching... done, v3
http://django-1-4-test.herokuapp.com deployed to Heroku
To git@heroku.com:django-1-4-test.git
* [new branch] master -> master
(django-1,4-test)[andres@Mac-Pro-de-Andres django-1,4-test master]$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment