GithubHelp home page GithubHelp logo

django-pgcli's People

Contributors

amjith avatar ashchristopher avatar junweiyu avatar

Stargazers

 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

django-pgcli's Issues

Not running on django 1.10.5

I followed installation steps and put django_pgcli in my INSTALLED_APPS but it's not running. dbshell displays the regular pg shell:

$ python manage.py dbshell
psql (9.4.13, server 9.5.7)
WARNING: psql major version 9.4, server major version 9.5.
         Some psql features might not work.
Type "help" for help.

my_project=> 

Version information:

$ pip freeze
django-pgcli==0.0.2
pgcli==1.8.1
Django==1.10.5

Incompatibility with Django 3.1

Hi!

django-pgcli doesn't seem to be compatible with Django 3.1. Here's the issue I encountered:

๐Ÿš‚  pipenv run ./manage.py dbshell
Traceback (most recent call last):
  File "./manage.py", line 20, in <module>
    execute_from_command_line(sys.argv)
  File "/Users/jrheard/.local/share/virtualenvs/djscoots-zK00EcLC-/Users/jrheard/.pyenv/shims/python/lib/python3.7/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/Users/jrheard/.local/share/virtualenvs/djscoots-zK00EcLC-/Users/jrheard/.pyenv/shims/python/lib/python3.7/site-packages/django/core/management/__init__.py", line 395, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/jrheard/.local/share/virtualenvs/djscoots-zK00EcLC-/Users/jrheard/.pyenv/shims/python/lib/python3.7/site-packages/django/core/management/base.py", line 330, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/Users/jrheard/.local/share/virtualenvs/djscoots-zK00EcLC-/Users/jrheard/.pyenv/shims/python/lib/python3.7/site-packages/django/core/management/base.py", line 371, in execute
    output = self.handle(*args, **options)
  File "/Users/jrheard/.local/share/virtualenvs/djscoots-zK00EcLC-/Users/jrheard/.pyenv/shims/python/lib/python3.7/site-packages/django/core/management/commands/dbshell.py", line 26, in handle
    connection.client.runshell(options['parameters'])
TypeError: runshell() takes 1 positional argument but 2 were given

I think that this is related to django/django@5b884d4 , a change made in Django 3.1 that modifies the signature of the .runshell() method.

I note that in that Django commit linked above, .runshell() was updated to take args self, parameters, but in https://github.com/ashchristopher/django-pgcli/blob/master/django_pgcli/__init__.py , django-pgcli's .runshell() takes args self.

That's about as deeply as I've looked into this issue - I'm not clear on the exact semantics of this parameters argument, and it's not immediately clear to me what django-pgcli should do with that argument. The main thing that I'm clear on is that the current release version of django-pgcli isn't compatible with Django 3.1 - hopefully it's an easy fix! ๐Ÿ™

Thanks for making this library! :)

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.