diff --git a/.gitignore b/.gitignore index f153405..53ebebd 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,7 @@ media media-images cache .idea -CACHE/ +static/CACHE .sass-cache/ main.css main.css.map @@ -16,6 +16,10 @@ ref.css.map .coverage crm/dev_settings\.py env +.env docs/build celerybeat-schedule local_settings.py +media +.sass-cache +server.log diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 01ee88f..0ade08d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,44 +1,15 @@ -Python 3.5.2: - script: - - export PY_EXE=python3.5.2 - - virtualenv -p python3 env - - source env/bin/activate - - pip install --no-cache-dir -r requirements.txt - - python manage.py test --keepdb --parallel --noinput - - coverage run --source=accounts,cases,common,contacts,leads,opportunity,tasks,invoices,events,teams,marketing manage.py test --keepdb --noinput - - coverage report -m - except: - - tags - -deploy_mp: - stage: deploy - environment: - name: live - script: - - sudo /bin/rm -rf /home/dj_crm/dj_crm/; cp -r . /home/dj_crm/dj_crm - - source /home/dj_crm/env/bin/activate - - pip install -r /home/dj_crm/dj_crm/requirements.txt - - python /home/dj_crm/dj_crm/manage.py migrate --noinput - - sudo /etc/init.d/uwsgi restart - - sudo /usr/bin/supervisorctl restart all - only: - - master - tags: - - djcrm_micropyramid - deploy_live: stage: deploy environment: name: live script: - - sudo /bin/rm -rf /home/dj_crm/dj_crm/; cp -r . /home/dj_crm/dj_crm - - source /home/dj_crm/env/bin/activate - - pip install -r /home/dj_crm/dj_crm/requirements.txt - - python /home/dj_crm/dj_crm/manage.py migrate --noinput - - python /home/dj_crm/dj_crm/manage.py rebuild_index --noinput - - sudo /etc/init.d/uwsgi restart + - df -h + - sudo /bin/rm -rf /home/bottlecrm/bottlecrm/; cp -r . /home/bottlecrm/bottlecrm/ + - source /home/bottlecrm/env/bin/activate + - pip install -r /home/bottlecrm/bottlecrm/requirements.txt + - python /home/bottlecrm/bottlecrm/manage.py migrate --noinput - sudo /usr/bin/supervisorctl restart all only: - master tags: - - github-crm + - bottlecrm-com diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..46f616b --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,6 @@ +repos: + - repo: https://github.com/ambv/black + rev: stable + hooks: + - id: black + language_version: python3.6 diff --git a/.travis.yml b/.travis.yml index a1b5b2c..323fbb1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: python python: - - "3.5.2" + - "3.6.9" services: - redis-server @@ -13,7 +13,7 @@ addons: sudo: required env: - -DJANGO=1.11 + -DJANGO=3.0.6 before_install: - gem install sass diff --git a/README.md b/README.md new file mode 100644 index 0000000..83b1de3 --- /dev/null +++ b/README.md @@ -0,0 +1,80 @@ +Django-CRM +========== + +Django CRM is opensource CRM developed on django framework. It has all +the basic features of CRM to start with. We welcome code contributions +and feature requests via github. + + for latest documentation + +This project contains the following modules. + +> - Contacts +> - Accounts +> - Invoices +> - Cases +> - Leads +> - Opportunity +> - Planner + +## Try for free [here](https://bottlecrm.com/) +--- + +# Installation +We recommend ubuntu 18.04 or ubuntu 20.04. These instructions are verified for ubuntu 20.04 + +#### System Requirements +--- + +``` +sudo apt install postgresql xvfb libfontconfig wkhtmltopdf git libpq-dev python3-dev python3-pip gem ruby ruby-dev build-essential libssl-dev libffi-dev python3-venv redis-server redis-tools -y + +sudo gem install sass + +``` + +#### Install dependencies +--- + +``` +pip install -r requirements.txt +``` + +#### env variables +* Then refer to env.md for environment variables and keep those in the .env file in the current folder as your project is in. Refer https://github.com/theskumar/python-dotenv +* add ```127.0.0.1 test.localhost``` to your hosts file ```/etc/hosts``` Then you can use test as company name to register and login +#### next steps +``` +python manage.py migrate +python manage.py runserver +``` +Then open http://localhost:8000 in your borwser and create a new account with test as company name. We mapped test.localhost to 127.0.0.1 So, it should work properly. + +Community +========= + +Get help or stay up to date. + +- [Issues]() +- Follow [@micropyramid]() on Twitter +- Ask questions on [Stack Overflow]() +- Chat with community [Gitter]() +- For customisations, email to + +Credits +------- + +### Contributors + +This project exists thanks to all the people who contribute! + +![image](https://opencollective.com/django-crm/contributors.svg?width=890&button=false) + + +Feature requests and bug reports +================================ + +We welcome your feedback and support, raise github issue if you want to +report a bug or request new feature. we are glad to help. + +For commercial support [Contact us](https://micropyramid.com/contact-us/) \ No newline at end of file diff --git a/README.rst b/README.rst deleted file mode 100644 index 37f6910..0000000 --- a/README.rst +++ /dev/null @@ -1,169 +0,0 @@ -Django-CRM -========== - -Django CRM is opensource CRM developed on django framework. It has all the basic features of CRM to start with. We welcome code contributions and feature requests via github. - -.. list-table:: - :header-rows: 1 - :widths: 50 50 150 90 - :stub-columns: 1 - - * - Build Status - - Codacy - - Docker - - Support - * - .. image:: https://travis-ci.org/MicroPyramid/Django-CRM.svg?branch=master - :target: https://travis-ci.org/MicroPyramid/Django-CRM - :alt: Travis - - .. image:: https://landscape.io/github/MicroPyramid/Django-CRM/master/landscape.svg?style=flat - :target: https://landscape.io/github/MicroPyramid/Django-CRM/master - :alt: Code Health - - - .. image:: https://api.codacy.com/project/badge/Grade/b11da5f09dd542479fd3bd53944595d2 - :target: https://app.codacy.com/project/ashwin/Django-CRM/dashboard - :alt: Codacy Dashboard - .. image:: https://coveralls.io/repos/github/MicroPyramid/Django-CRM/badge.svg?branch=master - :target: https://coveralls.io/github/MicroPyramid/Django-CRM?branch=master - :alt: Codacy Coverage - - - .. image:: https://img.shields.io/docker/automated/micropyramid/django-crm.svg - :target: https://github.com/MicroPyramid/Django-CRM - :alt: Docker Automated - .. image:: https://img.shields.io/docker/build/micropyramid/django-crm.svg - :target: https://github.com/MicroPyramid/Django-CRM - :alt: Docker Build Passing - .. image:: https://img.shields.io/docker/stars/micropyramid/django-crm.svg - :target: https://hub.docker.com/r/micropyramid/django-crm/ - :alt: Docker Stars - .. image:: https://img.shields.io/docker/pulls/micropyramid/django-crm.svg - :target: https://hub.docker.com/r/micropyramid/django-crm/ - :alt: Docker Pulls - - - .. image:: https://badges.gitter.im/Micropyramid/Django-CRM.png - :target: https://gitter.im/MicroPyramid/Django-CRM - :alt: Gitter - .. image:: https://www.codetriage.com/micropyramid/django-crm/badges/users.svg - :target: https://www.codetriage.com/micropyramid/django-crm - :alt: Code Helpers - .. image:: https://img.shields.io/github/license/MicroPyramid/Django-CRM.svg - :target: https://pypi.python.org/pypi/Django-CRM/ - .. image:: https://opencollective.com/django-crm/backers/badge.svg - :alt: Backers on Open Collective - :target: #backers - .. image:: https://opencollective.com/django-crm/sponsors/badge.svg - :alt: Sponsors on Open Collective - :target: #sponsors - - -http://django-crm.readthedocs.io for latest documentation - - -This project contains the following modules. - - * Contacts - * Accounts - * Cases - * Leads - * Opportunity - * Planner - - -Try -=== - -Demo Available `here`_. - -Demo credentials for Django CRM: - - * **Email:** admin@micropyramid.com - * **Password:** admin - - -Installation -============ - -* Install the dependencies - - .. code-block:: python - - pip install -r requirements.txt - cp crm/local_settings.example crm/local_settings.py - python manage.py makemigrations - python manage.py createsuperuser - python manage.py runserver - - This will install all the required dependencies for django-crm. - - Then update the local_settings.py file with your email host server credentials. - - .. code-block:: python - - EMAIL_HOST = - EMAIL_HOST_USER = - EMAIL_HOST_PASSWORD = - - These settings allow django-crm to send emails. - After this download and install the System Requirements. - - -System Requirements -=================== - -- wkhtmltopdf (https://wkhtmltopdf.org/downloads.html) -- sass (https://www.npmjs.com/package/sass) or (https://rubygems.org/gems/sass) - -Community -========= - -Get help or stay up to date. - -- [Contribute on Issues](https://github.com/MicroPyramid/Django-CRM/issues) -- Follow [@micropyramid](https://twitter.com/micropyramid) on Twitter -- Ask questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/django-crm) -- Chat with community [Gitter](https://gitter.im/MicroPyramid/Django-CRM) -- For customisations, email django-crm@micropyramid.com - -Credits -+++++++ - -Contributors ------------- - -This project exists thanks to all the people who contribute! - -.. image:: https://opencollective.com/django-crm/contributors.svg?width=890&button=false - -Backers -------- - -Thank you to all our backers! `Become a backer`__. - -.. image:: https://opencollective.com/django-crm/backers.svg?width=890 - :target: https://opencollective.com/django-crm#backers - -__ Backer_ -.. _Backer: https://opencollective.com/django-crm#backer - -Sponsors --------- - -Support us by becoming a sponsor. Your logo will show up here with a link to your website. `Become a sponsor`__. - -.. image:: https://opencollective.com/django-crm/sponsor/0/avatar.svg - :target: https://opencollective.com/django-crm/sponsor/0/website - -__ Sponsor_ -.. _Sponsor: https://opencollective.com/django-crm#sponsor - - - -Feature requests and bug reports -================================ -We welcome your feedback and support, raise github issue if you want to report a bug or request new feature. we are glad to help. - -Need additional commercial support? `Contact us here`_ - -.. _contact us here: https://micropyramid.com/contact-us/ - -.. _here: https://django-crm.micropyramid.com/ diff --git a/accounts/models.py b/accounts/models.py index 5085359..2550056 100644 --- a/accounts/models.py +++ b/accounts/models.py @@ -91,8 +91,8 @@ def get_complete_address(self): self.get_billing_country_display(), ] address = utils.append_str_to(address, *add_to_address) - return address + return address @property def created_on_arrow(self): diff --git a/accounts/templates/accounts.html b/accounts/templates/accounts.html index e8a9ec6..6634745 100644 --- a/accounts/templates/accounts.html +++ b/accounts/templates/accounts.html @@ -1,5 +1,5 @@ {% extends 'sales/base.html' %} -{% load staticfiles %} +{% load static %} {% load paginate %} {% load thumbnail %} {% block extralinks %} diff --git a/accounts/templates/create_account.html b/accounts/templates/create_account.html index f1e3f20..bcd3993 100644 --- a/accounts/templates/create_account.html +++ b/accounts/templates/create_account.html @@ -1,5 +1,5 @@ {% extends 'sales/base.html' %} -{% load staticfiles %} +{% load static %} {% block breadcrumb %} {% block extralinks %} diff --git a/accounts/templates/create_mail_accounts.html b/accounts/templates/create_mail_accounts.html index 3f843b2..022c82e 100644 --- a/accounts/templates/create_mail_accounts.html +++ b/accounts/templates/create_mail_accounts.html @@ -1,5 +1,5 @@ {% extends 'sales/base.html' %} -{% load staticfiles %} +{% load static %} {% load paginate %} {% block extralinks %} {% load thumbnail %} diff --git a/accounts/templates/error_template.html b/accounts/templates/error_template.html index fc91a7e..72690fa 100644 --- a/accounts/templates/error_template.html +++ b/accounts/templates/error_template.html @@ -1,5 +1,5 @@ {% extends 'base.html' %} -{% load staticfiles %} +{% load static %} {% load paginate %} {% block content %} diff --git a/accounts/templates/view_account.html b/accounts/templates/view_account.html index 4818753..d4a03af 100644 --- a/accounts/templates/view_account.html +++ b/accounts/templates/view_account.html @@ -1,5 +1,5 @@ {% extends 'sales/base.html' %} -{% load staticfiles %} +{% load static %} {% load thumbnail %} {% block breadcrumb %} diff --git a/accounts/views.py b/accounts/views.py index 5e6516d..4098e38 100644 --- a/accounts/views.py +++ b/accounts/views.py @@ -768,4 +768,3 @@ def get_email_data_for_account(request): return JsonResponse(ctx) else: return JsonResponse({"error": True, "data": "No emails found."}) - diff --git a/cases/templates/cases.html b/cases/templates/cases.html index f72e07e..87f8821 100644 --- a/cases/templates/cases.html +++ b/cases/templates/cases.html @@ -1,5 +1,5 @@ {% extends 'sales/base.html' %} -{% load staticfiles %} +{% load static %} {% load paginate %} {% block extralinks %}