Skip to content

Commit

Permalink
final fix build :D
Browse files Browse the repository at this point in the history
  • Loading branch information
dethi committed Jun 19, 2015
1 parent c2b70d1 commit 42fccd6
Show file tree
Hide file tree
Showing 18 changed files with 32 additions and 32 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include LICENSE
include README.md
include ChangeLog
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pip install algoliasearch-django
Setup
-------------

In your Django settings, add `AlgoliaSearch` to `INSTALLED_APPS` and add two settings:
In your Django settings, add `django.contrib.algoliasearch` to `INSTALLED_APPS` and add two settings:

```python
ALGOLIA_APPLICATION_ID = 'MyAppID'
Expand All @@ -50,14 +50,14 @@ Simply call `AlgoliaSearch.register()` for each of the models you want to index.

```python
from django.apps import AppConfig
import AlgoliaSearch
from django.contrib import algoliasearch

class YourAppConfig(AppConfig):
name = 'your_app'

def ready(self):
YourModel = self.get_model('your_model')
AlgoliaSearch.register(YourModel)
algoliasearch.register(YourModel)
```

And then, don't forget the line below in the `__init__.py` file of your Django application.
Expand All @@ -69,7 +69,7 @@ default_app_config = 'your_django_app.apps.YourAppConfig'
By default, all the fields of your model will be used. You can configure the index by creating a subclass of `AlgoliaIndex`. A good place to do this is in a separeted file, like `index.py`.

```python
from AlgoliaSearch import AlgoliaIndex
from django.contrib.algoliasearch import AlgoliaIndex

class YourModelIndex(AlgoliaIndex):
fields = ('name', 'date')
Expand All @@ -78,7 +78,7 @@ class YourModelIndex(AlgoliaIndex):
index_name = 'my_index'
```

And then replace `AlgoliaSearch.register(YourModel)` with `AlgoliaSearch.register(YourModel, YourModelIndex)`.
And then replace `algoliasearch.register(YourModel)` with `algoliasearch.register(YourModel, YourModelIndex)`.

## Commands

Expand Down Expand Up @@ -110,7 +110,7 @@ class ContactIndex(AlgoliaIndex):
geo_field = 'location'


AlgoliaSearch.register(Contact, ContactIndex)
algoliasearch.register(Contact, ContactIndex)
```

# Options
Expand Down
3 changes: 0 additions & 3 deletions algoliasearch-django/admin.py

This file was deleted.

3 changes: 0 additions & 3 deletions algoliasearch-django/tests.py

This file was deleted.

1 change: 0 additions & 1 deletion algoliasearch-django/version.py

This file was deleted.

3 changes: 0 additions & 3 deletions algoliasearch-django/views.py

This file was deleted.

16 changes: 12 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
with open(path_readme) as readme:
README = readme.read()

path_version = os.path.join(os.path.dirname(__file__), 'algoliasearch-django/version.py')
path_version = os.path.join(os.path.dirname(__file__), 'src/version.py')
if sys.version_info[0] == 3:
exec(open(path_version).read())
else:
Expand All @@ -31,13 +31,21 @@
name = 'algoliasearch-django',
version = VERSION,
license = 'MIT License',
packages = ['django.contrib.algoliasearch'],
package_dir = {'django.contrib.algoliasearch': 'algoliasearch-django'},
packages = [
'django.contrib.algoliasearch',
'django.contrib.algoliasearch.management',
'django.contrib.algoliasearch.management.commands'
],
package_dir = {
'django.contrib.algoliasearch': 'src',
'django.contrib.algoliasearch.management': 'src/management',
'django.contrib.algoliasearch.management.commands': 'src/management/commands'
},
install_requires = ['django', 'algoliasearch'],
description = 'Algolia Search integration for Django',
long_description = README,
author = 'Algolia Team',
author_email = 'hey@algolia.com',
author_email = 'support@algolia.com',
url = 'https://github.com/algolia/algoliasearch-django',
keywords = ['algolia', 'pyalgolia', 'search', 'backend', 'hosted', 'cloud',
'full-text search', 'faceted search', 'django'],
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.core.management.base import BaseCommand
import django.contrib.algoliasearch
from django.contrib import algoliasearch


class Command(BaseCommand):
Expand All @@ -11,8 +11,8 @@ def add_arguments(self, parser):
def handle(self, *args, **options):
'''Run the management command.'''
self.stdout.write('Apply settings to index:')
for model in AlgoliaSearch.get_registered_model():
adapter = AlgoliaSearch.get_adapter(model)
for model in algoliasearch.get_registered_model():
adapter = algoliasearch.get_adapter(model)
if options['model'] and not (model.__name__ in options['model']):
continue

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.core.management.base import BaseCommand
import django.contrib.algoliasearch
from django.contrib import algoliasearch


class Command(BaseCommand):
Expand All @@ -12,8 +12,8 @@ def add_arguments(self, parser):
def handle(self, *args, **options):
'''Run the management command.'''
self.stdout.write('The following models were indexed:')
for model in AlgoliaSearch.get_registered_model():
adapter = AlgoliaSearch.get_adapter(model)
for model in algoliasearch.get_registered_model():
adapter = algoliasearch.get_adapter(model)
if options['model'] and not (model.__name__ in options['model']):
continue

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.core.management.base import BaseCommand
import django.contrib.algoliasearch
from django.contrib import algoliasearch


class Command(BaseCommand):
Expand All @@ -11,8 +11,8 @@ def add_arguments(self, parser):
def handle(self, *args, **options):
'''Run the management command.'''
self.stdout.write('Clear index:')
for model in AlgoliaSearch.get_registered_model():
adapter = AlgoliaSearch.get_adapter(model)
for model in algoliasearch.get_registered_model():
adapter = algoliasearch.get_adapter(model)
if options['model'] and not (model.__name__ in options['model']):
continue

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.core.management.base import BaseCommand
import django.contrib.algoliasearch
from django.contrib import algoliasearch


class Command(BaseCommand):
Expand All @@ -12,8 +12,8 @@ def add_arguments(self, parser):
def handle(self, *args, **options):
'''Run the management command.'''
self.stdout.write('The following models were reindexed:')
for model in AlgoliaSearch.get_registered_model():
adapter = AlgoliaSearch.get_adapter(model)
for model in algoliasearch.get_registered_model():
adapter = algoliasearch.get_adapter(model)
if options['model'] and not (model.__name__ in options['model']):
continue

Expand Down
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions src/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VERSION = '1.1.0'

0 comments on commit 42fccd6

Please sign in to comment.