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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
>>
>>
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
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
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 %}
>
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
> 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 =
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
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
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...
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
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 %}
> > >
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
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 %}
> {%
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
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
>> 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
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
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
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
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
58 matches
Mail list logo