These are chat archives for dukeayers/cs399_agency

19th
Feb 2015
breadraptor
@breadraptor
Feb 19 2015 00:07
I'm getting it too, gonna check it out right now
lmk243
@lmk243
Feb 19 2015 00:15
Thanks a bunch I think it's in the for each loops but I'm not sure why it's happening
breadraptor
@breadraptor
Feb 19 2015 00:28
well, flushing the db didn't fix it
lmk243
@lmk243
Feb 19 2015 00:30
Maybe a syntax error but it looks right to me.
breadraptor
@breadraptor
Feb 19 2015 00:34
I fixed it by commenting a line out
in models.py
pushed the temporary fix haha
hm... looks like commenting out the poster line broke the one form we had. :(
lmk243
@lmk243
Feb 19 2015 00:44
How did it break the form? What is the poster anyway? Sounded like an image to me but I didn't look too far into what it was
breadraptor
@breadraptor
Feb 19 2015 00:46
wait, no. it didn't break the form.
the link to the cookie form is going to campaign/2 for some reason
I don't know what the poster field is for tbh
I'll work on getting it directing to campaign/1 again
lmk243
@lmk243
Feb 19 2015 01:17
I think the reason for the two is in the migration. I think it's from the 0,2 in there
breadraptor
@breadraptor
Feb 19 2015 01:19
0,2 where?
lmk243
@lmk243
Feb 19 2015 01:22
Nevermind I forgot I didn't commit that. Then I'm not sure where the 2 is coming from. I added a 2 in my local copy to try and offset the array for my form
breadraptor
@breadraptor
Feb 19 2015 01:23
oic
yeah i can't figure out why it's doing that :(
lmk243
@lmk243
Feb 19 2015 01:28
Yeah I'm afraid to try and test my form until it's figured out. :(
breadraptor
@breadraptor
Feb 19 2015 01:29
haha you should go for it, you can't break anything if it's local!
lmk243
@lmk243
Feb 19 2015 01:29
True so what you pushed up allows you to at least view the pages?
breadraptor
@breadraptor
Feb 19 2015 01:30
yep, no more operational error
lmk243
@lmk243
Feb 19 2015 01:33
Cool thanks I'll see if I can get my page working
lmk243
@lmk243
Feb 19 2015 01:56
Having some issues getting my page to show up. I added it to the 0002 file in migrations but it's not showing up.
breadraptor
@breadraptor
Feb 19 2015 01:59
did you make a new migration, flush the db, then migrate?
lmk243
@lmk243
Feb 19 2015 02:00
Said it was up to date when I tried to make a migration
breadraptor
@breadraptor
Feb 19 2015 02:00
yeah you have to make a brand new one
do 'python manage.py makemigrations agency --empty'
then copy paste everything from 0002 into the new one (probably called 0003 or whatever)
lmk243
@lmk243
Feb 19 2015 02:01
Okay I'll try that thanks
breadraptor
@breadraptor
Feb 19 2015 02:01
then do 'python manage.py flush' and say yes, then do 'python manage.py migrate'
this made the cookie campaign on campaign/2 oddly but i'm working on that...
lmk243
@lmk243
Feb 19 2015 02:06
That worked thanks :) But the form fields from campaign are missing. Not sure how to add those
breadraptor
@breadraptor
Feb 19 2015 02:09
in campaign.html you might have to change campaign.id==1 to campaign.id==2. this is a temporary fix... duke explained to me that the ID is auto-incremented but when we flush it it doesn't recent the increment...
lmk243
@lmk243
Feb 19 2015 02:10
Okay I figured it had to be an offset issue. Thanks I'll try that
Yeah mine was now id 3 since the first was id 2 so I changed it to campaign.id == 3 and that fixed it
lmk243
@lmk243
Feb 19 2015 02:15
Thanks so much for all the help :D
breadraptor
@breadraptor
Feb 19 2015 02:15
i see. this is clearly some kind of internal django issue. I'm gonna try hardcoding the PKs.
np!
lmk243
@lmk243
Feb 19 2015 02:15
Okay shall I commit my page?
My awesome glitter bomb campaign haha
breadraptor
@breadraptor
Feb 19 2015 02:18
do it!
make sure to commit the migration too
lmk243
@lmk243
Feb 19 2015 02:20
Yep I'll copy my version and replace the old
Is the 0002 file needed anymore?
breadraptor
@breadraptor
Feb 19 2015 02:22
you can leave it in, i'm not sure if deleting it would mess up people on pycharm.
they just need to call migrate and then merge the two
lmk243
@lmk243
Feb 19 2015 02:23
Yeah I got a 0004merge file in there too for some reason. Think I had to merge or it wouldn't let me run it
breadraptor
@breadraptor
Feb 19 2015 02:23
yeah
lmk243
@lmk243
Feb 19 2015 02:23
keep that one too?
Duke Ayers
@dukeayers
Feb 19 2015 02:29
Honestly, the best way I found to do this is to drop all of the tables in the db and then makemigration again
lmk243
@lmk243
Feb 19 2015 02:31
I did that but it forced me to merge by giving me an error. Pushed it up and it should be working
Duke Ayers
@dukeayers
Feb 19 2015 02:38
Just updated that for you
Just needed to delete the second migration and delete the merged file as well
lmk243
@lmk243
Feb 19 2015 02:41
Thanks so much :)
Duke Ayers
@dukeayers
Feb 19 2015 02:59
So I suck... sorry about the fifty updates just now
Duke Ayers
@dukeayers
Feb 19 2015 03:54
Alright, so I am going to call it good on the project. I made a few adjustments
breadraptor
@breadraptor
Feb 19 2015 05:21
did a few cosmetic changes :) before we turn this in, we should do some auto indenting if that's a thing for html
Duke Ayers
@dukeayers
Feb 19 2015 05:21
What do you mean??
Duke Ayers
@dukeayers
Feb 19 2015 05:29
I did the auto indent on the thanks page but it looks like we are pretty good in almost all of the files
pycharm has an auto format
breadraptor
@breadraptor
Feb 19 2015 05:32
that's all i meant, i know in virtual worlds he marked people off for having weird indents
breadraptor
@breadraptor
Feb 19 2015 08:03
I made a new form for the gerbil delivery so we have more than one. :D let me know if anything's wrong
Christopher Heiser
@cmh553
Feb 19 2015 22:48
Yeah is there anything else to be done? Looks like we hit all the requirements.