Giter Club home page Giter Club logo

django_postgres_extensions's People

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

Watchers

 avatar  avatar  avatar  avatar

django_postgres_extensions's Issues

is postgis enabled ?

i'm using postgis backend in my setting and i doubt about changing it to this package

Templates directory missing

Hi, on version 0.9.3, it is does not ship with the templates directory. So it is unable to load nested_form_widget.html.

Thanks

RecursionError: maximum recursion depth exceeded in comparison

Hello!
I use model from the example of ArrayManyToManyField:

class Publication(models.Model):
    title = models.CharField(max_length=30)

    def __str__(self):
        return self.title

    class Meta:
        ordering = ('title',)

class Article(models.Model):
    headline = models.CharField(max_length=100)
    publications = ArrayManyToManyField(Publication, name='publications')
 
    def __str__(self):
        return self.headline

    class Meta:
        ordering = ('headline',)

And after I start command makemigrations I get error:
RecursionError: maximum recursion depth exceeded in comparison

Could you help ?

TypeError: __init__() got an unexpected keyword argument 'form_size'

Issue with migration field

Setup

  • OS: Sierra 10.12
  • Python: 2.7.10
  • Django: 1.9.9
  • Your lib with pip:
https://github.com/primal100/django_postgres_extensions/archive/master.zip#egg=django_postgres_extensions==0.9

Model

from django_postgres_extensions.models import ArrayField as DJPEArrayField


class MyModel(models.Model):
  tags = DJPEArrayField(models.CharField(max_length=24), null=True, blank=True)

Creating the migration (there is no problem here)

operations = [
        migrations.CreateModel(
            name='MyModel',
            fields=[
                ('tags', django_postgres_extensions.models.fields.ArrayField(base_field=models.CharField(max_length=24), blank=True, form_size=None, null=True, size=None)),
            ],
        ),
    ]

Error running the migration

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/Users/rowend/Projects/buckets/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
    utility.execute()
  File "/Users/rowend/Projects/buckets/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 345, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/rowend/Projects/buckets/venv/lib/python2.7/site-packages/django/core/management/base.py", line 348, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/Users/rowend/Projects/buckets/venv/lib/python2.7/site-packages/django/core/management/base.py", line 399, in execute
    output = self.handle(*args, **options)
  File "/Users/rowend/Projects/buckets/venv/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 89, in handle
    executor = MigrationExecutor(connection, self.migration_progress_callback)
  File "/Users/rowend/Projects/buckets/venv/lib/python2.7/site-packages/django/db/migrations/executor.py", line 20, in __init__
    self.loader = MigrationLoader(self.connection)
  File "/Users/rowend/Projects/buckets/venv/lib/python2.7/site-packages/django/db/migrations/loader.py", line 49, in __init__
    self.build_graph()
  File "/Users/rowend/Projects/buckets/venv/lib/python2.7/site-packages/django/db/migrations/loader.py", line 170, in build_graph
    self.load_disk()
  File "/Users/rowend/Projects/buckets/venv/lib/python2.7/site-packages/django/db/migrations/loader.py", line 105, in load_disk
    migration_module = import_module("%s.%s" % (module_name, migration_name))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/Users/rowend/Projects/buckets/bucketspm/main/migrations/0087_mymodel.py", line 13, in <module>
    class Migration(migrations.Migration):
  File "/Users/rowend/Projects/buckets/bucketspm/main/migrations/0087_mymodel.py", line 28, in Migration
    ('tags', django_postgres_extensions.models.fields.ArrayField(base_field=models.CharField(max_length=24), blank=True, form_size=None, null=True, size=None)),
  File "/Users/rowend/Projects/buckets/venv/lib/python2.7/site-packages/django/contrib/postgres/fields/array.py", line 30, in __init__
    super(ArrayField, self).__init__(**kwargs)
TypeError: __init__() got an unexpected keyword argument 'form_size'

Solution

  • my temporal solution: remove the argument form_size from the migration file
('tags', django_postgres_extensions.models.fields.ArrayField(base_field=models.CharField(max_length=24), blank=True,  null=True, size=None)),

ArrayManyToMany not included

Hi, thank you for this library. However, I cannot import the ArrayManyToMany field. I am using version, 0.9.3

Thanks.

cannot import name 'register_hstore_handler'

Received the following error while installing this lib according to the docs.

root@4ae4fe029e54:/app# ./manage.py makemigrations
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/django/db/utils.py", line 115, in load_backend
    return import_module('%s.base' % backend_name)
  File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 978, in _gcd_import
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load
  File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
  File "/usr/local/lib/python3.6/site-packages/django_postgres_extensions/backends/postgresql/base.py", line 3, in <module>
    from .creation import DatabaseCreation
  File "/usr/local/lib/python3.6/site-packages/django_postgres_extensions/backends/postgresql/creation.py", line 1, in <module>
    from django.contrib.postgres.signals import register_hstore_handler
ImportError: cannot import name 'register_hstore_handler'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 338, in execute
    django.setup()
  File "/usr/local/lib/python3.6/site-packages/django/__init__.py", line 27, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python3.6/site-packages/django/apps/registry.py", line 108, in populate
    app_config.import_models()
  File "/usr/local/lib/python3.6/site-packages/django/apps/config.py", line 202, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 978, in _gcd_import
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load
  File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
  File "/usr/local/lib/python3.6/site-packages/django/contrib/sessions/models.py", line 3, in <module>
    from django.contrib.sessions.base_session import (
  File "/usr/local/lib/python3.6/site-packages/django/contrib/sessions/base_session.py", line 30, in <module>
    class AbstractBaseSession(models.Model):
  File "/usr/local/lib/python3.6/site-packages/django/db/models/base.py", line 124, in __new__
    new_class.add_to_class('_meta', Options(meta, app_label))
  File "/usr/local/lib/python3.6/site-packages/django/db/models/base.py", line 325, in add_to_class
    value.contribute_to_class(cls, name)
  File "/usr/local/lib/python3.6/site-packages/django/db/models/options.py", line 214, in contribute_to_class
    self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
  File "/usr/local/lib/python3.6/site-packages/django/db/__init__.py", line 33, in __getattr__
    return getattr(connections[DEFAULT_DB_ALIAS], item)
  File "/usr/local/lib/python3.6/site-packages/django/db/utils.py", line 211, in __getitem__
    backend = load_backend(db['ENGINE'])
  File "/usr/local/lib/python3.6/site-packages/django/db/utils.py", line 134, in load_backend
    raise ImproperlyConfigured(error_msg)
django.core.exceptions.ImproperlyConfigured: 'django_postgres_extensions.backends.postgresql' isn't an available database backend.
Try using 'django.db.backends.XXX', where XXX is one of:
    'mysql', 'oracle', 'postgresql', 'sqlite3'
Error was: cannot import name 'register_hstore_handler'


issue in installing

for Python 3.4.3:

pip install django-postgres-extensions
Collecting django-postgres-extensions
Using cached django_postgres_extensions-0.91.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/pf/rd6y8q8x5yldbz4m1mb7xdyr0000gn/T/pip-build-r9fif_w7/django-postgres-extensions/setup.py", line 8, in
long_description=open('readme.md').read(),
FileNotFoundError: [Errno 2] No such file or directory: 'readme.md'

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/pf/rd6y8q8x5yldbz4m1mb7xdyr0000gn/T/pip-build-r9fif_w7/django-postgres-extensions/

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.