Re: Extremely simple question that I can't get a simple answer for in Docs
On Wed, May 19, 2010 at 1:23 PM, pyfreak wrote: > I tried placing my form in the template like {{ f['subject'] }} and I > get TemplateSyntaxError. Of course using my own form and existing > fields > Another important point is how to display the contents for a key in a dictionary in a template (what you where trying to achieve). Check out the meaning of the . in django templates [1]. Iván [1] http://docs.djangoproject.com/en/dev/ref/templates/api/#rendering-a-context -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: www.djangoproject.com
Buenos Aires, Arnet and Fibertel (ISPs) OK. Iván On Thu, Jul 1, 2010 at 3:09 PM, Felippe Bueno wrote: > Sao Paulo, Brazil ok. > > > On Thu, Jul 1, 2010 at 2:42 PM, Rob Broadhead > wrote: > >> Works fine for me. >> >> On Jul 1, 2010, at 12:40 PM, FC wrote: >> >> I can't access www.djangoproject.com from Buenos Aires, Argentina. >> Firefox says: "The connection has timed out" >> >> Is anyone else having problems? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to django-us...@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> >> >> Rob Broadhead >> robert.broadh...@gmail.com >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to django-us...@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com >> . >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Django Sprint this Saturday!
Hello everyone! Here in Argentina we're planning a Sprint[1] this Saturday to help with Django 1.3 We are going to participate from more than 4 Argentinian locations. We are very proud to count with Ramiro (cramm) one of the recently designated core commiters! There will be also, another Sprint in Berlin going on this Saturday[2]. See you then! [1] http://code.djangoproject.com/wiki/Sprint201011Argentina [2] http://code.djangoproject.com/wiki/Sprints -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Hierarchical data containing different models
Hi Peter, it seems the contenttypes framework [1] is what you are looking for. You can use it to make a relationship between any model instance in your project and a node and not two different ForeignKeys. Hope it helps, Iván [1] http://docs.djangoproject.com/en/dev/ref/contrib/contenttypes/ On Wed, Feb 24, 2010 at 3:08 PM, Peter Reimer wrote: > Hi folks, > > I'm looking for a solution/tip for the following problem: I need to > store hierarchical data, but, with two different kinds of objects > (groups and items). I googled around and found the often suggested > mptt package. It looks really great, but I'm not sure about the best > way to save objects of different models with it. > > One idea is, to build the hierarchical structure with one model and > mptt and in it, I define two ForeignKeys to the concrete data objects > I want to store (ForeignKey(Group) and Foreignkey(Item)). But this > sounds a bit strange to me. I think there should be a much smarter > way. > > Any ideas? Many thanks in advance. > Peter > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Report generation-reportlab
On Sat, Mar 31, 2012 at 7:54 AM, Marc Aymerich wrote: > On Sat, Mar 31, 2012 at 12:38 PM, Ganesh Kumar wrote: >> Hi guys, >> >> I am new to django reportlab. I want to generate pdf. file to select >> mysql (table) content. How to proceed with reportlab, I can do with >> some other tool. >> please guide me. your valuable suggestion. >> > > I'll use pisa, it allows you to generate pdf's from html source. So > it's perfect for Django: write a template with html format, render the > template and pass it to pisa. > > this snipet will show you how to do all the process: > http://djangosnippets.org/snippets/659/ AFAIK pisa has been deprecated in favour of xhtml2pdf[0]. You can use this[1] mixin in your CBV to deliver PDFs instead of regular html. Regards, Ivan [0] http://www.xhtml2pdf.com/ [1] https://github.com/rasca/django-enhanced-cbv/blob/master/enhanced_cbv/views/base.py#L4 -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django Generic Class Based Views - Change Content-Type
Hi Ross, On Wed, May 30, 2012 at 3:59 AM, Ross C wrote: > I have a minor question and looking through the source (although maybe i > missed it) I cant seem to see how to change the HttpResponse content_type of > a Generic class based view. > > Anyone point me in the right direction or know the answer outright? First of all check out the TemplateResponse[0] and then the TemplateResponseMixin[1] specifically render_to_response() where you can subclass and call super() with new kwargs. In the case you are looking for adding 'content_type' to the kwargs, to change it to whatever you want. Simply add the following to your view: def render_to_response(self, context, **response_kwargs): response_kwargs.update({'content_type': 'yyy/xxx'}) return super(MyView, self).render_to_response(context, **response_kwargs) Regards, Iván [0] https://docs.djangoproject.com/en/dev/ref/template-response/ [1] https://docs.djangoproject.com/en/dev/ref/class-based-views/#templateresponsemixin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Internationalization in Django 1.4 doesn't seem to work
Besides changing the language per request as you've been indicated in SO you might want to look at lazy translations: https://docs.djangoproject.com/en/dev/topics/i18n/translation/#lazy-translation Regards, Iván On Fri, Jun 1, 2012 at 2:58 PM, Houmie wrote: > Hey everyone, > > I would really appreciate it if somebody could help me with this. > Working on this since this morning and am totally stuck.. > > I have posted it with proper formatting on stack overflow. > > http://stackoverflow.com/questions/10854330/internationalization-in-django-doesnt-get-activated > > Thank you very much, > Houman > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Formsets and new 1.3 class based views
On Wed, May 11, 2011 at 1:29 PM, DK wrote: > What is a proper way to handle formsets with new class based views? > Should I use standard forms views like CreateView, I did not saw any > views dedicated to handle formsets. Hi DK. I've faced the same issue some weeks ago, and I decided to make my own CBV to handle formsets, modelformsets and inlines :) I haven't released them yet, cause I haven't had the proper time to document them, but the code is full of docstrings and commentaries and I'm using them in production. You can find them in my github repo[0]. I think you'll find them easy enough to understand, but if you have any doubts you can query me on #django or email me. Of course any issue report or pull request is more than welcome! Iván [0] https://github.com/rasca/django-enhanced-cbv -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Formsets and new 1.3 class based views
BTW you can find some example views and how to use them in the tests! Iván On Wed, May 11, 2011 at 3:50 PM, DK wrote: > Fantastic piece of work. I will try to dive into. > DK > > On May 11, 8:02 pm, Iván Raskovsky wrote: >> On Wed, May 11, 2011 at 1:29 PM, DK wrote: >> > What is a proper way to handle formsets with new class based views? >> > Should I use standard forms views like CreateView, I did not saw any >> > views dedicated to handle formsets. >> >> Hi DK. I've faced the same issue some weeks ago, and I decided to make >> my own CBV to handle formsets, modelformsets and inlines :) >> >> I haven't released them yet, cause I haven't had the proper time to >> document them, but the code is full of docstrings and commentaries and >> I'm using them in production. You can find them in my github repo[0]. >> >> I think you'll find them easy enough to understand, but if you have >> any doubts you can query me on #django or email me. Of course any >> issue report or pull request is more than welcome! >> Iván >> >> [0]https://github.com/rasca/django-enhanced-cbv > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: abc
Hello, why don't you start with the first steps[0]? https://docs.djangoproject.com/en/1.3/#first-steps On Thu, Jun 9, 2011 at 3:29 PM, jaspreet wrote: > i m new to django ...i need the help > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django Class Based FormView and multiple forms
On Thu, Jun 16, 2011 at 11:43 AM, Michel Thadeu Sabchuk wrote: > Hi Russ, > >> ... this is an >> area where I think there is lots of room for improvement now that we >> have a class-based foundation to work with. > > Thanks for your reply! > > I started my own "multiple forms view": > > https://gist.github.com/1029336 > > I see the ticket's approach is much more complete, I will see how I > can help. Hi Michel this looks great! Would you like to merge it with my work[0']? Maybe attach a pull request? We should agree on naming conventions for the methods, and maybe have the same hooks. You can look at my work in the patch of #16256 or here[1]. Why are you using a dict instead of a list? Oh, we should also add some tests for this new view. Regards, Iván [0] https://github.com/rasca/django/tree/ticket16256-more-class-based-views [1] https://github.com/rasca/django/blob/ticket16256-more-class-based-views/django/views/generic/edit/formset.py -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.