Tag: django

Workflow when building django project with git/github

I am developing a django project with several others. When I create the project, I have the virtualenv, requirements.txt and my django project in my directory. I commit the entire directory and upload to github. Another developer clones the project to his own machine. He created a new virtualenv with pip install -r requirements.txt. However, […]

python check_output workaround in 2.6

I’m running on a machine with python 2.6 and no I can’t upgrade for now. I need the subrpocess.check_output function but as I’ve understood this is note defined in 2.6. So I’ve used a workaround: try: import subprocess if “check_output” not in dir( subprocess ): # duck punch it in! def check_output(*popenargs, **kwargs): r”””Run command […]

Push rejected, failed to compile Python app. Django, Ubuntu

I’m following this tutorial from Getting Started with Django – http://gettingstartedwithdjango.com/en/lessons/introduction-and-launch/ And I got stuck when I try to deploy the code. That’s what I get when I try to git push heroku master git push heroku master Counting objects: 16, done. Delta compression using up to 4 threads. Compressing objects: 100% (14/14), done. Writing […]

pip requirements.txt github repo django app

I have forked a repo on Github in order to make my own changes to it. I have submitted a pull request to the original repo, but while I wait, I would like to add my repo to my pip requirements.txt. I’ve added the line like this: […] -e git+https://github.com/eldamir/django-datatable-view.git#egg=datatableview I then run pip install […]

How to deploy a Django/Tornado based web app that's built with platter?

This question is mostly about the technical details + some best practices of how to efficiently deploy a python web app that’s built using platter. Taking Django for instance, I have a project that’s already built into a tarball distribution. This includes all wheels of all deps + the package of the app itself. My […]

pg_config executable not found on Windows 7 with PostgreSQL installed

I’m following the Heroku guide on using Python with Heroku. I’m on the step for installing dependencies, but when I run pip install -r requirements.txt –allow-all-external, I get this error: Error: pg_config executable not found. Please add the directory containing pg_config to the PATH or specify the full executable path with the option: python setup.py […]

How to clone a Django project without breaking it?

I built a (relatively simple) Django project following a tutorial (the recently released Hello Web App book.) I committed my changes along each step of the way, and I have my working solution in a github repo. However, when I clone the code into a new work space such as onto a new machine or […]

Saving the stdout of gitpython calls?

directory = repo.directory r = git.Repo(directory) if r: r.git.reset(‘–hard’) if r.remotes[repo.remote]: r.remotes[repo.remote].pull() I want to save the stdout of any operation on my r object, including any .reset or .pull calls – how can I go about doing this?

Moving an application from Django 1.4 to 1.8

I had a previous project running on Django 1.4 and I am now trying to “revive it”. Specifically my system at that time was OS-X and running BITNAMI DJANGO STACK 1.4.6 (Python 2.7) . I have pulled the source code from the Git repository into a fresh install of BITNAMI DJANGOSTACK 1.8 https://bitnami.com/stack/django/installer#osx Ideally, I […]

Django git conflict affecting url.py

I’m having a conflict with url.py after making a commit and migration to git. My url.py files have errors I can no longer view the page. How do I fix this conflict, I only need the changes I made, the other changes from other user are not even needed. urlpatterns = [ url(r’^$’, views.IndexView.as_view(), name=’index’), […]

Git Baby is a git and github fan, let's start git clone.