diff --git a/.gitignore b/.gitignore index b9ff4402..bd54a86c 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ ref.css ref.css.map .coverage crm/dev_settings\.py +env \ No newline at end of file diff --git a/accounts/admin.py b/accounts/admin.py deleted file mode 100644 index 0224ad86..00000000 --- a/accounts/admin.py +++ /dev/null @@ -1,6 +0,0 @@ -from django.contrib import admin -from accounts.models import Account -# Register your models here. - - -admin.site.register(Account) diff --git a/accounts/forms.py b/accounts/forms.py index 419f71a5..fc5d4359 100644 --- a/accounts/forms.py +++ b/accounts/forms.py @@ -1,8 +1,8 @@ from django import forms from .models import Account from common.models import Comment, Attachments -from leads.models import * -from contacts.models import * +from leads.models import Lead +from contacts.models import Contact from django.db.models import Q @@ -37,10 +37,10 @@ class AccountForm(forms.ModelForm): self.fields["billing_country"].choices = [ ("", "--Country--"), ] + list(self.fields["billing_country"].choices)[1:] self.fields["lead"].queryset = Lead.objects.all( - ).exclude(status='dead') + ).exclude(status='closed') if request_user: self.fields["lead"].queryset = Lead.objects.filter( - Q(assigned_to__in=[request_user]) | Q(created_by=request_user)).exclude(status='dead') + Q(assigned_to__in=[request_user]) | Q(created_by=request_user)).exclude(status='closed') self.fields["contacts"].queryset = Contact.objects.filter( Q(assigned_to__in=[request_user]) | Q(created_by=request_user)) diff --git a/accounts/models.py b/accounts/models.py index b0029903..bf43f95f 100644 --- a/accounts/models.py +++ b/accounts/models.py @@ -29,7 +29,9 @@ class Account(models.Model): email = models.EmailField() phone = PhoneNumberField(null=True) industry = models.CharField( - _("Industry Type"), max_length=255, choices=INDCHOICES, blank=True, null=True) + _("Industry Type"), + max_length=255, choices=INDCHOICES, + blank=True, null=True) # billing_address = models.ForeignKey( # Address, related_name='account_billing_address', on_delete=models.CASCADE, blank=True, null=True) # shipping_address = models.ForeignKey( @@ -49,14 +51,16 @@ class Account(models.Model): website = models.URLField(_("Website"), blank=True, null=True) description = models.TextField(blank=True, null=True) created_by = models.ForeignKey( - User, related_name='account_created_by', on_delete=models.SET_NULL, null=True) + User, related_name='account_created_by', + on_delete=models.SET_NULL, null=True) created_on = models.DateTimeField(_("Created on"), auto_now_add=True) is_active = models.BooleanField(default=False) tags = models.ManyToManyField(Tags, blank=True) status = models.CharField( choices=ACCOUNT_STATUS_CHOICE, max_length=64, default='open') lead = models.ForeignKey( - 'leads.Lead', related_name="account_leads", on_delete=models.SET_NULL, null=True) + 'leads.Lead', related_name="account_leads", + on_delete=models.SET_NULL, null=True) contact_name = models.CharField(pgettext_lazy( "Name of Contact", "Contact Name"), max_length=120) contacts = models.ManyToManyField( diff --git a/accounts/templates/accounts.html b/accounts/templates/accounts.html index 016669eb..ec1e69aa 100644 --- a/accounts/templates/accounts.html +++ b/accounts/templates/accounts.html @@ -2,6 +2,7 @@ {% load staticfiles %} {% load paginate %} {% block extralinks %} +{% load thumbnail %} {% endblock %} {% block content %} @@ -89,6 +90,7 @@
+ {% endif %}
+ Your account password has been changed !
" + \ - " New Password : " + \
+ message = "hello " + user.username +\
+ "
Your account password has been changed !\ +
" \ + + " New Password : " + \
request.POST.get("new_passwoord") + "
+ {% endif %}
+ | Campaign | -Receipents | -Sent | -Unique Opens | -Unique Clicks | -Actions | -
|---|---|---|---|---|---|
| Primary Sample scheduled newsletter | -5478 | -- Tue, Nov 22, 2016, 12:00AM - | -- 20.6% 125 Opened - | -- 15.5% 78 Clicked - | -- - - - | -
| Primary Sample scheduled newsletter | -5478 | -- Tue, Nov 22, 2016, 12:00AM - | -- 20.6% 125 Opened - | -- 15.5% 78 Clicked - | -- - - - | -
| Primary Sample scheduled newsletter | -5478 | -- Tue, Nov 22, 2016, 12:00AM - | -- 20.6% 125 Opened - | -- 15.5% 78 Clicked - | -- - - - | -
| Primary Sample scheduled newsletter | -5478 | -- Tue, Nov 22, 2016, 12:00AM - | -- 20.6% 125 Opened - | -- 15.5% 78 Clicked - | -- - - - | -
| Primary Sample scheduled newsletter | -5478 | -- Tue, Nov 22, 2016, 12:00AM - | -- 20.6% 125 Opened - | -- 15.5% 78 Clicked - | -- - - - | -
| Primary Sample scheduled newsletter | -5478 | -- Tue, Nov 22, 2016, 12:00AM - | -- 20.6% 125 Opened - | -- 15.5% 78 Clicked - | -- - - - | -
| Campaign | +Receipents | +Sent | +Unique Opens | +Unique Clicks | +Actions | +
|---|---|---|---|---|---|
| Primary {{ campaign.title }} | +5478 | ++ {{ campaign.created_on }} + | ++ 20.6% 125 Opened + | ++ 15.5% 78 Clicked + | ++ + + | +
| No records found! | +|||||
The following tags can only be used on the HTML version
+
+ View web version
+
+
+ Unsubscribe here
+
+ The following tags can only be used on the HTML version
+
+ View web version
+
+
+ Unsubscribe here
+
+ The following tags can be used on both Plain text or HTML version
+[Name,fallback=]
+ [Email]
+ [currentdaynumber]
+ The following tags can only be used on the HTML version
+[Name,fallback=]
+ [Email]
+ [currentdaynumber]
+ {{email_template.title}}
+{{email_template.subject}}
+ {{email_template.html|safe}} +| Sample scheduled Email template | -- | View Template | -- - - - | -
| Sample scheduled Email template | -- | View Template | -- - - - | -
| Sample scheduled Email template | -- | View Template | -- - - - | -
| Sample scheduled Email template | -- | View Template | -- - - - | -
| Sample scheduled Email template | -- | View Template | -- - - - | -
| Sample scheduled Email template | -- | View Template | -- - - - | -
| Sample scheduled Email template | -- | View Template | -- - - - | -
| Sample scheduled Email template | -- | View Template | -- - - - | -
| {{ email_template.title }} | ++ | View Template | ++ + + | +
| No Records Found! | +|||