I passed in MEDIA_URL + "path/to/video" to my reactjs. I did the same for an image. The image shows up but the video does not. They are located in the same directory so the only difference is the filename for the path. How come my image shows but my video doesn't? Is there something I might be disregarding when it comes to serving video files?
sebcorbin is now known as sebcorbin`away
dang`r`us
bradfordli123, check your browser's developer console for anything odd
there's nothing special about videos per se.
TheJoey
DevilTiger: Yeah, that file is just something that gets run every time you open a new shell. So by adding that 'source' line, it's executed every time you open the terminal.
frague has quit
bradfordli123
dang`r`us: I checked and everything seemed to be in order
DevilTiger
is that path correct for mac?
davi has quit
TheJoey
Probably. :)
DevilTiger
not really sure where pip would install it
cool beans
davi joined the channel
ok thats done. now am i ready to start an env?
sebcorbin`away is now known as sebcorbin
bradfordli123
dang`r`us: I right clicked the src attribute in my video tag and opened the file in another tab and the video was able to show up and play in another tab
solidvance has quit
jgrubb has quit
dang`r`us
bradfordli123, well, then something about your video player or <video> tag or whatever is bork
TheJoey
DevilTiger: I would try that source command manually, just to make sure it works right. But after you're sure of that, yes, you're all ready!
xterm has quit
Azendale
tbaxter: This is a somewhat hypothetical example -- I'm trying to figure out the right way to do it before I do it wrong. https://dpaste.de/LGpu -- I'm thinking I should wrap lines 3-6 in a function because I seem to repeat that a lot in my views
DevilTiger
wrong path
where should i start a lookin
sec forgot the slash at beginning. that'll do it
robattila256 joined the channel
jgrubb joined the channel
tbaxter
Azendale: To be honest, that view doesn't make a lot of sense to me. GET and POST should not be anywhere near that equal for a given view
Slamtime joined the channel
lolidunno
hmm
the model form for jsonfields in the admin panel doesn't seem to like single quotes for keys and values
Normally, 'crns' would be extracted from args or kwargs on GET, and on POST, you may pull it directly from POST if form.cleaned_data wasn't present, but you'd still have to veryify.
gcam has quit
Which is all a long way of saying I still don't understand the problem you're trying to solve.
davi has quit
lumidee has quit
DevilTiger
nope not there
Azendale
tbaxter: I try to, for all my views, either send and error if it's not the request type I expect, or do those few lines to make it not different. Maybe I just have a lack of examples of the right way to do it? For a correctly done view, what things would be different between a GET and POST? If the functionality is different, why wouldn't it just be a different view function?
deadlock joined the channel
sebcorbin is now known as sebcorbin`away
tbaxter
Azendale: most views don't really give a damn if they're GET or POST. The ones that do tend to just check for POST, because those are less common, and are the ones you do DB operations on.
TheJoey
DevilTiger: Okay, how about in ~/Library/Python/2.7/bin/
commx has quit
DevilTiger
nope nothing in there or its site-packages folder
bsl10 has quit
if i installed it while being in a virtualenv will that have only installed it in that virtualenv?
tbaxter
it may. inception!
DevilTiger
i tried to install again in system space. errors. will paste
tbaxter: I think I'm really missing something here. I get the feeling I must be working around the framework instead of using it. The views that don't care if it is get or post, do they just always do the same thing? How does their behavior vary if they can't look at HTTP variables?
The farther along I get, the more I realize I've done stuff the hard way and django has a better one. 2 weeks ago, I was passing a list of messages to every template. Just finished switching to the message system (which can show messages after a redirect, which is good for when someone posts)
SteffanW2 has quit
tbaxter
I'm having trouble finding much with GET, since I rarely do GET forms and even less frequently pass args around in query params.
DevilTiger
i got mezza going locally
huzza
Azendale
tbaxter: No problem. I'm going to have to run to class, but thanks for the examples. I'll be back with questions I'm sure (probably in ~ 1 hour!)
mlavin has quit
tbaxter
DevilTiger: noice.
ranguli has quit
surfnturf_ joined the channel
You should be off to the races now.
TraceEv has quit
For testing and evaluation, local may be all you need.
DevilTiger
mezza has decent write ups on deployment to DO too
xpen joined the channel
renemarxis joined the channel
gannetson has quit
tbaxter
also, now that you've got VEs set up and working correctly, creating them and trying different things out gets WAY eaiser.
rns2 has quit
gannetson joined the channel
renemarxis
hello. can someone tell me if it's possible to pass the RequestContext to an inclusiontag from inside an inclition tag? I'm trying to use django activeurl inside an custom inclusiontag
tbaxter
you don't have to
inclusion tags take context already
For that matter, fi you're passing around RequestContext, you're already making things harder than they have to be.
renemarxis
yes i know, with takes_context=True but the request is not present on the included activeurl
tbaxter
paste your code
DevilTiger
gonna take a break. thx tbaxter
tbaxter
I think you're trying to use a tag in a tag
renemarxis
yes
tbaxter
DevilTiger: I think TheJoey was the helpful one
renemarxis: you can't use a tag in a tag.
DevilTiger
oh shoot, my bad thejoey. thanks bruv
tbaxter
so…. why are you trying to use the activeurl tag in an inclusion tag?
renemarxis
to separate the navigation code from the main template
xpen has quit
pwrentch has quit
tbaxter
renemarxis: OK, why an inclusion tag?
Why not an include or (better) just good template inheritance?
gannetson has quit
renemarxis
hmmm seemed suitable, as i have to include it in every page :)
betojulio joined the channel
tbaxter
well normally that would be handled through template inheritance.
veduardo has quit
inclusion tags are great, I love them, but they're not always the right tool for a given job.