Re: HOW TO OUTPUT DATA GOT FROM combined queryset IN DJANGO TEMPLATE (html file) ?

2023-01-16 Thread Byansi Samuel
Thanks it worked but I would like to ask you, why did you use " game" in {%for game in combined_list %} ? En what is the role of 'game' On Sat, Jan 14, 2023, 8:35 PM Hector Mwaky wrote: > >1. > >In the windows_games view in others/views.py, you are using the >filter() method on

Re: HOW TO OUTPUT DATA GOT FROM combined queryset IN DJANGO TEMPLATE (html file) ?

2023-01-14 Thread Hector Mwaky
1. In the windows_games view in others/views.py, you are using the filter() method on the Action and Adventure models to get the action and adventure games that have the 'os' field set to 'windows'. Then you are using the itertools.chain() function to combine the two

Re: If Statement django template

2023-01-12 Thread ASAMOAH EMMANUEL
You can't compare the `contract.supplier` attribute directly to a string like 'IBM', because it is a foreign key to a `Supplier` model instance. Instead, you need to access the related `Supplier` model's attributes to compare them. For example, if the `Supplier` model has a `name` attribute, you

Re: If Statement django template

2023-01-12 Thread Precious Olusola
The supplier field in contract is an instance of a Supplier object which is not a string, so comparing it to a string won't work, instead compare a field of the supplier instance in the supplier field in contract instance. Like: {% if contract.supplier.name == "IBM"%} Do you get it? On Thu,

Re: If Statement django template

2023-01-12 Thread Peter Benjamin Ani
Have you figured out a solution to it? On Thu, 12 Jan 2023, 15:52 Namanya Daniel, wrote: > > Replace supplier with related_name > > On Thu, 12 Jan 2023 at 16:13, 'dtdave' via Django users < > django-users@googlegroups.com> wrote: > >> I have the following relationship in a model >> >> class

HOW TO OUTPUT DATA GOT FROM combined queryset IN DJANGO TEMPLATE (html file) ?

2023-01-12 Thread Byansi Samuel
Hey! Am having a problem. And l request for your Help. Am having 3 apps in Django project - action - adventure - others #action/ models.py class Action(models.Model): name=models.Charfield() os= models.Charfield( choices=OS) #adventure/models.py class

Re: If Statement django template

2023-01-12 Thread Namanya Daniel
Replace supplier with related_name On Thu, 12 Jan 2023 at 16:13, 'dtdave' via Django users < django-users@googlegroups.com> wrote: > I have the following relationship in a model > > class Contract(models.Model): > supplier = models.ForeignKey( > Supplier, >

Re: If Statement django template

2023-01-12 Thread Peter Benjamin Ani
why using a foreignkey then? what type of relationship is existing between the supplier and the On Thu, Jan 12, 2023 at 2:13 PM 'dtdave' via Django users < django-users@googlegroups.com> wrote: > I have the following relationship in a model > > class Contract(models.Model): > supplier =

If Statement django template

2023-01-12 Thread 'dtdave' via Django users
I have the following relationship in a model class Contract(models.Model): supplier = models.ForeignKey( Supplier, on_delete=models.CASCADE, verbose_name="Supplier Name", related_name="contract_suppliers", ) I am trying to include an if statement in my

django template engine and bootstrap modals

2022-02-10 Thread Andrea Villani
Hi everyone! I am developing an appweb and I'm stuck. My homepage is structured as a ListView, where each row shows every object's attributes using django template engine (ex: {{object.attribute}}. Last column shows a button to do an action through a bootstrap modal and if I put {{object

Re: Creating some fields on the fly in django template

2021-10-24 Thread Ammar Mohammed
Hello In your case i wouldn't import all the form at once using, {{ form.as_p}} Instead try to import every single field of your form thenyou can use JavaScript to show and hide fields according to input because django can't do this kind of editing. On 24 Oct 2021 7:32 PM, "Dina Dodin" wrote:

Creating some fields on the fly in django template

2021-10-24 Thread Dina Dodin
Hi i have forms (not using Models) in some forms i want to introduce dropdown list for example in case some specific value is selected for another existing form field. i tried something if found in google but nothing seems to work for me. if someone can help me with it will be great! in html

Re: How to use django template tags in .js file ??

2021-06-17 Thread Ayush Bisht
thanks, It works for me On Wednesday, June 16, 2021 at 12:08:20 PM UTC-7 Nikeet NA wrote: > Or you can store the url in the variable then use it. > > On Thursday, 17 June 2021 at 00:29:00 UTC+5:30 Nikeet NA wrote: > >> Do like this use >> var obj_slug = object.slug inside script tag below

Re: How to use django template tags in .js file ??

2021-06-16 Thread Nikeet NA
Or you can store the url in the variable then use it. On Thursday, 17 June 2021 at 00:29:00 UTC+5:30 Nikeet NA wrote: > Do like this use > var obj_slug = object.slug inside script tag below it include your js file > with the above js script. in js file you can acces it with obj_slug >

Re: How to use django template tags in .js file ??

2021-06-16 Thread Nikeet NA
Do like this use var obj_slug = object.slug inside script tag below it include your js file with the above js script. in js file you can acces it with obj_slug variable. On Wednesday, 16 June 2021 at 22:31:39 UTC+5:30 kuassi...@paydunya.com wrote: > I also had the problem once. But what I

Re: How to use django template tags in .js file ??

2021-06-16 Thread Kuassi Israel
I also had the problem once. But what I understood is that the interpretation of the DJANGO syntax in statics files only works when the file has an HTML extension. So if you really want to do something separate with the script you can just create another HTML file but in another folder where

How to use django template tags in .js file ??

2021-06-16 Thread Ayush Bisht
while doing great stuff with django I have found some clumsy behaviour of django in handling .js file. Is there a way to effectively integrate all the stuff of in a separate file and effectively used it with rest of the html code. for example : // *file.html

Re: Announcing DjHTML: A Django template indender

2021-05-24 Thread RANGA BHARATH JINKA
Awesome On Tue, May 25, 2021 at 10:13 AM lalit suthar wrote: > This is looking pretty cool! > > On Monday, 24 May 2021 at 18:54:12 UTC+5:30 Jaap Joris Vens wrote: > >> Dear all, >> >> I would like to take this opportunity to announce my side project to >>

Re: Announcing DjHTML: A Django template indender

2021-05-24 Thread lalit suthar
This is looking pretty cool! On Monday, 24 May 2021 at 18:54:12 UTC+5:30 Jaap Joris Vens wrote: > Dear all, > > I would like to take this opportunity to announce my side project to > the Django community. It's a Django template indenter called DjHTML. > It's Black for D

Announcing DjHTML: A Django template indender

2021-05-24 Thread Jaap Joris Vens
Dear all, I would like to take this opportunity to announce my side project to the Django community. It's a Django template indenter called DjHTML. It's Black for Django templates! https://github.com/rtts/djhtml/ Over the past year I have fallen in love with Black and pre-commit

Re: using variable in django template

2021-02-16 Thread Kasper Laudrup
On 16/02/2021 13.18, Jiffin George Kokkat wrote: Hi guys, i want to declare a variable in django template and update value of variable inside a loop https://pythoncircle.com/post/701/how-to-set-a-variable-in-django-template/ https://pythoncircle.com/post/685/for-loop-in-django-template

using variable in django template

2021-02-16 Thread Jiffin George Kokkat
Hi guys, i want to declare a variable in django template and update value of variable inside a loop how to do Thanks, Jiffin George Kokkat -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiv

Re: Is it possible to use REST API on Django template ?

2020-12-03 Thread Suhaib Ali
you can use jquery to fetch api calls On Wed, Nov 25, 2020 at 7:49 PM Aman Modi wrote: > > > Hello Django lovers. > > I want to use REST API on Django template but i have no idea how can i do > that. > I want to use same API on android app and Django template. > >

Re: Is it possible to use REST API on Django template ?

2020-11-30 Thread Kris A. Stern
provided useful links for consuming APIs. Just want to > emphasize some concepts between server-side and client-side codes. > A django template is rendered into a page on the *server side*. That > means, the server does the work and prepares the html content before > sending it to the browse

Re: Is it possible to use REST API on Django template ?

2020-11-30 Thread Liu Zheng
Hi, Guys earlier have provided useful links for consuming APIs. Just want to emphasize some concepts between server-side and client-side codes. A django template is rendered into a page on the *server side*. That means, the server does the work and prepares the html content before sending

Re: Is it possible to use REST API on Django template ?

2020-11-29 Thread sree e
Hi find this link https://github.com/sumasreeeduru/Textyfi And go through "api" app , where you will find adding the api in easy way. On Sunday, November 29, 2020 at 12:36:44 PM UTC+5:30 bharath...@gmail.com wrote: > Hi > Use JavaScript or jQuery to call APIs in frontend of

Re: Is it possible to use REST API on Django template ?

2020-11-28 Thread RANGA BHARATH JINKA
Hi Use JavaScript or jQuery to call APIs in frontend of Django template. You can use fetch API using vanilla JavaScript. You can perform all CRUD operations. All the best  On Sun, 29 Nov 2020, 11:57 am Aman Modi, wrote: > I know how to create API but i just want to know how to use in Dja

Re: Is it possible to use REST API on Django template ?

2020-11-28 Thread Aman Modi
I know how to create API but i just want to know how to use in Django template. On Wednesday, November 25, 2020 at 8:07:47 PM UTC+5:30 omkar...@gmail.com wrote: > Creating REST API in Django is similar to any app on Django. All you need > to do is, install the djangorestframework l

Re: Is it possible to use REST API on Django template ?

2020-11-26 Thread Venu Gopal
Yes, it is possible. Below is the documentation. we will use serialization to get a django rest API. https://docs.djangoproject.com/en/3.1/topics/serialization/ On Wed, Nov 25, 2020 at 7:48 PM Aman Modi wrote: > > > Hello Django lovers. > > I want to use REST API on Django temp

Re: Is it possible to use REST API on Django template ?

2020-11-25 Thread Kris A. Stern
ork then > create other urls for your templates .Just install the django rest > framework you are good to go. > > On Wed, Nov 25, 2020, 4:18 PM Aman Modi wrote: > >> >> >> Hello Django lovers. >> >> I want to use REST API on Django template but i have no idea

Re: Is it possible to use REST API on Django template ?

2020-11-25 Thread Farai M
Very possible you can create urls for API with the rest framework then create other urls for your templates .Just install the django rest framework you are good to go. On Wed, Nov 25, 2020, 4:18 PM Aman Modi wrote: > > > Hello Django lovers. > > I want to use REST API on Django

Re: Is it possible to use REST API on Django template ?

2020-11-25 Thread Devender Kumar
utu.be/TmsD8QExZ84 > On Wed, Nov 25, 2020, 7:48 PM Aman Modi wrote: > >> >> >> Hello Django lovers. >> >> I want to use REST API on the Django template but I have no idea how can >> I do that. >> I want to use the same API on the android app and the Djan

Re: Is it possible to use REST API on Django template ?

2020-11-25 Thread Omkar Parab
to use REST API on the Django template but I have no idea how can > I do that. > I want to use the same API on the android app and the Django template. > > Any suggestion. > > Thanks and regard > Aman Modi > > -- > You received this message because you are subscribe

Is it possible to use REST API on Django template ?

2020-11-25 Thread Aman Modi
Hello Django lovers. I want to use REST API on Django template but i have no idea how can i do that. I want to use same API on android app and Django template. Any suggestion . Thanks and regard Aman Modi -- You received this message because you are subscribed to the Google Groups

Re: Add variable value in render field in django template

2020-11-23 Thread Naresh Jonnala
Based on URL structure, find suitable template tag to move forwered. https://docs.djangoproject.com/en/3.1/ref/templates/builtins/#url On Friday, November 20, 2020 at 8:34:08 PM UTC+5:30 rajshre...@gmail.com wrote: > Hi Users, > I have a value in variable occurence counter and I want to pass

Add variable value in render field in django template

2020-11-20 Thread Rajshree Some
Hi Users, I have a value in variable occurence counter and I want to pass this value in this render field .Can anyone help it? {% render_field class+='form-control' data-id="occurence_counter " %} -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Can Django template extend dynamic content in child or grandchild template?

2020-10-14 Thread tristant
Sorry for the badly formatted html code. My question on Stackoverflow here: https://stackoverflow.com/questions/64359521/djang-multiple-levels-of-template-extension-while-keeping-the-elements-of-the-up Thanks, On Wednesday, October 14, 2020 at 1:03:43 PM UTC-6 tristant wrote: > > ... {%

Can Django template extend dynamic content in child or grandchild template?

2020-10-14 Thread tristant
... {% block content %} {% endblock %} category.html : {% extends "base.html" %} {% block content %} < div id="menu_category_display"> {% for category in menu_categories %} {% with category_button="menu_"|add:category.name|lower %} {{category}} {% endwith %} {% endfor %}{% block

Re: django template forloop

2020-10-14 Thread webmbackslash
for field in formone not fieldi Il giorno mer 14 ott 2020 alle ore 13:06 RANGA BHARATH JINKA < bharathjink...@gmail.com> ha scritto: > Hi, > > You have to end for loop for second for loop > > On Wed, Oct 14, 2020 at 4:23 PM luca72.b...@gmail.com < > luca72.bertolo...@gmail.com> wrote: > >>

Re: django template forloop

2020-10-14 Thread RANGA BHARATH JINKA
Hi, You have to end for loop for second for loop On Wed, Oct 14, 2020 at 4:23 PM luca72.b...@gmail.com < luca72.bertolo...@gmail.com> wrote: > Hello > I have this: > {% for x in lista_form %} > {% if forloop.counter < 100 %} > {% for fieldi in formone %} >

django template forloop

2020-10-14 Thread luca72.b...@gmail.com
Hello I have this: {% for x in lista_form %} {% if forloop.counter < 100 %} {% for fieldi in formone %} {{ fieldi.label }} {{ fieldi }} {% endfor %} Immagine {% endif %} {% if

Re: downloading image files from django template

2020-07-26 Thread RANGA BHARATH JINKA
Good On Sun, Jul 26, 2020 at 8:17 PM adiath...@gmail.com wrote: > Thanks, I got the answer. Working now. > > On Sunday, July 26, 2020 at 7:40:42 AM UTC-7 bharath...@gmail.com wrote: > >> Use anchor tag for images url >> >> On Sun, Jul 26, 2020 at 10:16 AM Teaching Tech >> wrote: >> >>> How can

Re: downloading image files from django template

2020-07-26 Thread adiath...@gmail.com
Thanks, I got the answer. Working now. On Sunday, July 26, 2020 at 7:40:42 AM UTC-7 bharath...@gmail.com wrote: > Use anchor tag for images url > > On Sun, Jul 26, 2020 at 10:16 AM Teaching Tech > wrote: > >> How can I download an image file that is shown to the template in Django? >> I'm new

Re: downloading image files from django template

2020-07-26 Thread RANGA BHARATH JINKA
Use anchor tag for images url On Sun, Jul 26, 2020 at 10:16 AM Teaching Tech wrote: > How can I download an image file that is shown to the template in Django? > I'm new to Django. This might be a silly question. But I need to know for > my existing project. > > -- > You received this message

downloading image files from django template

2020-07-25 Thread Teaching Tech
How can I download an image file that is shown to the template in Django? I'm new to Django. This might be a silly question. But I need to know for my existing project. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

RE: how to use .py file function via html or css button from django template

2020-05-23 Thread Vishesh Mangla
filesThen in views I usefrom .backend.my_app import module_nameSent from Mail for Windows 10 From: THIRUMALAIVASAN KSent: 23 May 2020 17:03To: Django usersSubject: how to use .py file function via html or css button from django template Hi,  i have created a site for local use and i need to run some some

how to use .py file function via html or css button from django template

2020-05-23 Thread THIRUMALAIVASAN K
Hi, i have created a site for local use and i need to run some some python script when i click the button , how to do that i am using on raspberry to contoll something via dashboard , so i am used django to create a site but i can't ontroll the GPIO pin's via website button -- You

Re: how to use django template language inside script html tag using django-jsRender

2020-04-03 Thread Antje Kazimiers
Yacin Omar wrote: > As I know, there is no way to use Django template language inside > Javascript block so I searched for a way how to do it, I found a Django app > on github called django-jsrender but unfortunately, there isn't enough > documentation for this app and when I tried

how to use django template language inside script html tag using django-jsRender

2020-04-03 Thread Yacin Omar
As I know, there is no way to use Django template language inside Javascript block so I searched for a way how to do it, I found a Django app on github called django-jsrender but unfortunately, there isn't enough documentation for this app and when I tried to use it I couldn't and this is my

Re: Django Template Tags not working inside script

2019-10-10 Thread Rain
Thanks Alot. its just my code editor not reading it. appreciate your Help..!! On Thu, Oct 10, 2019 at 6:55 PM wd wrote: > hi, > > I didn't think django template tags are relevant with script or any html > code. They are totally different things. > I think it's just your cod

Re: Django Template Tags not working inside script

2019-10-10 Thread Rain
you include this in your html > page? > > Regards, > > Andréas > > > Den tors 10 okt. 2019 kl 12:22 skrev Rain : > >> I want to add an for each method in inside script but for some reason >> django template tags not working in this case only. >> can some

Re: Django Template Tags not working inside script

2019-10-10 Thread Andréas Kühne
son > django template tags not working in this case only. > can someone please help me ! thanks alot > > > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and sto

Re: Django Template Tags not working inside script

2019-10-10 Thread wd
hi, I didn't think django template tags are relevant with script or any html code. They are totally different things. I think it's just your code editor didn't recognize the tags, have you tried ignore them and see if django will report an error ? On Thu, Oct 10, 2019 at 6:22 PM Rain wrote

Django Template Tags not working inside script

2019-10-10 Thread Rain
I want to add an for each method in inside script but for some reason django template tags not working in this case only. can someone please help me ! thanks alot -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubs

Re: Showing proper data in django template

2019-09-16 Thread Adesina Oluwaseun
On Mon, Sep 16, 2019 at 10:15 AM Abu Yusuf wrote: > Hello, I have two models here: > > class Tender(models.Model): > project = models.ForeignKey(Project, verbose_name=_("Select project"), > on_delete=models.CASCADE) > name = models.CharField(_("Tender name"), max_length=250) > value =

Re: Showing proper data in django template

2019-09-16 Thread Abu Yusuf
On Monday, September 16, 2019 at 3:14:43 PM UTC+6, Abu Yusuf wrote: > > Hello, I have two models here: > > class Tender(models.Model): > project = models.ForeignKey(Project, verbose_name=_("Select project"), > on_delete=models.CASCADE) > name = models.CharField(_("Tender name"),

Showing proper data in django template

2019-09-16 Thread Abu Yusuf
Hello, I have two models here: class Tender(models.Model): project = models.ForeignKey(Project, verbose_name=_("Select project"), on_delete=models.CASCADE) name = models.CharField(_("Tender name"), max_length=250) value = models.FloatField(_("Tender value"), default=0, null=True, blank=

Re: Django Template url mapping

2019-08-22 Thread Abu Yusuf
Your template name should be: template_name = "index.html" That's all. On Thu, Aug 22, 2019 at 12:55 PM RONAK JAIN wrote: > Hi > > I am new in Django I am doing struggle with add Django templates using by > inheritance. > > > so when I am trying within *Example:: index.html add inside the >

Django Template url mapping

2019-08-22 Thread RONAK JAIN
Hi I am new in Django I am doing struggle with add Django templates using by inheritance. so when I am trying within *Example:: index.html add inside the blog.html but, *I am getting the direct blog.html, not index.html on the index page. so I used simply in index.html. *index.html:* {%.

Fwd: Django template permissions not working when used inside the template of an inclusion tag

2019-08-12 Thread er
I am uncertain what is the source of the problem here and due to I doubt it is a bug, i checked what is available for django and thought the mailing list is a good place to post this question. You can see the issue better formatted here https://stackoverflow.com/questions/57451323/django

Django compressor issue - media assets from the forms.py won't update in the frontend django template

2019-05-25 Thread Danny Blaker
We are currently experiencing an issue with the Django compressor: We have an app that has forms.py and its media assets from the forms.py won't update in the frontend django template (only stuff inside the django compress tag won't update). This problem came about when we initially included

Re: Django template

2019-02-09 Thread rich gang
gt; cleanest option) or, better, as resources in your project (e.g. plain files > somewhere they can be read from the app code). > > Best > > Eric > > -- > *From:* django-users@googlegroups.com on > behalf of Tom Zhang > *Sent:* Friday, Febr

Re: Django template

2019-02-09 Thread PASCUAL Eric
ur project (e.g. plain files somewhere they can be read from the app code). Best Eric From: django-users@googlegroups.com on behalf of Tom Zhang Sent: Friday, February 8, 2019 19:59 To: Django users Subject: Django template Hi, If I don't want to use

Re: Django template

2019-02-08 Thread Mikko Meronen
t;>> >>>>> Have to say that Im still beginner in Django and coding, but I think >>>>> you just create you html files to your templates folder, and in the end >>>>> you >>>>> are basically using just html. Django can just fin

Re: Django template

2019-02-08 Thread Tom Zhang
nd coding, but I think >>>> you just create you html files to your templates folder, and in the end >>>> you >>>> are basically using just html. Django can just find your html file from >>>> templates folder. >>>> >>>> Im ju

Re: Django template

2019-02-08 Thread Mikko Meronen
>> >>> Im just learning javascript and I assume i can save my js-file to >>> templates folder as well and connect it to my html. >>> >>> -Mikko >>> >>> pe 8.2.2019 klo 21.07 Tom Zhang kirjoitti: >>> >>>> Hi, all, &g

Re: Django template

2019-02-08 Thread Tom Zhang
and connect it to my html. >> >> -Mikko >> >> pe 8.2.2019 klo 21.07 Tom Zhang > >> kirjoitti: >> >>> Hi, all, >>> >>> If I don't want to use Django template engine and I just want to use >>> regular html/javacript, how do I configur

Re: Django template

2019-02-08 Thread Nitin Kalmaste
templates folder as well and connect it to my html. > > -Mikko > > pe 8.2.2019 klo 21.07 Tom Zhang kirjoitti: > >> Hi, all, >> >> If I don't want to use Django template engine and I just want to use >> regular html/javacript, how do I configure settings.py? >&

Re: Django template

2019-02-08 Thread Tom Zhang
just html. Django can just find your html file from > templates folder. > > Im just learning javascript and I assume i can save my js-file to > templates folder as well and connect it to my html. > > -Mikko > > pe 8.2.2019 klo 21.07 Tom Zhang > > kirjoitti: &

Re: Django template

2019-02-08 Thread Mikko Meronen
-file to templates folder as well and connect it to my html. -Mikko pe 8.2.2019 klo 21.07 Tom Zhang kirjoitti: > Hi, all, > > If I don't want to use Django template engine and I just want to use > regular html/javacript, how do I configure settings.py? > I am thinking about the po

Django template

2019-02-08 Thread Tom Zhang
Hi, all, If I don't want to use Django template engine and I just want to use regular html/javacript, how do I configure settings.py? I am thinking about the portability issue. For example, if I want to move away from django in the future, I hope my templates can still be used in other

Django template

2019-02-08 Thread Tom Zhang
Hi, If I don't want to use any Django template and I just want to use regular html/javascript, how should I setup the template config in settings.py? Right now, my settings are: TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS

Re: Django template translation not working as expected

2019-01-10 Thread shiva kumar
Can you explain what are django translation On Thu 10 Jan, 2019 11:59 pm Ashutosh Das I am using django 2.1 , here is all the settings related to translation: > > > MIDDLEWARE = [ > 'corsheaders.middleware.CorsMiddleware', > 'django.middleware.security.SecurityMiddleware', >

Django template translation not working as expected

2019-01-10 Thread Ashutosh Das
I am using django 2.1 , here is all the settings related to translation: MIDDLEWARE = [ 'corsheaders.middleware.CorsMiddleware', 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware',

Re: Django template cheat sheet or ebook

2018-07-30 Thread mottaz hejaze
Can anyone tell me where I can find Django template cheat sheet or ebook. >> > > A quelle Vitesse surfez-vous ? Testez le Débit de votre Accès internet [Test > Complet] <https://www.ipexia.com/test-bande-passante/> > > <https://www.ipexia.com/test-bande-passante/>

Re: Django template cheat sheet or ebook

2018-07-30 Thread Rahul Gurung
search or google or pinterest. On 30 July 2018 at 09:14, aditya gupta wrote: > Can anyone tell me where I can find Django template cheat sheet or ebook. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To

Re: Django template cheat sheet or ebook

2018-07-30 Thread benjamin . bernard-bouissieres
Hello, I have found a lot of example on the Django's CookBook, at this url : https://code.djangoproject.com/wiki/CookBook Le lundi 30 juillet 2018 05:44:44 UTC+2, aditya a écrit : > > Can anyone tell me where I can find Django template cheat sheet or ebook. > -- A quelle Vitesse su

Django template cheat sheet or ebook

2018-07-29 Thread aditya gupta
Can anyone tell me where I can find Django template cheat sheet or ebook. -- 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-user

Re: How to verify if is new record or update record on django template?

2018-07-13 Thread Derek
You can pass in the ID (primary key) of the object from the view to the template. On Thursday, 12 July 2018 15:58:45 UTC+2, Fellipe Henrique wrote: > > How to verify if is new record or update record on django template? How > can i do that? > > Thanks! > > -- You received

Re: How to verify if is new record or update record on django template?

2018-07-12 Thread Jani Tiainen
Hi. Usually you know that in a view. Url routing will be different depending if it's a new record or editing old record. to 12. heinäk. 2018 klo 16.58 Fellipe Henrique kirjoitti: > How to verify if is new record or update record on django template? How > can i do that? > > Thanks!

How to verify if is new record or update record on django template?

2018-07-12 Thread Fellipe Henrique
How to verify if is new record or update record on django template? How can i do that? Thanks! -- 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 dj

Re: django template rendering performance

2018-07-10 Thread Andrew Paulsen
No, Django renders the templates. Masoud, if you suspect there are negative difference between 2.7 and 3.5, please try to make a minimal app showing off the problem so the devs can fix it. On 2018-07-10 09:11, mottaz hejaze wrote: > i dont think so . rendering templates , though rendering

Re: django template rendering performance

2018-07-09 Thread mottaz hejaze
i dont think so . rendering templates , though rendering templates us a matter of the web server then users browsers On Tue, 10 Jul 2018, 00:56 Masoud Sadri, wrote: > Hi, > when rendering django(v 1.11) templates, is there any performance > difference between python 2.7 and 3.5? > > Thanks. > >

django template rendering performance

2018-07-09 Thread Masoud Sadri
Hi, when rendering django(v 1.11) templates, is there any performance difference between python 2.7 and 3.5? Thanks. -- 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

Re: Passing Django Template Vars to JS

2018-06-11 Thread Melvyn Sopacua
On maandag 11 juni 2018 20:11:36 CEST Simon Connah wrote: > I like the idea of the custom attribute. I'll do that then. The common way is to use a data- attribute[1]. -- Melvyn Sopacua [1] https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/ Use_data_attributes -- You received

Re: Passing Django Template Vars to JS

2018-06-11 Thread Simon Connah
t; > > > > On Sun, Jun 10, 2018 at 11:19 AM Simon Connah wrote: >> >> I know that the standard way to do this is to create a script tag with >> a global JS variable in your Django template before you import your >> other JS files but that won't work for my cu

Re: Passing Django Template Vars to JS

2018-06-10 Thread Vijay Khemlani
ave a button with ID "like_comment_button") so it's better to add it as a class rather than an id. Regards On Sun, Jun 10, 2018 at 11:19 AM Simon Connah wrote: > I know that the standard way to do this is to create a script tag with > a global JS variable in your Django templa

Passing Django Template Vars to JS

2018-06-10 Thread Simon Connah
I know that the standard way to do this is to create a script tag with a global JS variable in your Django template before you import your other JS files but that won't work for my current situation. I have an article detail view which is a single model instance. But I also have a list of comment

Having trouble writing loop in Django template

2018-04-02 Thread shawnmhy
Hello guys I am currently working on django views and templates and met some problems. I have a model named 'metabolites', which contains: id, name, compartment, charge and formula 5 components. I have another model named 'Reactionsmeta', which contains: id(reactions), name, metabolie1,

Re: Django Template and compating with select option value

2017-10-29 Thread Andréas Kühne
Hi, I am not really sure what you are trying to accomplish. What you are writing doesn't make sense. I think you should check how to write the paginate by properties. You can find some information here: https://docs.djangoproject.com/en/1.11/topics/pagination/

Django Template and compating with select option value

2017-10-28 Thread Naaim Iss
Hello everyone. I hace a ListView-based class with attribute `paginate_by = 12`. There is in HTML-template a select element with seveeral options, for pagination of course. Options come to the page from context. Loks like this: ` {% for item in per_page_options %} {{ item }} {% endfor

Re: Create Mobile App from Django Template

2017-07-18 Thread carlos
Hi, but is he need stored information offline, the app save data (local stored) and then synchronize with the databases in django (web databases) How can you do something like that? On Mon, Jul 17, 2017 at 1:55 PM, Marsel Xhaxho wrote: > Hello, > > Django Rest Framework

Re: Create Mobile App from Django Template

2017-07-17 Thread Marsel Xhaxho
Hello, Django Rest Framework to the rescue. You can use this package to expose your database via a HTTP REST api and consume it via swift/java or any other language/platform you might think. This actually is the way web works nowadays, even for web apps.

Re: Create Mobile App from Django Template

2017-07-17 Thread Jani Tiainen
Hi, There are numerous ways to do that. You could create mobile version of your site or do called responsive design. That way site would be accessible with virtually any device. If you want to create native app you can write for example rest api to provide data for your app. 17.7.2017 21.54

Create Mobile App from Django Template

2017-07-17 Thread Megan Zhao
My friend and I followed the Django tutorial to create a web blog where the professors can post their office hours and students can access to search and browse. We want to create a mobile app that contains the same info so that when the professors post on the web, the info in the app also

Re: Show HTML tags in list in Django template

2017-04-16 Thread ludovic coues
asic info about it. I'm > using BeuatifulSoup4 and Python3. Code is simple, but i have problem to > force Django template show variables in my list. For example this simple > code in template: > >> {{ tags_hx }} >> Tags H1 - H7 >>

Show HTML tags in list in Django template

2017-04-15 Thread Moreplavec
Greetings, i'm trying to parse HTML website and present same basic info about it. I'm using BeuatifulSoup4 and Python3. Code is simple, but i have problem to force Django template show variables in my list. For example this simple code in template: {{ tags_hx }} > Tags H1 -

Re: Iframe'd page in Django template can't find it's Javascript or CSS files, 404 error

2017-03-05 Thread Melvyn Sopacua
On Friday 03 March 2017 20:37:29 Tom Tanner wrote: > When the iframe requests > `/interactive`, it loads `interactive-1/index.html`. But the iframe still loads /interactive. So it's base url is /interactive and a request for scripts/main.js is /interactive/scripts/main.js. Unless you either: 1/

Re: Iframe'd page in Django template can't find it's Javascript or CSS files, 404 error

2017-03-05 Thread chris rose
there is a lack of information here, though you last post suggests maybe you missed a couple of template tags at the start of you index.html add: {% load staticfiles %} and then when adding you scripts use: -- You received this message because you are subscribed to the Google Groups

Re: Iframe'd page in Django template can't find it's Javascript or CSS files, 404 error

2017-03-04 Thread Daniel Roseman
On Saturday, 4 March 2017 15:57:49 UTC, Tom Tanner wrote: > > >How are you referring to the assets in the template? > > In `interactive/index.html`, in the `` tag, I have ` src="scripts/main.js">` > Well, if you wanted to load the scripts from /interactive-1/scripts/main.js, then that's what you

  1   2   3   4   5   6   >