I really about to give up Django

2013-08-22 Thread Fellipe Henrique
Hi guys, I really about to give up from Django, because? I try to do something simple and I looking, looking around the internet and don't find anything about this... try this simple example: http://pastebin.com/epazpBcZ I just want to get "descricao" field, from "Brinq" model, using a inlinef

Re: I really about to give up Django

2013-08-22 Thread Raffaele Salmaso
{{ form.brinq.descricao }} ? On Thu, Aug 22, 2013 at 4:28 PM, Fellipe Henrique wrote: > Hi guys, > > I really about to give up from Django, because? I try to do something simple > and I looking, looking around the internet and don't find anything about > this... try this simple example: http://pa

Re: I really about to give up Django

2013-08-22 Thread Fellipe Henrique
Doesn't work, I tried this way, but same problem.. that's a simple thing to do with database, but I see anyone use this in django.. or I doing something really worng here, or django doesn't work for this type of query. Em quinta-feira, 22 de agosto de 2013 11h33min37s UTC-3, Raffaele Salmaso

Re: I really about to give up Django

2013-08-22 Thread Tom Evans
On Thu, Aug 22, 2013 at 3:28 PM, Fellipe Henrique wrote: > Hi guys, > > I really about to give up from Django, So should I bother giving you the advice you asked for, since you are just going to give up on Django? > because? I try to do something simple > and I looking, looking around the intern

Re: I really about to give up Django

2013-08-22 Thread Fellipe Henrique
Ok, I read that, but the problem persist.. I try to use as you told, but nothing show... and no errors appears.. Sorry about my first line.. I just stop here, simple problem, in more then 1 day, and I don't find any solution, anything on internet to... Cheers Fellipe Em quinta-feira, 22 de ago

Re: I really about to give up Django

2013-08-22 Thread Mark Furbee
Try dropping the .value from referencia. Like {{ form.instance.idproduto.idmercadoria.referencia }}. Does this work? On Thu, Aug 22, 2013 at 9:35 AM, Fellipe Henrique wrote: > I tried again.. and work if I have just 1 FK, if I have more then one, > doesn't work, like this: > > I have this models

Re: I really about to give up Django

2013-08-22 Thread Mark Furbee
Are your "nome" and "idade" fields displaying? If so, {{ form.instance.brinq.descricao }} should display the descricao field of the brinq object associated with that Filhos instance bound to the form in the formset. On Thu, Aug 22, 2013 at 9:24 AM, Fellipe Henrique wrote: > Ok, I read that, but

Re: I really about to give up Django

2013-08-22 Thread Fellipe Henrique
I tried again.. and work if I have just 1 FK, if I have more then one, doesn't work, like this: I have this models: Itens -> produto -> mercadoria itens: idproduto = FK (produto) produto: idmercadoria = FK(mercadoria) mercadoria: referencia = Char I try to get "referencia" field, as you t

Re: I really about to give up Django

2013-08-22 Thread Andre Terra
For the record, it's considered a good coding practice to keep everything in English, including classes, functions and variables. This way it's easier for people to help you. Secondly, your Filhos model should really just be Filho. Finally, don't use obscure names like Brinq. Instead, prefer the

Re: I really about to give up Django

2013-08-22 Thread Fellipe Henrique
Hi Andre, I just post my current models, the first model it`s just example. My real model is this: http://pastebin.com/w2TmyLzt as a posted in my last email. As I told, if I get the "first" FK value works.. in my real problem, link above, I try to get "Mercadoria" values, from my "ItensPedid

Re: I really about to give up Django

2013-08-22 Thread Fellipe Henrique
No, nothing displayed.. Em quinta-feira, 22 de agosto de 2013 13h38min04s UTC-3, Mark escreveu: > > Try dropping the .value from referencia. Like {{ > form.instance.idproduto.idmercadoria.referencia }}. Does this work? > > > On Thu, Aug 22, 2013 at 9:35 AM, Fellipe Henrique > > > wrote: > >> I

Re: I really about to give up Django

2013-08-23 Thread Mark Furbee
Are you sure the idmercadoria is not None on that idproduto record? {{ form.instance.idproduto.**idmercadoria }} Does this display anything? How about {{ form.instance.idproduto }}? If these don't display, verify the records in your database. In Django templates, if something is None or does not

Re: I really about to give up Django

2013-08-23 Thread Fellipe Henrique
form.instance is "Pedido" model, not "ItensPedido". My "ItensPedido" has "idproduto" not my "Pedido". and all idproduto has idmercadoria, it a required field, never, never go null`s this field. Cheers, Em sexta-feira, 23 de agosto de 2013 12h15min15s UTC-3, Mark escreveu: > > Are you sure the

Re: I really about to give up Django

2013-08-23 Thread Mark Furbee
I see. I don't understand how this works: {{ itens.instance.idproduto.codigobarra }} when this doesn't: {{ itens.instance.idproduto.idmercadoria.referencia }} Can you post your template code? On Fri, Aug 23, 2013 at 10:13 AM, Fellipe Henrique wrote: > form.instance is "Pedido" model, not "It

Re: I really about to give up Django

2013-08-30 Thread Dan Gentry
Just my opinion, but I see no reason to use English names in models. Use whatever you wish. English speaking programmers have been using cryptic variable names for decades. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

Re: I really about to give up Django

2013-08-30 Thread Aaron C. de Bruyn
Feel free to use whatever names you'd like in models. def Ikhouvanjou(models.Model): #whatever field names you want... -A On Fri, Aug 30, 2013 at 6:23 PM, Dan Gentry wrote: > > Just my opinion, but I see no reason to use English names in models. Use > whatever you wish. English speaking p

Re: I really about to give up Django

2013-08-31 Thread Gerd Koetje
if u want someone else to understand use english -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group

Re: I really about to give up Django

2013-09-02 Thread Tom Evans
On Sat, Aug 31, 2013 at 4:33 AM, Aaron C. de Bruyn wrote: > Feel free to use whatever names you'd like in models. > > def Ikhouvanjou(models.Model): > #whatever field names you want... You can use whatever language or naming scheme you like for your code, but if you want to ask for help from pe

Re: I really about to give up Django

2013-09-02 Thread Andre Terra
*Non sequitur*. Obscure variable names can happen regardless of the coder's language choice, and most definitely do not encourge the use of one's native tongue. As others have said in the thread, if you're writing *in English* to ask for help, you should probably code in English as well. It's not

Re: I really about to give up Django

2013-09-02 Thread Mike Dewhirst
On 2/09/2013 11:58pm, Andre Terra wrote: /Non sequitur/. Obscure variable names can happen regardless of the coder's language choice, ... which reminds me that I need to refactor more aggressively to make sure my variables and especially column names (and verbose_name) more closely match/ref