Git Product home page Git Product logo

django-invoices's Introduction

django-invoices

Build Status Coverage Status

Installation

First of all you need to download last version from the github repository

$ git clone https://github.com/tonybolanyo/django-invoices.git

After download finished, as any django project, you must follow this simple steps:

$ cd django-invoices
$ virtualenv env
$ env/bin/activate
$ pip install -r requirements/base.txt
$ cd src
$ python manage.py migrate
$ python manage.py createsuperuser
$ python manage.py runserver

After this you can see the API on your localhost. You need to login with the superuser created previously to view, create, edit or delete any object with the API. By default, only staff can use the API.

You can change the default permissions using the Django Rest Framework settings:

django-invoices/settings/base.py

...
# Set default permission for API.
# Only staff can access API

REST_FRAMEWORK = {
    'DEFAULT_PERMISSION_CLASSES': (
        'rest_framework.permissions.IsAuthenticated',
    )
}
...

django-invoices's People

Contributors

tonybolanyo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

django-invoices's Issues

Empty SECRET_KEY

Following the setup steps instructions in a virtual env, works fine until:

$ python manage.py migrate

This is the error I get:

(env) (base) C:\...\django-invoices\src>python manage.py migrate
Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "C:\...\django-invoices\env\lib
\site-packages\django\core\management\__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "C:\...\django-invoices\env\lib
\site-packages\django\core\management\__init__.py", line 395, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\...\django-invoices\env\lib
\site-packages\django\core\management\base.py", line 328, in run_from_argv
    self.execute(*args, **cmd_options)
  File "C:\...\django-invoices\env\lib
\site-packages\django\core\management\base.py", line 366, in execute
    self.check()
  File "C:\...\django-invoices\env\lib
\site-packages\django\core\management\base.py", line 392, in check
    all_issues = self._run_checks(
  File "C:\...\django-invoices\env\lib
\site-packages\django\core\management\commands\migrate.py", line 63, in _run_checks
    issues = run_checks(tags=[Tags.database])
  File "C:\...\django-invoices\env\lib
\site-packages\django\core\checks\registry.py", line 72, in run_checks
    new_errors = check(app_configs=app_configs)
  File "C:\...\django-invoices\env\lib
\site-packages\django\core\checks\database.py", line 9, in check_database_backends
    for conn in connections.all():
  File "C:\...\django-invoices\env\lib
\site-packages\django\db\utils.py", line 222, in all
    return [self[alias] for alias in self]
  File "C:\...\django-invoices\env\lib
\site-packages\django\db\utils.py", line 219, in __iter__
    return iter(self.databases)
  File "C:\...\django-invoices\env\lib
\site-packages\django\utils\functional.py", line 48, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "C:\...\django-invoices\env\lib
\site-packages\django\db\utils.py", line 153, in databases
    self._databases = settings.DATABASES
  File "C:\...\django-invoices\env\lib
\site-packages\django\conf\__init__.py", line 76, in __getattr__
    self._setup(name)
  File "C:\...\django-invoices\env\lib
\site-packages\django\conf\__init__.py", line 63, in _setup
    self._wrapped = Settings(settings_module)
  File "C:\...\django-invoices\env\lib
\site-packages\django\conf\__init__.py", line 161, in __init__
    raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.

I see there's an empty SECRET_KEY in:
.\env\Lib\site-packages\django\conf\global_settings.py

but indeed filled in:
.\src\django-invoices\settings\base.py

I'm not sure why using the empty one. That's as far as I could get troubleshooting.

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.