Skip to content

Commit ee76a42

Browse files
pp
1 parent cd3bebe commit ee76a42

File tree

533 files changed

+43
-30215
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

533 files changed

+43
-30215
lines changed

.gitignore

-1
This file was deleted.

nsnco/Procfile Procfile

File renamed without changes.

nsnco/db.sqlite3 db.sqlite3

268 KB
Binary file not shown.

nsnco/manage.py manage.py

File renamed without changes.

nsnco/mydatabase mydatabase

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

nsnco/nsn/asgi.py nsn/asgi.py

File renamed without changes.

nsnco/nsn/forms.py nsn/forms.py

File renamed without changes.
File renamed without changes.
File renamed without changes.

nsnco/nsn/tokens.py nsn/tokens.py

File renamed without changes.

nsnco/nsn/urls.py nsn/urls.py

File renamed without changes.

nsnco/nsn/utils.py nsn/utils.py

File renamed without changes.

nsnco/nsn/views.py nsn/views.py

File renamed without changes.

nsnco/nsn/wsgi.py nsn/wsgi.py

File renamed without changes.
-3.55 KB
Binary file not shown.
File renamed without changes.
4.05 KB
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

nsnco/profiles/views.py profiles/views.py

+40-14
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ def artist(request, artist_id):
3838

3939
artist.name = request.POST['name']
4040
artist.email = request.POST['email']
41-
print(request.POST)
4241

4342
if request.FILES:
4443
artist.profilePic = request.FILES['profilePic']
@@ -50,7 +49,7 @@ def artist(request, artist_id):
5049

5150
artist.profilePic = File(open('test.png', 'rb'))
5251

53-
#artist.profilePic = request.POST['profilePic']
52+
# artist.profilePic = request.POST['profilePic']
5453
artist.skill = request.POST['skill']
5554
artist.location = request.POST['location']
5655
artist.profesionalRating = request.POST['profesionalRating']
@@ -69,8 +68,25 @@ def artist(request, artist_id):
6968

7069
try:
7170
artist.hasManager = True if request.POST['manager'] == 'on' else False
71+
72+
if artist.hasManager:
73+
if artist.manager is not None:
74+
artist.manager.name = request.POST['managerName']
75+
artist.manager.email = request.POST['managerEmail']
76+
artist.manager.phone = request.POST['managerPhone']
77+
artist.manager.save()
78+
else:
79+
artist.manager = Manager.objects.create(
80+
name=request.POST['managerName'],
81+
email=request.POST['managerEmail'],
82+
phone=request.POST['managerPhone'],
83+
)
84+
artist.manager.save()
85+
7286
except:
7387
artist.hasManager = False
88+
artist.manager.delete()
89+
artist.manager = None
7490

7591
try:
7692
artist.age = request.POST['age']
@@ -97,7 +113,6 @@ def artist(request, artist_id):
97113

98114
def addArtist(request):
99115
if request.method == "POST":
100-
print(request.POST)
101116

102117
artist = Artist.objects.create()
103118
artist.name = request.POST['name']
@@ -109,6 +124,26 @@ def addArtist(request):
109124
artist.attitudeRating = request.POST['attitudeRating']
110125
artist.otherArts = request.POST['otherPerformingArts']
111126

127+
artist.languages = request.POST.getlist('languages')
128+
artist.genre = request.POST.getlist('genre')
129+
artist.budgetIdea = request.POST['budgetIdea']
130+
131+
artist.pmNotes = request.POST['PMNotes']
132+
artist.amNotes = request.POST['AMNotes']
133+
134+
artist.agreement = request.POST['agreement']
135+
artist.budgetRange = request.POST['budgetRange']
136+
137+
artist.hasManager = True if request.POST['manager'] == 'on' else False
138+
print("here")
139+
if artist.hasManager:
140+
artist.manager = Manager.objects.create(
141+
name=request.POST['managerName'],
142+
email=request.POST['managerEmail'],
143+
phone=request.POST['managerPhone'],
144+
)
145+
artist.manager.save()
146+
112147
try:
113148
artist.languages = request.POST['languages']
114149
except:
@@ -133,25 +168,16 @@ def addArtist(request):
133168
pass
134169

135170
artist.save()
136-
context = {
137-
'User': request.user,
138-
'Artist': artist,
139-
'skills': SKILLS,
140-
'locations': LOCATION,
141-
'genres': GENRES,
142-
'languages': LANGUAGE,
143-
144-
}
145171

146-
return render(request, 'main/artist.html',
147-
context=context)
172+
return redirect('profiles:index')
148173
context = {
149174
'User': request.user,
150175
'Artist': None,
151176
'skills': SKILLS,
152177
'locations': LOCATION,
153178
'languages': LANGUAGE,
154179
'genres': GENRES,
180+
'Manager': None,
155181
}
156182
return render(request, 'main/artist.html', context=context)
157183

static/admin/css/autocomplete.css

-275
This file was deleted.

0 commit comments

Comments
 (0)