CRM, billing and staffing management web tool for consulting company
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
actionset minor cleanup Nov 20, 2016
batch Move some parameters from file to database Aug 17, 2017
billing Add basic internal billing information to pre billing report Sep 2, 2017
core Add total billed during timeframe Aug 26, 2018
crm cleanup May 11, 2018
data/documents Move documents folder Sep 9, 2014
expense Display expense actions as button instead of labels May 24, 2018
leads fix lead price bucketisation Sep 10, 2018
locale/fr/LC_MESSAGES translation update Sep 10, 2018
media expense receipt in XXL format :-) May 17, 2018
migrate Migration scripts to new CRM v2 model Mar 2, 2012
people display staled missions (that need to be updated or achived) on consu… Jan 7, 2018
pydici fix debug-toolbar jquery path May 17, 2018
staffing small perf optim May 11, 2018
templates Add preset for margin over budget Sep 10, 2018
.gitignore ignore jupyter checkpoint directory Sep 2, 2017
.travis.yml add email notif for travis failed build May 8, 2016
README.markdown Fixed Documentation Typos Oct 29, 2017
i18n.sh exclude node_modules directory from i18n May 16, 2017
manage.py First step toward the long road to django 1.5. Jun 5, 2013
requirements-sklearn.txt Define sklearn, numpy & scipy tested releases Aug 30, 2017
requirements.txt upgrade some deps May 11, 2018
run-dev-server.sh upgrade to django-extension 1.9. Switch to werkzeug by default for de… Aug 28, 2017
run-pydici-tests On the road to django 1.8. All unit tests are ok. May 10, 2015

README.markdown

Build Status

Pydici is a software for consulting/IT services company to manage:

  • commercial leads workflow (from business detection to sales)
  • workload schedule to forecast people activity

It is written in Python using the Django framework.

LICENSE

Pydici is available under the GNU Affero Public License v3 or newer (AGPL 3+). http://www.gnu.org/licenses/agpl-3.0.html

AUTHOR

Sébastien Renard (Sebastien.Renard@digitalfox.org).

INSTALLATION

Pydici can be installed as any Django project. Just drop the code somewhere and setup Apache.

To install all python prerequisites, please do the following: pip install -r requirements.txt. It is strongly advised to use a virtual env.

Detailed Installation

Drop source code in a directory readable by your apache user git clone https://github.com/digitalfox/pydici.git

Create a virtual env in a directory readable by your apache user and activate it virtual-env venv . venv/bin/activate

Install prerequisites : pip install -r /requirements.txt

Setup your favorite database (mysql/mariaDB or postgresql) and create a schema/base (with UTF-8 character set please) with a valid user that can create/alter/select/delete/update its objects.

Configure your database in pydici/settings.py. Look at django docs to understand the various database options.

Create tables with :

./manage.py migrate

Generate a new secret key with ./manage.py generate_secret_key and put it in pydici/settings.py

Collect static files with ./manage.py collectstatic

Setup your apache virtual env:

Setup in cron (or your favorite scheduler) the followings tasks (adapt the schedule and options to your needs):

5 2  * * *      <path to pydici>/venv/python -W ignore::DeprecationWarning <path to pydici>/manage.py clearsessions                    # Purge expired sessions in database
0 6 1 * *       <path to pydici>/venv/python -W ignore::DeprecationWarning <path to pydici>/batch/timesheet_check.py                   # Warn for incomplete and surbooking timesheet for past month
0 6 2-31 * *    <path to pydici>/venv/python -W ignore::DeprecationWarning <path to pydici>/batch/timesheet_check.py -w                # Warn for incomplete timesheet for past month
0 6 21-31 * *   <path to pydici>/venv/python -W ignore::DeprecationWarning <path to pydici>/batch/timesheet_check.py -m current -d 20  # Warn for incomplete timesheet on current month for 20th first days
0 * * * *       <path to pydici>/venv/python -W ignore::DeprecationWarning <path to pydici>/manage.py process_tasks -d 3600            # Process tasks for 1 hour

Updating an existing installation

After pulling the latest changes, you need to update the database.

There are three possible situations, depending on whether your installation uses Django Migration, uses South or does not use a migration system at all. Your installation uses South if there is a south_migrationhistory

  1. Your installation already uses Django Migration. Run these commands:

     ./manage.py migrate
     ./manage.py createsuperuser
    
  2. Your installation uses South:

    Firstly you need to checkout the last pydici version using South "pydici/master", then run these commands:

     ./manage.py syncdb
     ./manage.py migrate
    

    After that you can update to to a newer version of pydici then :

     ./manage.py migrate auth
     ./manage.py migrate contenttypes
     ./manage.py migrate --fake  # for internal pydici apps
    

    Once this is done, future updates will be handled as situation #1.

  3. Your installation does not use Django Migration or South yet.

    Firstly you need to checkout the last pydici version using South "pydici/master", then run these commands:

     ./manage.py syncdb
     ./manage.py migrate --all 0001 --fake
     ./manage.py migrate
    

    After that you can update to to a newer version of pydici by running:

     ./manage.py migrate --fake
    

    Once this is done, future updates will be handled just like situation #1.

Notes about scikit learn

Scikit learn is a machine learning framework for python. It is an optional Pydici deps that can predict leads tags and state. Some comments:

  • You need to install scikit-learn, numpy and scipy (pip install -r requirements-sklearn.txt)
  • You might need to add the following directive in your apache virual host file to avoid some nasty deadlock during init when using scikit learn : WSGIApplicationGroup %{GLOBAL}
  • For proper model caching, you might need to increase memcached object size (1m => 10m) as well as your python client memcache (hardcoded in lib for python-memcached...sic).

Notes about javascript tests

If you want to run javascript tests, you need to install node, phantomjs and casperjs. Node may be included in your distribution. For the two others, here's how to install localy, without any root access:

    npm install phantomjs
    npm install casperjs

Migrate data from environment

On source:

./manage.py dumpdata -o dump.json -e contenttypes -e auth.Permission --natural-foreign

On target:

create empty database and play migrations
./manage.py loaddata dump.json

Hosting, support, professional services, custom developpement

See http://www.enioka.com/pydici-web/