18:23 PM
Stranger6667 has quit
18:24 PM
massacr3
haha ok
18:24 PM
Bin4ry
massacr3: it covers how to build a blog with entries listing / linking
18:24 PM
massacr3
name sounds funny though
18:24 PM
thanks mate
18:24 PM
alexgordon has quit
18:25 PM
lumidify joined the channel
18:25 PM
lumidify has quit
18:25 PM
lumidify joined the channel
18:26 PM
ilhami
should I create the .gitignore in my project root? That's what it says so that's what I am doing.
18:26 PM
mrmayhem joined the channel
18:26 PM
mrmayhem
I have built my API using DRF. Now, I'm working on integrating Angular. How do I switch the URL routing from django's to Angular's routes.js???
18:27 PM
Bin4ry
ilhami: yes.
18:27 PM
aclark has quit
18:27 PM
nk1 joined the channel
18:28 PM
ilhami
and should the requirements.txt also be in the project root?
18:28 PM
dcrouch joined the channel
18:28 PM
Bin4ry
ilhami: yes. alongside with manage.py
18:29 PM
Quitta joined the channel
18:29 PM
gsingh joined the channel
18:29 PM
mkoistinen joined the channel
18:29 PM
luzfcb joined the channel
18:29 PM
ilhami: you can try looking at some django cookiecutter templates and see how they lay out their project
18:30 PM
cables joined the channel
18:30 PM
greg_f has quit
18:30 PM
luzfcb
hello django-users, is there any library or django-app that works like django runserver but made to simulate slow connections?
18:31 PM
doismellburning
luzfcb: I'd suggest an independent tool
18:32 PM
like CharlesProxy or Slowy.app or iptables/pf settings etc.
18:32 PM
ilhami
yeah .gitignore and requirements.txt should be alongside manage.py
18:32 PM
right?
18:32 PM
doismellburning
i.e. you run runserver as usual, and use *something else* for slowness
18:32 PM
Bin4ry
ilhami: I suppose that is the root of your project and where you are going to init a git repo, yes.
18:33 PM
luzfcb
doismellburning: thanks for suggestions
18:33 PM
ilhami
I initted the git repo in the virtualenv.
18:33 PM
I guess that was a bad idea.
18:33 PM
emcfins joined the channel
18:33 PM
in the virtualenv dir*
18:34 PM
Bin4ry
ilhama: yeah. you don't need to upload ur venv, thats why you have requirements.txt
18:34 PM
justinlin joined the channel
18:34 PM
Haudegen has quit
18:34 PM
drvid
hey guys...can i do a self.save(commit=False) in a Model object save method? I'm trying to generate a string from existing field values
18:35 PM
nkuttler
drvid: sounds like you'd create a loop
18:35 PM
doismellburning
luzfcb: (you may have reasons for wanting it all-in-one, I just can't help you much there sorry!)
18:35 PM
shredding joined the channel
18:36 PM
josuebrunel joined the channel
18:36 PM
drvid
nkuttler: i've used this technique on modelforms to save m2m objects.... is this only to be used in a form save method?
18:36 PM
cables has quit
18:38 PM
nkuttler
drvid: aren't those fields already set when you enter save()?
18:38 PM
the ones you need to generate the string
18:38 PM
asheppard has quit
18:39 PM
tobbe joined the channel
18:39 PM
drvid
nkuttler: no they are hidden from the user
18:40 PM
i mean, the string i am generated isnt set, but the other field values i am deriving the string from would be yes
18:40 PM
generating*
18:40 PM
they are FK fields
18:41 PM
suppose i dont need commit=false for FK stuff anyways
18:41 PM
the_drow joined the channel
18:42 PM
whatever_sb joined the channel
18:43 PM
sam[cOe] has quit
18:43 PM
sam[cOe] joined the channel
18:43 PM
ilhami
Bin4ry: but should I need to upload my .git folder?
18:43 PM
nathanhi has quit
18:43 PM
because that's in my virtualenv
18:45 PM
is it ok that it is in my virtualenv? I would like appreciate to see a cookiecutter template for django
18:45 PM
pilva has quit
18:46 PM
Guest43219 joined the channel
18:47 PM
viejafea has quit
18:48 PM
epatpol
18:48 PM
micah_chatt joined the channel
18:48 PM
what
18:48 PM
FancyCamel
https://docs.djangoproject.com/en/1.9/topics/pa... Okay, if I can do queryset.paginator.count to get the total count in my template, should I be doing queryset.paginator.page.start_index to get the start? I've tried that, queryset.page.start_index and just simply start_index and none are outputting anything ._.
18:49 PM
I feel like this should really be super simple and I'm just not getting it to work.
18:49 PM
jaykay joined the channel
18:51 PM
Eugh it was queryset.start_index
18:52 PM
kushal joined the channel
18:52 PM
ASUChander has quit
18:53 PM
alexgordon joined the channel
18:53 PM
Dslegends has quit
18:54 PM
Dslegend_ joined the channel
18:54 PM
xertion has quit
18:55 PM
jordan87
does anyone have experience with multi table inheritance and Django rest framework serializers
18:57 PM
tulioz joined the channel
18:57 PM
Bin4ry has quit
18:58 PM
cnk
jordan87: yes
18:58 PM
onizo has quit
18:58 PM
whaack has quit
18:58 PM
well perhaps - what is multitable inheritance
18:58 PM
I use something like but not exactly Generic Relations
18:59 PM
whatever_hi has left the channel
18:59 PM
jordan87
18:59 PM
darenthis has quit
18:59 PM
those are my models in question
19:00 PM
sam[cOe] has quit
19:00 PM
basically a timeline has 0 to many TimelineItems
19:00 PM
but they are different types
19:00 PM
holler has quit
19:00 PM
sandwichheat joined the channel
19:00 PM
whatever_hi joined the channel
19:00 PM
sam[cOe] joined the channel
19:01 PM
cnk
OK
19:01 PM
jordan87
so when serializing, I wanted to include the fields on the submodels
19:01 PM
cnk
TimeLineItem is not abstract?
19:01 PM
gsingh joined the channel
19:01 PM
so you are doing joins for every access of move or scale?
19:01 PM
chippie_ has quit
19:01 PM
chippie joined the channel
19:01 PM
jordan87
cnk: hrm. technically it could be abstract
19:02 PM
cnk
for performance you probably want it to be
19:02 PM
but that isn't your question
19:02 PM
iNCoNFuN has quit
19:02 PM
please show me how you have timeline associated with timelineitems
19:02 PM
pretodor joined the channel
19:02 PM
(or rather it's subclasses)
19:02 PM
NomadJim joined the channel
19:02 PM
are you using Django's Generic Relation?
19:02 PM
jordan87
cnk: these rest endpoints are going ot be accessed 2-3 times a day. so performance isn't a big concern
19:03 PM
im not, but I probably could be
19:03 PM
cnk
if so, there is a plugin for DRF that does this
19:03 PM
I don't use that because I dont want to go through the contentypes framework
19:03 PM
PaulN has quit
19:03 PM
So you don't need GR to do what you want to do
19:03 PM
but you need a method that is a case statment
19:04 PM
so you can go from timeline to items - and the items method sorts out what that should really be
19:04 PM
jordan87
19:05 PM
sandwichheat has quit
19:05 PM
cnk
So, in your TimelineSerializer you want ot include the items - in whatever type they are
19:05 PM
is that the question?
19:05 PM
sonofdirt joined the channel
19:05 PM
jordan87
19:05 PM
this just included the parent "timelineItem" fields
19:06 PM
tpete has quit
19:06 PM
19:06 PM
Haudegen joined the channel
19:07 PM
but that does the same. and I realize this is probably because the relationships now is that TimelineItem has a 1 to 1 relationship to each of the submodels
19:07 PM
PaulN joined the channel
19:08 PM
cnk
hmmmm for the second one, I would hve either expected to hit the raise OR get what you wanted
19:08 PM
do the individual serializers give what you want?
19:09 PM
jordan87
cnk: it seems the individual serializers aren't called
19:09 PM
cnk
e.g. if you look at serialization of one Zoom
19:09 PM
targetron has quit
19:09 PM
valdur55
actually you can serialize different model instances at same time.
19:09 PM
robattila256 joined the channel
19:10 PM
cnk
When you call Timeline.items - what are the classes of the items?
19:10 PM
I suspect all are TimelineItem, not Move or Alpha, etc
19:11 PM
jordan87
correct
19:11 PM
valdur55
19:12 PM
dstegelman joined the channel
19:13 PM
cnk
jordan87: the way you have this modeled, I think it is going to be hard to get to the extra data
19:13 PM
donspaulding joined the channel
19:13 PM
tpete joined the channel