Re: django templates stop to working html autocomplete

2020-05-07 Thread Carson
What do you want to autocomplete but not? If you use Python as the main language, It so recommends that you convert IDE to PyCharm. Eren ARTUÇ於 2020年5月8日星期五 UTC+8上午7時09分18秒寫道: > > hello everyone, > > Im using Vs.Code. When i enabled to django templates, my HTML autocomlete > doesnt work. i want

Re: Django templates render

2018-09-02 Thread Kasper Laudrup
Hi Ronak, On 02/09/2018 08.24, RONAK JAIN wrote: Thanks for reply Firar of all i need here I want to make relation between projects and categories. You can look attached HTML page picture there categories parts three attributes digital, print or branding and projects are there show pictures or

Re: Django templates render

2018-09-01 Thread RONAK JAIN
Thanks for reply Firar of all i need here I want to make relation between projects and categories. You can look attached HTML page picture there categories parts three attributes digital, print or branding and projects are there show pictures or pictures name. 1. How can I make expect relation bet

Re: Django templates render

2018-09-01 Thread Jason
I'm sorry, I have no idea what you're trying to do. what exactly is correct relationship and what is different from the render output that you desire? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop rec

Re: Django Templates and Conditional CSS classes

2017-11-11 Thread PASCUAL Eric
make big rivers :) Eric From: django-users@googlegroups.com on behalf of treyd Sent: Saturday, November 11, 2017 20:49 To: Django users Subject: Re: Django Templates and Conditional CSS classes Omar (and everybody else who responded), Thanks for that ideas

Re: Django Templates and Conditional CSS classes

2017-11-11 Thread treyd
Omar (and everybody else who responded), Thanks for that ideas and putting a method on the model to return the appropriate CSS class based on the state. I think that would be the cleanest solution if I am going to bite the bullet and put this template-specific logic on the model. It got me th

Re: Django Templates and Conditional CSS classes

2017-11-11 Thread Omar Helal
Hi treyd, I think idea of updating the model and storing it in the db is a bit overkill, however you could create an @propery on the model that will do that logic for you and return the css class for you. e.g. @property def css_class(self): if self.state is SUCHANDSUCH: return "label-soan

Re: Django Templates and Conditional CSS classes

2017-11-10 Thread treyd
Thanks, all, for the info. Looks like the best way to clean this up is to make the model have some knowledge of the CSS class I want to use and make a method to get it. I like that, but I was unsure about sticking view information into the model. Probably the best solution is javascript logic

Re: Django Templates and Conditional CSS classes

2017-11-10 Thread Vijay Khemlani
You can also add a "state_css_class" (or something) method to your object class and just call ... the method should be quite simple On Fri, Nov 10, 2017 at 7:01 PM, Adam Simon wrote: > > You can pass the class from either the model or the view into the > template. For example, you can assign

Re: Django Templates and Conditional CSS classes

2017-11-10 Thread Adam Simon
You can pass the class from either the model or the view into the template. For example, you can assign a class to a button with a variable: <|button> And then the class would have to be defined in your style somewhere On Fri, Nov 10, 2017 at 1:37 PM treyd wrote: > At some point I plan on fig

Re: Django Templates and Conditional CSS classes

2017-11-10 Thread treyd
At some point I plan on figuring out how to do more intelligent front-end in-browser stuff (Angular, etc) which yeah would definitely help me here but I was wondering if there was a Django-only way of doing this. On Friday, November 10, 2017 at 3:51:09 PM UTC-5, Adam wrote: > > > Are you open to

Re: Django Templates and Conditional CSS classes

2017-11-10 Thread Adam Simon
Are you open to using JavaScript in the front end? It would make it really easy On Fri, Nov 10, 2017 at 12:40 PM treyd wrote: > Hello, > > I am trying to render a model field in a django template, and, based on > the value of the field, I want to specify a different CSS class. Right > now, my s

Re: Django templates

2015-11-01 Thread Humphrey Butau
The templates work on any platform, try Django cookie cutter! -- 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

Re: Django templates

2015-10-31 Thread Andreas Kuhne
Hi, There aren't any specific templates for windows or any other operating system. Django runs on a webserver and is compatible regardless of OS. I would recommend that you look at the tutorial and see how to get started: https://docs.djangoproject.com/en/1.8/intro/tutorial01/ Regards, Andréas

Re: django templates

2014-07-22 Thread ngangsia akumbo
please give me an exmaple , all my urls for the various apps are all in the main project urls file On Tuesday, July 22, 2014 12:37:37 PM UTC+1, Akshay Mukadam wrote: > > > > On Tuesday, July 22, 2014 1:20:14 PM UTC+5:30, ngangsia akumbo wrote: >> >> Hi Django Users >> >> I have a question. >> >>

Re: django templates

2014-07-22 Thread Akshay Mukadam
On Tuesday, July 22, 2014 1:20:14 PM UTC+5:30, ngangsia akumbo wrote: > > Hi Django Users > > I have a question. > > I have created all my apps for my websites which are events , blog, and > gallery. > They all extends to the base.html file . > > From my development server i can access this in

Re: django templates

2014-07-22 Thread ngangsia akumbo
Ok i have created all my apps and extended to the base.html file so what next? On Tuesday, July 22, 2014 8:50:14 AM UTC+1, ngangsia akumbo wrote: > > Hi Django Users > > I have a question. > > I have created all my apps for my websites which are events , blog, and > gallery. > They all exten

Re: Django Templates: Using the "with" statement and "block.super" together

2013-09-24 Thread Russell Keith-Magee
On Wed, Sep 25, 2013 at 1:59 AM, Warren Smith wrote: > On occasion, I've used the following technique in my django templates: > > # parent.html > > {% block someblock %} > …stuff… > {% if cool_optional_feature_is_enabled %} > …optional stuff... > {% endif %} > …stuff... > {% endblock %} >

Re: Django Templates: Using the "with" statement and "block.super" together

2013-09-24 Thread Vijay Katam
Seems legit to me. Some documentation could help get more usage. On Tuesday, September 24, 2013 12:59:27 PM UTC-5, Warren Smith wrote: > > On occasion, I've used the following technique in my django templates: > > # parent.html > > {% block someblock %} > …stuff… > {% if cool_optional_feature_i

Re: Django Templates: Using the "with" statement and "block.super" together

2013-09-24 Thread Tomas Ehrlich
I use it too. Maybe it would be nice to document it somewhere. Cheers, Tom Dne Tue, 24 Sep 2013 10:59:27 -0700 (PDT) Warren Smith napsal(a): > On occasion, I've used the following technique in my django templates: > > # parent.html > > {% block someblock %} > …stuff… > {% if cool_opti

Re: Django Templates: Using the "with" statement and "block.super" together

2013-09-24 Thread Bill Freeman
This sounds safe to me. After all, we pass context variables in from views and expect them to be available within block.super code. Perhaps some folks aren't sufficiently clear as to when stuff in a template is evaluated. So, I'd do it if I needed it. On Tue, Sep 24, 2013 at 1:59 PM, Warren Sm

Re: django templates

2013-07-17 Thread Kamal Kaur
On Wed, Jul 17, 2013 at 9:13 PM, Harjot Mann wrote: > It is used only for one report and there is some error,so it is there > but not working. Then fix it! -- Kamaljeet Kaur Blog:http://kamalkaur188.wordpress.com/ -- You received this message because you are subscribed to the Google Groups

Re: django templates

2013-07-17 Thread Harjot Mann
On Wed, Jul 17, 2013 at 8:26 PM, Kamal Kaur wrote: > Hope this helps: > https://docs.djangoproject.com/en/dev/howto/outputting-pdf/ > > http://stackoverflow.com/questions/1377446/html-to-pdf-for-a-django-site @ Kamal thnks but its already there. -- Harjot Kaur Mann Blog: http://harjotmann.wordp

Re: django templates

2013-07-17 Thread Harjot Mann
On Wed, Jul 17, 2013 at 8:53 PM, Kamal Kaur wrote: > It must work if it is there?? It is used only for one report and there is some error,so it is there but not working. -- Harjot Kaur Mann Blog: http://harjotmann.wordpress.com/ -- You received this message because you are subscribed to the G

Re: django templates

2013-07-17 Thread Tom Evans
On Wed, Jul 17, 2013 at 4:01 PM, Harjot Mann wrote: > On Wed, Jul 17, 2013 at 8:20 PM, Tom Evans wrote: >> Does your website currently produce pdfs, or are you asking how to >> turn multiple HTML pages from your site into a single PDF? > > > Yes, I want this it has reportlab and pisa modules to p

Re: django templates

2013-07-17 Thread Kamal Kaur
On Wed, Jul 17, 2013 at 8:33 PM, Harjot Mann wrote: > @ Kamal thnks but its already there. It must work if it is there?? -- Kamaljeet Kaur Blog:http://kamalkaur188.wordpress.com/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscrib

Re: django templates

2013-07-17 Thread Kamal Kaur
On Wed, Jul 17, 2013 at 8:04 PM, Harjot Mann wrote: > No, this is not admin problem. I am getting the reports templates but > these are not saved anywhere, valuse are coming from database. But I > want to take the print outs i.e the hard copy of all the reports which > are made till now by saving

Re: django templates

2013-07-17 Thread Harjot Mann
On Wed, Jul 17, 2013 at 8:20 PM, Tom Evans wrote: > Does your website currently produce pdfs, or are you asking how to > turn multiple HTML pages from your site into a single PDF? Yes, I want this it has reportlab and pisa modules to produce pdfs. -- Harjot Kaur Mann Blog: http://harjotmann.wor

Re: django templates

2013-07-17 Thread Larry Martell
On Wed, Jul 17, 2013 at 8:34 AM, Harjot Mann wrote: > On Wed, Jul 17, 2013 at 6:46 PM, Derek wrote: >> One option is to use a Django admin action - the user selects which job/jobs >> are needed from the usual list - >> and your action can then generate the data, passing this into a single >> "mas

Re: django templates

2013-07-17 Thread Tom Evans
On Wed, Jul 17, 2013 at 3:34 PM, Harjot Mann wrote: > No, this is not admin problem. I am getting the reports templates but > these are not saved anywhere, valuse are coming from database. But I > want to take the print outs i.e the hard copy of all the reports which > are made till now by saving

Re: django templates

2013-07-17 Thread Harjot Mann
On Wed, Jul 17, 2013 at 6:46 PM, Derek wrote: > One option is to use a Django admin action - the user selects which job/jobs > are needed from the usual list - > and your action can then generate the data, passing this into a single > "master template" (composite of your other templates) for the u

Re: django templates

2013-07-17 Thread Derek
One option is to use a Django admin action - the user selects which job/jobs are needed from the usual list - and your action can then generate the data, passing this into a single "master template" (composite of your other templates) for the user to print (or you could have an action just to g

Re: django templates

2013-07-17 Thread Daniel Oźminkowski
Hello, I am a beginner, but this looks like a job for custom admin command: https://docs.djangoproject.com/en/1.5//howto/custom-management-commands/ I found it very easy, so it should also be easy for you. Best regards, Daniel W dniu wtorek, 16 lipca 2013 18:43:42 UTC+2 użytkownik Harjot Mann

Re: django templates and tex/latex

2013-03-16 Thread thanos
On Thu, Mar 14, 2013 at 9:58 AM, Bill Freeman wrote: > Note that you don't have to use the Django template engine to render > things. > > For one thing, if you found a less problematic templating engine, using it > as > well doesn't prevent you from using Django's template engine for other > page

Re: django templates and tex/latex

2013-03-14 Thread Bill Freeman
Note that you don't have to use the Django template engine to render things. For one thing, if you found a less problematic templating engine, using it as well doesn't prevent you from using Django's template engine for other pages. You could also roll your own by coming up with, for example, a T

Re: django templates and tex/latex

2013-03-13 Thread Ken
Actually, that's exactly what I'm trying to do. I have database tables whose columns contain TeX fragments. I am trying to generate various file outputs from database searches - TeX, pdf, etc. I could construct the tex file on the fly with python strings as you suggest but that's rather cumber

Re: django templates and tex/latex

2013-03-13 Thread Drew Ferguson
On Wed, 13 Mar 2013 07:01:45 -0700 (PDT) Ken wrote: > I would like to write a tex/latex file with django tags in it. Load it > with the template loader and render it with a context. The problem is > that my tex/latex file has quite a few '{%' in them. They are > conventional in TeX for writi

Re: django templates and tex/latex

2013-03-13 Thread Tom Evans
On Wed, Mar 13, 2013 at 2:43 PM, Tom Evans wrote: > On Wed, Mar 13, 2013 at 2:01 PM, Ken wrote: >> I would like to write a tex/latex file with django tags in it. Load it with >> the template loader and render it with a context. The problem is that my >> tex/latex file has quite a few '{%' in th

Re: django templates and tex/latex

2013-03-13 Thread Tom Evans
On Wed, Mar 13, 2013 at 2:01 PM, Ken wrote: > I would like to write a tex/latex file with django tags in it. Load it with > the template loader and render it with a context. The problem is that my > tex/latex file has quite a few '{%' in them. They are conventional in TeX > for writing readabl

Re: django templates - iterate over several lists

2013-03-08 Thread Roberto López López
Thank you very much! On 03/08/2013 03:12 PM, Javier Guerra Giraldez wrote: > On Fri, Mar 8, 2013 at 5:07 AM, Roberto López López > wrote: >> I'd like to avoid having to concatenate them in the view and pass that >> as another parameter. > > > two ideas come to mind: > > - itertools.chain() o

Re: django templates - iterate over several lists

2013-03-08 Thread Javier Guerra Giraldez
On Fri, Mar 8, 2013 at 5:07 AM, Roberto López López wrote: > I'd like to avoid having to concatenate them in the view and pass that > as another parameter. two ideas come to mind: - itertools.chain() on the view. it's equivalent to concatenating, but done lazily, so there's _very_ little overh

Re: Django templates: accessing list element attributes throws error

2011-03-17 Thread Nathanael Abbotts
Thanks, will try that once I get to my computer : ) -- 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...@googl

Re: Django templates: accessing list element attributes throws error

2011-03-17 Thread werefr0g
Hi, you can try {{ list.0.title }} Regards, -- 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...@googlegroup

Re: Django Templates: Form field name as variable?

2011-02-16 Thread ju
> I like it too, but aren't you still stuck with validating it or are you > applying a validator to each field you generate this way? I'm not sure that I understand the question but this is how I create new fields self.fields['ticket_%s' % ticket['id']] = forms.IntegerField(label = '', initial =

Re: Django Templates: Form field name as variable?

2011-02-15 Thread Mike Ramirez
On Tuesday, February 15, 2011 01:31:07 am ju wrote: > Thank you very much for you answer > > I prefer to use validation that form class provides for me... > I do too. > I tried to use but > the other problem that I have is that I can't get errors for each > field of form :( > . > There is

Re: Django Templates: Form field name as variable?

2011-02-15 Thread ju
Thank you very much for you answer I prefer to use validation that form class provides for me... I tried to use but the other problem that I have is that I can't get errors for each field of form :( There is another solution that I decide to use: http://stackoverflow.com/questions/4993625/djang

Re: Django Templates: Form field name as variable?

2011-02-14 Thread Mike Ramirez
On Monday, February 14, 2011 07:00:38 am ju wrote: > How can I make this loop to print form fields where is the > value of ticket.id? > > {% for ticket in zone.tickets %} > {{ ticket.id }}: {{ form.ticket_count_ }} > {% endfor %} > > So the output to be something like this...

Re: Django templates and libraries

2010-06-21 Thread shofty
i think i'd be right in saying that template tags are different to the eggs issue. i found a post on b-list which explained templatetags and where to put them. http://www.b-list.org/weblog/2007/dec/04/magic-tags/ so pretty much always drop the tags inside a folder named templatetags in your app fo

Re: Django templates, break a for after an if

2009-10-27 Thread Nicu Marcu
Thanks for help, very cool stuff, work perfect. 2009/10/26 Tom Evans > > On Mon, 2009-10-26 at 15:54 +0200, Jani Tiainen wrote: > > NMarcu kirjoitti: > > > Hello all, > > > > > >I want to do something like this: > > > > > > {% for u in users %} > > > {% for su in superu %} > > >

Re: Django templates, break a for after an if

2009-10-26 Thread Tom Evans
On Mon, 2009-10-26 at 15:54 +0200, Jani Tiainen wrote: > NMarcu kirjoitti: > > Hello all, > > > >I want to do something like this: > > > > {% for u in users %} > > {% for su in superu %} > > {% ifequal u su %} > >//do someth

Re: Django templates, break a for after an if

2009-10-26 Thread Jani Tiainen
NMarcu kirjoitti: > Hello all, > >I want to do something like this: > > {% for u in users %} > {% for su in superu %} > {% ifequal u su %} >//do something end exit > from this for > {% endifequal %} > {%

Re: Django templates have lexical scope!?

2009-08-26 Thread David De La Harpe Golden
stevedegrace wrote: > Variables you bind within the template itself don't seem to behave > this way. > > Instead they are scoped. If a variable is bound inside a block tag, > the binding is only valid within that block. I didn't do enough > experiments yet to tell you how it behaves with nested

Re: Django templates have lexical scope!?

2009-08-25 Thread James Bennett
On Tue, Aug 25, 2009 at 9:26 PM, stevedegrace wrote: > I suppose this is easy enough to fix by doing the binding in the view > when the context is first constructed which would probably have been > easier in the first place, but now I'm curious and want to know what's > happening. If you want som

Re: Django Templates: Dynamically addressing 2-D Dictionary

2009-02-04 Thread Glen Jarvis
>> I'm beating my head up against the wall with this. Could anyone send >> me some guidance? > > The short version is "You can't do that" - at least, not in the way > you expect. > > Django's template language specifically tries to avoid being a > programming language, and one of the things tha

Re: Django Templates: Dynamically addressing 2-D Dictionary

2009-02-04 Thread Russell Keith-Magee
On Thu, Feb 5, 2009 at 7:30 AM, Glen Jarvis wrote: > > Notice that I can reference grants.2.63 through direct reference, but > when trying to use the variables alpha=2, and beta=63, this lookup > fails. Yes - it will. > I'm beating my head up against the wall with this. Could anyone send > me s

Re: Django templates and new lines

2008-12-12 Thread Malcolm Tredinnick
On Fri, 2008-12-12 at 02:33 -0800, pihentagy wrote: > Hi all! > > I ran into the problem mentioned here: > http://groups.google.com/group/django-users/browse_frm/thread/c9e569f7370c9c80/3b645501e9b67aa8 > > Does anybody know whether anything happened after that thread? The situation hasn't cha

Re: Django templates editing mode for Emacs

2006-08-30 Thread Antonio Cavedoni
On 30 Aug 2006, at 18:13, James Bennett wrote: > On 8/30/06, Antonio Cavedoni <[EMAIL PROTECTED]> wrote: >> Before you start exposing my ignorance of Emacs Lisp to the world, I >> will offer you that this is my first Emacs Lisp project *ever* (in >> fact I don't even know Emacs Lisp at all), so pl

Re: Django templates editing mode for Emacs

2006-08-30 Thread James Bennett
On 8/30/06, Antonio Cavedoni <[EMAIL PROTECTED]> wrote: > Before you start exposing my ignorance of Emacs Lisp to the world, I > will offer you that this is my first Emacs Lisp project *ever* (in > fact I don't even know Emacs Lisp at all), so please be gentle. First question: is this being built