Skip to content

Commit

Permalink
Merge branch 'changes' into 'master'
Browse files Browse the repository at this point in the history
changes from githib to gitlab for local settings, displaying user related tags

See merge request github/Django-CRM!338
  • Loading branch information
nikhila05 committed Sep 10, 2019
2 parents 3c9d8db + 7c23f59 commit e6647a5
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 81 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ ref.css.map
crm/dev_settings\.py
env
docs/build
celerybeat-schedule
celerybeat-schedule
local_settings.py
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ language: python
python:
- "3.5.2"

services:
- redis-server

#Django & Database
addons:
postgresql: "9.4"
Expand Down
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,14 @@ Installation
.. 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 settings.py file with your email host server credentials.
Then update the local_settings.py file with your email host server credentials.

.. code-block:: python
Expand Down Expand Up @@ -129,7 +130,7 @@ Credits
Contributors
------------

This project exists thanks to all the people who contribute!
This project exists thanks to all the people who contribute!

.. image:: https://opencollective.com/django-crm/contributors.svg?width=890&button=false

Expand Down
2 changes: 1 addition & 1 deletion common/templates/user_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ <h5>
<label class="acc_field_label" for="id_shipping_address" data-name="name">Profile pic</label>
<div class="profile_pic" style="text-align: left;">
{% if user_obj.profile_pic %}
{% thumbnail request.user.profile_pic "125x125" as im %}
{% thumbnail user_obj.profile_pic "125x125" as im %}
<img src="{{ im.url }}">
{% endthumbnail %}
{% else %}
Expand Down
40 changes: 40 additions & 0 deletions crm/local_settings.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import os


# Make this unique, and don't share it with anybody.
# http://www.miniwebtool.com/django-secret-key-generator/
SECRET_KEY = 'YOUR_SECRET_KEY'


# Email Server Settings
EMAIL_HOST = 'smtp.sendgrid.net'
EMAIL_HOST_USER = os.getenv('SG_USER', '')
EMAIL_HOST_PASSWORD = os.getenv('SG_PWD', '')
EMAIL_PORT = 587
EMAIL_USE_TLS = True


# Database Settings
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'dj_crm',
'USER': 'postgres',
'PASSWORD': 'root',
'HOST': os.getenv('DB_HOST', '127.0.0.1'),
'PORT': os.getenv('DB_PORT', '5432')
}
}

# Server Customizations
ADMIN_EMAIL = "you@your_email.com"
URL_FOR_LINKS = "https://crm.example.com"


# Internationalization
# https://docs.djangoproject.com/en/1.10/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'Asia/Kolkata'
USE_I18N = True
USE_L10N = True
USE_TZ = True
9 changes: 8 additions & 1 deletion crm/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'mwx@&97%!$fx_*zgj(2ygi^(s=oh5j(cqb$=+-mkd9scbt!0v0'
# Set in local_settings.py
SECRET_KEY = 'SECRET_SECRET_SECRET'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = os.getenv('DEBUG_STATUS', True)
Expand Down Expand Up @@ -332,3 +333,9 @@
},
},
}

# Load the local settings file if it exists
if os.path.isfile('crm/local_settings.py'):
from .local_settings import *
else:
print("No local settings file found")
6 changes: 3 additions & 3 deletions leads/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def get_context_data(self, **kwargs):

context["search"] = search

tag_ids = list(set(Lead.objects.values_list('tags', flat=True)))
tag_ids = list(set(self.get_queryset().values_list('tags', flat=True,)))
context["tags"] = Tags.objects.filter(id__in=tag_ids)

tab_status = 'Open'
Expand Down Expand Up @@ -378,8 +378,8 @@ def update_lead(request, pk):

lead_obj.assigned_to.clear()
lead_obj.assigned_to.add(*request.POST.getlist('assigned_to'))
else:
lead_obj.assigned_to.clear()
# else:
# lead_obj.assigned_to.clear()

if request.POST.getlist('teams', []):
user_ids = Teams.objects.filter(id__in=request.POST.getlist('teams')).values_list('users', flat=True)
Expand Down
70 changes: 20 additions & 50 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,56 +1,26 @@
amqp==2.5.0
arrow==0.14.2
atomicwrites==1.3.0
attrs==19.1.0
Babel==2.7.0
billiard==3.6.0.0
boto==2.49.0
boto3==1.9.94
botocore==1.12.196
django==2.2.4
celery==4.3.0
certifi==2019.6.16
chardet==3.0.4
codacy-coverage==1.3.11
coverage==4.5.3
cssselect==1.0.3
Django==2.2.3
django-appconf==1.0.3
django-compressor==2.2
django-phonenumber-field==2.2.0
django-simple-pagination==1.3
django-storages==1.7.1
docutils==0.14
et-xmlfile==1.0.1
idna==2.8
importlib-metadata==0.18
jdcal==1.4.1
jmespath==0.9.4
kombu==4.6.3
lxml==4.3.2
more-itertools==7.2.0
openpyxl==2.6.0
pdfkit==0.6.1
django-compressor==2.3
sorl-thumbnail==12.5.0
django-phonenumber-field==2.2.0
phonenumbers==8.10.4
Pillow==5.4.1
pluggy==0.12.0
psycopg2-binary==2.7.7
py==1.8.0
pytest==4.1.1
pytest-cov==2.6.1
pytest-django==3.4.5
python-dateutil==2.8.0
pytz==2018.9
raven==6.10.0
rcssmin==1.0.6
redis==3.2.1
django-storages==1.7
psycopg2-binary==2.8.3
arrow==0.14.5
requests==2.22.0
rjsmin==1.0.12
s3transfer==0.2.1
six==1.12.0
sorl-thumbnail==12.5.0
sqlparse==0.3.0
urllib3==1.25.3
vine==1.3.0
boto3==1.9.212
lxml==4.4.1
cssselect==1.1.0
xlrd==1.2.0
xlwt==1.3.0
zipp==0.5.2
openpyxl==2.6.3
pdfkit==0.6.1
redis==3.3.8
coverage==4.5.4
raven==6.10.0
sorl-thumbnail==12.5.0
pytest==5.1.1
pytest-django==3.5.1
codacy-coverage==1.3.11

23 changes: 0 additions & 23 deletions requirements_with_no_dependencies.txt

This file was deleted.

0 comments on commit e6647a5

Please sign in to comment.