Giter Club home page Giter Club logo

django-skel's Introduction

Hey, I'm Randall!

It's great to meet you. I'm a long-time software developer, speaker, author, and entrepreneur.

Randall's GitHub stats

django-skel's People

Contributors

aladagemre avatar alej0varas avatar andrewaustin avatar benregn avatar bmcorser avatar dulacp avatar hirokiky avatar lucianu avatar nanonyme avatar pmrowla avatar pydanny avatar randalldegges-okta-2 avatar rdegges avatar scott-coates avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-skel's Issues

Python 3 problem

Hi Randall,

I've used django-skel for a while (most recently with Django 1.8.4) and the time has (finally) come to convert my project to Python 3. It had to happen. Unfortunately, I've run into a problem with django-skel and I've been able to recreate it with the following steps:

  1. Within a Python 3 virtualenv, create a Django project directory structure from the django-skel skeleton project:

    django-admin.py startproject --template=https://github.com/rdegges/django-skel/zipball/master myproj

  2. Comment out south, compressor and djcelery.

  3. Replace the "import *" line in settings/dev.py with a relative import. Python 3 no longer allows this.

    # from common import *
    from .common import DEBUG, DJANGO_ROOT, INSTALLED_APPS, MIDDLEWARE_CLASSES, STATICFILES_DIRS, TEMPLATE_DEBUG
    

Now if I run "python ./manage.py migrate" I get an exception:

raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")

I've tried to narrow it down by commenting out blocks of the settings files, but no luck. BTW, the default Django skeleton does work:

django-admin startproject mysite
cd mysite
python ./manage.py migrate

Questions regarding deployment

There are a few points that I don't think are covered in your documentation. I think the main one is regarding the database. The dev settings have an sqlite database, and it uses postgresify in the production environment to create a postgresql database - is this correct? At what stage does this happen and how do you change over the settings to the production settings?

Also, where are the postgresify and memecachify functions stored? I can't find them.

Importing apps from subfolders

Hi,

Based on django-skel's layout there's a subfolder in the project called apps. I see the intent is to keep "local" apps there. Can you elaborate further? What's the difference between a local app and a non-local app? After placing apps in there how do I set up INSTALLED_APPS in settings? I can't refer to apps/localappname since Django complains filenames are not supported.

Thanks.

Kombu for Celery development?

Currently, in the docs, there is no obvious way to develop with Celery. Randall, do you have a preferred way? Would adding kombu in the reqs and the settings in development.py work for you?

Development.py

BROKER_URL = 'django://'

INSTALLED_APPS += (
    'debug_toolbar',
    'kombu.transport.django'
)

Edit: I'm going to close my own issue here, because I realized that CELERY_ALWAYS_EAGER means you don't need to set up a separate Celery worker to dev on your tasks. Sorry about the rubber duck. Perhaps clarifying this in the docs could be good?

memcacheify and postgresify

from memcacheify import memcacheify
from postgresify import postgresify

Can you pls add example codes ? How you hide secure info?

problem with tarball/master

I folked the repository, now i want to make:

django-admin.py startproject --template=https://github.com/daidr/django-skel/zipball/master project_name.

I can't do it, show me this error message:

CommandError: couldn't extract file /tmp/django_project_template_0wiHmU_download/master to /tmp/django_project_template_QLxKRU_extract: Path not a recognized archive format: /tmp/django_project_template_0wiHmU_download/master

what did i do wron? or what i must to do?

Thanks

readme mentions Django 1.4 (and Django 1.5)

It's just a bit confusing but the readme mentions Django 1.5 at the top and then toward the middle it mentions that the installation steps assume you have Django 1.4 already installed.

I'm wondering if that's a mistake or if it is intended (for migrations from Django 1.4 to 1.5) or so.

Internal Server Error

Hi, I've been following your instructions and have deployed my app but am getting an internal server error when trying to access the website:

HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfil the request.

I logged all the steps that I took during deployment, and it all looks fine (except for the memcache installation, see below) so I'm not sure what's gone wrong here:

git remote add olp-heroku [email protected]:olp-main-website.git

git push olp-heroku master

$ heroku addons:add memcache:5mb --app olp-main-website
Adding memcache:5mb on olp-main-website... failed
! The memcache add-on has been disabled. Please choose an alternative service at https://addons.heroku.com/#caching

$ heroku addons --app olp-main-website
=== olp-main-website Configured Add-ons
cloudamqp:lemur
heroku-postgresql:dev HEROKU_POSTGRESQL_GRAY
newrelic:standard
pgbackups:auto-month
scheduler:standard
sentry:developer

$ heroku pg:info --app olp-main-website
=== HEROKU_POSTGRESQL_GRAY_URL (DATABASE_URL)
Plan: Dev
Status: available
Connections: 1
PG Version: 9.2.4
Created: 2013-06-03 08:36 UTC
Data Size: 6.3 MB
Tables: 0
Rows: 0/10000 (In compliance)
Fork/Follow: Unsupported

$ heroku pg:promote HEROKU_POSTGRESQL_GRAY --app olp-main-website
Promoting HEROKU_POSTGRESQL_GRAY_URL (DATABASE_URL) to DATABASE_URL... done

values hidden

$ heroku config:add --app olp-main-website AWS_ACCESS_KEY_ID=xxx
$ heroku config:add --app olp-main-website AWS_SECRET_ACCESS_KEY=xxx
$ heroku config:add --app olp-main-website AWS_STORAGE_BUCKET_NAME=xxx

$ heroku config:add --app olp-main-website DJANGO_SETTINGS_MODULE=website.settings.prod

$ heroku config:add --app olp-main-website SECRET_KEY=xxx

$ heroku ps --app olp-main-website
=== web (1X): newrelic-admin run-program gunicorn -c gunicorn.py.ini wsgi:application
web.1: up 2013/06/03 09:57:57 (~ 21m ago)

$ heroku run python manage.py collectstatic --noinput --app olp-main-website
$ heroku run python manage.py compress --app olp-main-website

HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfil the request.

django-compressor==dev Causes Error When Installing for First Time

Created new virtual environment, and changed requirements.txt to install dev requirements rather than prod. Then ran pip -r requirements.txt. Got the following error:

Downloading/unpacking django-compressor==dev (from -r reqs/common.txt (line 3))
Downloading develop (88Kb): 88Kb downloaded
Running setup.py egg_info for package django-compressor

Source in /home/andrew/.virtualenvs/simplerunlog/build/django-compressor has the version 1.2, which does not match the requirement django-compressor==dev (from -r reqs/common.txt (line 3))
Source in /home/andrew/.virtualenvs/simplerunlog/build/django-compressor has version 1.2 that conflicts with django-compressor==dev (from -r reqs/common.txt (line 3))

Changing reqs/common.txt to django-compressor==1.2 fixed the issue.

[docs] Add docs for startapp

Because of the nested apps directory, creating a new app requires two steps. This may not be obvious to new django users:

mkdir project_name/apps/APP_NAME
./manage.py startapp APP_NAME project_name/apps/APP_NAME

django-celery Commands Inconsistency

The django-skel Procfile

web: newrelic-admin run-program gunicorn -c gunicorn.py.ini wsgi:application
scheduler: python manage.py celery worker -B -E --maxtasksperchild=1000
worker: python manage.py celery worker -E --maxtasksperchild=1000

The django-celery docs claim it should read:

web: newrelic-admin run-program gunicorn -c gunicorn.py.ini wsgi:application
scheduler: python manage.py celery beat --maxtasksperchild=1000
worker: python manage.py celery worker --maxtasksperchild=1000

I don't presume to know if this has already been considered, just noticed it today as an inconsistency, so I thought I'd mention it. Cheers!

requirements in documentation not complete on ubuntu

Hi
to install the requirements on ubuntu 12.04, you have to install a lot of packages to make the pip install -r requirements.txt work:

sudo apt-get install libevent-dev postgresql libpq-dev memcached libmemcached-dev zlib1g-dev libssl-dev python-dev build-essential

And, of course.... you need django in installed to execute to use django-admin.py command.
pip install django

Django is obvious but the other requirements were some pain to get together. Maybe you can update the docs.

Amazon S3 and STATIC_URL

Hi,

I'm a newbie. Sorry if my question is too obvious.

If calling format is set to subdomain, shouldn't static url be something like this:

STATIC_URL = "https://%s.s3.amazonaws.com/static/" % AWS_STORAGE_BUCKET_NAME

Also, why isn't MEDIA_URL defined?

assets and static stub folders?

The assets and static folders are defined in settings/common.py. IMO, if they are defined already in django settings, they could be added with placeholder files. But git would require files to be placed inside the folders.

How do you feel about adding placeholder files in these folders? You already have a place where users delete your docs folder.

fabfile error

I believe there is a comma missing after the secret key entry in the fabfile

Deviations from the standard layout

Is there any reason why the wsgi.py file isn't inside project as it is in a standard Django project? Also, why is there a requirements.txt file besides the reqs directory? Are these Heroku specific?

pip can't install django-compressor

pip install -r reqs/dev.txt fails with the following error:

django-compressor has the version 1.2a2, which does not match the requirement django-compressor==dev (from -r reqs/common.txt (line 3))

Changing django-compressor to 1.2a2 fixes the issue.

Cannot import name abbrtask - Issue with django-celery in requirements

Ran into this import issue post syncdb and migrate when I tied accessing localhost on the web url

Cannot import name abbrtask

/venv/lib/python2.6/site-packages/djcelery/admin.py in
from celery.utils import abbrtask

Then came across this issue with sentry/django-celery here - getsentry/sentry#538

So just upgraded django-celery to latest version (3.0.10) and things started to work.
pip install -U django-celery

Perhaps you can upgrade the requirements file to reflect this?

Django 1.7

Hey,
i love your skeleton. Is it possible to support Django 1.7?

Active development

Is this project under active development ? The last commit is an year ago.

django-storages Upgrade Breaks S3 Import

django-skel's prod.py has the following, relevant lines that work fine under django-storages 2.5.1:

from S3 import CallingFormat
AWS_CALLING_FORMAT = CallingFormat.SUBDOMAIN

However, after upgrading to 2.6.0, the above code returns

ImportError: No module named S3

Perhaps there's a reason for this or the mistake is simply on my end. Just something I noticed on my end today. Cheers!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.