the second view doesn't need to do anything other than get the data, process it and then redirect it to the same next view
realnot_, exactly like you have it right now
v0r0nwe has quit
ser_berry has quit
ser_barry is now known as ser_berry
Audioburn
pembo13, this is a huge pain in the ass
pembo13
Audioburn: what are you trying to accomplish, and what problems are you having?
Audioburn
pembo13, same thing, quering a GFK
querying*
pembo13
and what's happen (or not) ?
bender314 has quit
realnot_
DarkSector: but different view mean also different urls
DarkSector
yes
just point the action of the form to the other url
TheJoey
Can anybody help me out with an ORM issue that's breaking my brain? My goal is in a comment at the bottom: https://dpaste.de/GRgv
Audioburn
pembo13, I guess I need to work on understanding ContentType -- with that link I posted, I tried just copying and pasting and replacing things, which did not work
so, just have the view do it’s work and save the form.
JesseH joined the channel
Audioburn
i get that reviewed_item is not defined, but I don't know what the "get_for_model" parameter should be
reading contenttype docs atm
DarkSector
tbaxter, or have the form do the saving and just have a formview use that form
ybathia
I have loaded data in the database using fixture and now I want to add more records to that data. whats the best way to do it? shall i update the initial_data.json to have more records or shall I create a new json file with only the additional records?
Audioburn
pembo13, also that tab shouldn't be there, just a typo
DarkSector
ybathia, overwrite the old one
realnot_
tbaxter: but the second view, doesn't works, i can receive all the POST data, but the validation doesn't pass, and i don't know why (all field are filled)
DarkSector
dumpdata again
pembo13
Audioburn: you'll want a dbindex on object_id by the wya
way*
DarkSector
realnot_, you see, that's a separate issue. Post your view/form for that
ybathia
DarkSector: Thanks a lot sir
mmmikey joined the channel
realnot_
tbaxter: aaaa i got it!
Audioburn
pembo13, dbindex?
and why?
sonoflight joined the channel
Knyght has quit
realnot_
tbaxter: i use 2 view to save the data in the database and 1 view to render the template :D
?
tbaxter
right
pembo13
Audioburn: you'll likely be doing queries against it at some point
Audioburn
like now
realnot_
tbaxter: coool
pembo13
Audioburn: what error(s) are you getting
tbaxter
although you CAN let one view carry both the rendering and processing one view, if that makes more sense
pembo13
Audioburn: you're not querying against it yet
sonoflight has quit
garrypolley joined the channel
Audioburn
oh ok and sec
realnot_
tbaxter: is better?
Knyght joined the channel
acangiani has quit
DarkSector: yes, i'll try to write the tbaxter solution, then we can debug the view
DarkSector
coolio
realnot_
tbaxter, DarkSector thank you guys
DarkSector
yw
elit3x has quit
sanketdg has quit
TheJoey
Any takers for my confusion?
michalmo joined the channel
sonoflight joined the channel
garrypolley has quit
TurBoss joined the channel
DTekk joined the channel
DarkSector
TheJoey, I looked at it, but I don't know enough about GenericRelation to give advice
Hairy joined the channel
tylerea
Does anyone know a good room for security best practices?
v0r0nwe joined the channel
DarkSector
tylerea, security for django? or for web in general?
gyani joined the channel
TheJoey
DarkSector: In theory, in this case, it should be functionally equivalent to the far end of a ForeignKey
tylerea
locking down a server in general
DarkSector
##networking
should help
tylerea
thanks DarkSector
matthiaswahl joined the channel
DarkSector
TheJoey, what about limit to
limit_choices_to
diameter has quit
gyani
hi, is there some method to check where is_valid fails?
basically get the values_list for the address and then filter Merchant according to that
Audioburn
in get_for_model(parameter), parameter needed to be defined as the model that the GFK was ultimately referencing, which in my case was the user model being reviewed
pembo13
cool
sonoflight has quit
TheJoey
Hmmm I'm not sure I follow, DarkSector.
DarkSector
TheJoey, create a values_list of Address with the filter address_type=TYPE_PHYSICAL
then use that list to filter merchants
Merchant.objects.filter(addresses__in=Address.objects.filter(address_type=TYPE_PHYSICAL).values_list('pk', flat=True)) Then use annotate however you want I imagine
grumpi joined the channel
iooner joined the channel
primehax_ joined the channel
primehax_ has quit
Itkovian joined the channel
tbaxter
Audioburn: the good news is you’re learning some of the reasons GFKs suck
TheJoey
DarkSector: I don't think that will be able to give me what I'm looking for ultimately. I need to be able to do: Merchant.objects.annotate(physical_address=...), so that I can do: Merchant.objects.annotate(physical_address=..., distance=Distance(F('physical_address__location'), Point(...)))
Damn, I was hoping I could eliminate the custom SQL. I barely understand how it's working.. which bothers me. :-/
timkofu has quit
xterm joined the channel
Well at least I'm not using .extra(). So at least there's that. :)
ircnode0
I am planning to use django for information retrieval from amazon web service. I have to make use of amazon WSDL ( http://docs.aws.amazon.com/AWSECommerceService/... ) somehow. Can somebody give an overview how I can use WSDL-file for information retrieval from amazon web service?