-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
25 changed files
with
742 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
from django.contrib import admin | ||
from django.contrib.auth.models import User | ||
from .models import BusinessPartner, Opportunity | ||
from .models import BusinessPartner, Opportunity, Lead, Contact | ||
|
||
class OpportunityAdmin(admin.ModelAdmin): | ||
pass | ||
|
||
admin.site.register(BusinessPartner) | ||
admin.site.register(Opportunity, OpportunityAdmin) | ||
admin.site.register(Lead) | ||
admin.site.register(Contact) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,28 @@ | ||
from django import forms | ||
from .models import Opportunity, BusinessPartner | ||
from django.contrib.auth.models import User | ||
from .models import Opportunity, BusinessPartner, Contact, Lead | ||
|
||
class OpportunityForm(forms.ModelForm): | ||
class Meta: | ||
model = Opportunity | ||
fields = ['name', 'customer', 'amount', 'probability', 'status'] | ||
|
||
class OpportunityForm(forms.ModelForm): | ||
class Meta: | ||
model = Opportunity | ||
fields = ['name', 'customer', 'amount', 'probability', 'status'] | ||
class BusinessPartnerForm(forms.ModelForm): | ||
user = forms.ModelChoiceField(queryset=User.objects.all(), required=False) | ||
industry = forms.ChoiceField(choices=BusinessPartner.INDUSTRY_CHOICES) | ||
primary_role = forms.ChoiceField(choices=BusinessPartner.PRIMARY_ROLE_CHOICES) | ||
secondary_role = forms.ChoiceField(choices=BusinessPartner.SECONDARY_ROLE_CHOICES) | ||
|
||
class BusinessParnterForm(forms.ModelForm): | ||
class Meta: | ||
model = BusinessPartner | ||
fields = ['name', 'email', 'phone', 'industry', 'primary_role', 'secondary_role'] | ||
fields = ['name', 'name2', 'vat', 'email', 'phone', 'country', 'state', 'postcode', 'city', 'street_name', 'street_number', 'industry', 'primary_role', 'secondary_role', 'user'] | ||
|
||
class ContactForm(forms.ModelForm): | ||
class Meta: | ||
model = Contact | ||
fields = ['first_name', 'last_name', 'academic_title', 'email', 'phone', 'title', 'job_function', 'business_partner', 'address', 'notes', 'last_contacted', 'preferred_communication'] | ||
|
||
class LeadForm(forms.ModelForm): | ||
class Meta: | ||
model = Lead | ||
fields = ['name', 'email', 'phone', 'business_partner', 'contact', 'status', 'notes'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 0 additions & 23 deletions
23
crm/migrations/0002_alter_customer_primary_role_and_more.py
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.