Skip to content

Commit

Permalink
Renamed package to django-cacheback
Browse files Browse the repository at this point in the history
  • Loading branch information
codeinthehole committed Aug 5, 2012
1 parent 72b8e20 commit 33c8ba5
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 18 deletions.
6 changes: 6 additions & 0 deletions README.rst
Expand Up @@ -85,9 +85,15 @@ No you haven't.

I want to contribute
====================
Get set up by cloning, creating a virtualenv and running::

make develop

Running tests
-------------
Use::

./runtests.py

Sandbox VM
----------
Expand Down
3 changes: 2 additions & 1 deletion Vagrantfile
Expand Up @@ -3,11 +3,12 @@

Vagrant::Config.run do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.forward_port 8000, 8080
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "sandbox/puppet/manifests"
puppet.manifest_file = "site.pp"
puppet.module_path = "sandbox/puppet/modules"
puppet.options = "--debug"
#puppet.options = "--debug"
end
end
2 changes: 0 additions & 2 deletions async_cache/__init__.py

This file was deleted.

2 changes: 2 additions & 0 deletions cacheback/__init__.py
@@ -0,0 +1,2 @@
from cacheback.base import AsyncCacheJob
from cacheback.queryset import QuerySetFilterJob, QuerySetGetJob
4 changes: 2 additions & 2 deletions async_cache/base.py → cacheback/base.py
Expand Up @@ -3,9 +3,9 @@

from django.core.cache import cache

from async_cache import tasks
from cacheback import tasks

logger = logging.getLogger('async_cache')
logger = logging.getLogger('cacheback')

# We don't use memcache to handle expiry so all items are set using the max TTL.
MEMCACHE_MAX_EXPIRATION = 2592000
Expand Down
2 changes: 1 addition & 1 deletion async_cache/queryset.py → cacheback/queryset.py
@@ -1,4 +1,4 @@
from async_cache import AsyncCacheJob
from cacheback import AsyncCacheJob


class QuerySetJob(AsyncCacheJob):
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions makefile
@@ -1,3 +1,7 @@
develop:
python setup.py develop
pip install -r requirements.txt

puppet:
# Install puppet modules required to set-up sandbox server
puppet module install --target-dir sandbox/puppet/modules/ puppetlabs-rabbitmq -v 2.0.1
Expand Down
2 changes: 1 addition & 1 deletion runtests.py
Expand Up @@ -25,7 +25,7 @@
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.flatpages',
'async_cache',
'cacheback',
'djcelery',
'djcelery.transport',
'tests.dummyapp',
Expand Down
6 changes: 3 additions & 3 deletions sandbox/dummyapp/jobs.py
@@ -1,9 +1,9 @@
import async_cache
import cacheback

from dummyapp import models


class VanillaJob(async_cache.AsyncCacheJob):
class VanillaJob(cacheback.AsyncCacheJob):
fetch_on_empty = False

def fetch(self):
Expand All @@ -12,7 +12,7 @@ def fetch(self):
return models.DummyModel.objects.all()


class KeyedJob(async_cache.AsyncCacheJob):
class KeyedJob(cacheback.AsyncCacheJob):

def key(self, name):
return name
Expand Down
2 changes: 1 addition & 1 deletion sandbox/dummyapp/views.py
@@ -1,6 +1,6 @@
from django.shortcuts import render

from async_cache import QuerySetFilterJob
from cacheback import QuerySetFilterJob
from dummyapp import jobs
from dummyapp import models

Expand Down
4 changes: 2 additions & 2 deletions sandbox/settings.py
Expand Up @@ -122,7 +122,7 @@
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
'dummyapp',
'async_cache',
'cacheback',
'debug_toolbar',
'djcelery',
)
Expand Down Expand Up @@ -159,7 +159,7 @@
'level': 'ERROR',
'propagate': True,
},
'async_cache': {
'cacheback': {
'handlers': ['console'],
'level': 'DEBUG',
'propagate': False,
Expand Down
10 changes: 6 additions & 4 deletions setup.py
Expand Up @@ -3,15 +3,17 @@
from setuptools import setup, find_packages
import os

os.chdir(os.path.dirname(__file__))
PACKAGE_DIR = os.path.abspath(os.path.dirname(__file__))
os.chdir(PACKAGE_DIR)
print PACKAGE_DIR

setup(name='django-async-cache',
setup(name='django-cacheback',
version='0.1',
url='https://github.com/codeinthehole/django-async-cache',
url='https://github.com/codeinthehole/django-cacheback',
author="David Winterbottom",
author_email="david.winterbottom@gmail.com",
description="Async cache objects that use Celery to refresh",
long_description=os.path.join(os.path.dirname(__file__), 'README.rst'),
long_description=os.path.join(PACKAGE_DIR, 'README.rst'),
license='MIT',
packages=find_packages(exclude=["sandbox*", "tests*"]),
include_package_data=True,
Expand Down
2 changes: 1 addition & 1 deletion tests/job_tests.py
@@ -1,7 +1,7 @@
from django.test import TestCase
from django.core.cache import cache

from async_cache import AsyncCacheJob, QuerySetFilterJob, QuerySetGetJob
from cacheback import AsyncCacheJob, QuerySetFilterJob, QuerySetGetJob
from tests.dummyapp import models


Expand Down

0 comments on commit 33c8ba5

Please sign in to comment.