Re: How to use different templates for different sites/domains

2024-05-29 Thread Faisal Mahmood
You're right, using a single Django instance to serve multiple sites with overridden templates can be tricky. While a custom template loader might seem appealing, it's true that it doesn't accept the request object by default. Here's the breakdown and some alternative solutions: The Challenge

Re: How to use different templates for different sites/domains

2024-05-28 Thread Mike Dewhirst
On 28/05/2024 9:09 pm, Antonis Christofides wrote: Hello, I use the sites framework for a Django project that serves many different domains. But each of those domains has some templates overridden. Might depend on what you are overriding - entire templates or just includes or just vars

How to use different templates for different sites/domains

2024-05-28 Thread Antonis Christofides
Hello, I use the sites framework for a Django project that serves many different domains. But each of those domains has some templates overridden. If I used a different instance of Django (i.e. a different gunicorn service) for each domain, I'd have different settings for each site. But I'm

Re: how to display group and create user permission in templates?

2024-02-20 Thread ABDUL HAFEEZ
much appreciated On Tuesday, February 20, 2024 at 7:55:47 AM UTC+5 Ryan Nowakowski wrote: > On Mon, Feb 19, 2024 at 02:16:29AM -0800, ABDUL HAFEEZ wrote: > > Hell all how to display *createsuperuser *and there permission in > *templates > > *instead of admin da

how to display group and create user permission in templates?

2024-02-19 Thread ABDUL HAFEEZ
Hell all how to display *createsuperuser *and there permission in *templates *instead of admin dashboard -- 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, sen

Re: my mysite/templates/admin/base_site.html is ignored (tutorial unclear?)

2023-03-12 Thread Amar Zamoum
I just had the same problem, and i realized that i had the templates file in the wrong "mysite" folder. It is easy to confuse the two, so for whoever has the same problem, just check where exactly you have put the "template/admin" folders, because in the tutorial i

Django Regoup - Sum in templates

2022-09-28 Thread aXXyss Soluciones
Hi, I want to get the Volume subtotal of my "Contracts" field grouped in my template. I manage to display the total but not the subtotal. *models.py* class TransColisCgDlaDet(models.Model): id_trans_colis = models.AutoField(primary_key=True) essence = models.CharField(max_length=15,

Re: How To expertise Django templates Language(DTL)

2022-05-23 Thread Mike Dewhirst
On 24/05/2022 4:30 am, waqar khan wrote: How To expertise Django templates Language(DTL) Kindy help me, i am intermediate DTL , any budy suggest link , you  tube video or books. This is likely your best bet ... https://docs.djangoproject.com/en/4.0/topics/templates/ -- You received

How To expertise Django templates Language(DTL)

2022-05-23 Thread waqar khan
How To expertise Django templates Language(DTL) Kindy help me, i am intermediate DTL , any budy suggest link , you tube video or books. -- 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 Overriding widget templates buggy?

2022-04-03 Thread Antonis Christofides
Hi, I'm not really an expert in that part. From what I can read in the documentation, TemplatesSetting isn't a template backend, so why do you think you can specify it in TEMPLATES[x]['BACKEND']? It appears to be a form renderer, which means you can specify it in FORM_RENDERER

Is Overriding widget templates buggy?

2022-04-03 Thread run_the_race
I was going to report a bug, but the guide recommends asking here first. While trying to override a built in widget template (still stuck on it here: https://forum.djangoproject.com/t/overriding-widgets-templates-not-working-following-help-template-loader-not-searching-app-dirs/12974), I

Re: What methods are available to determining display type & screen dimensions for dynamic formatting of Django templates.

2022-03-17 Thread Jason
It does seem like you're looking for something related to analytics, ie Google Analytics or one of the alternatives. On Thursday, March 17, 2022 at 5:52:14 AM UTC-4 Django2021 wrote: > Increasingly we are finding the need to have reactive Django templates, in > order to present cross pl

What methods are available to determining display type & screen dimensions for dynamic formatting of Django templates.

2022-03-17 Thread Django2021
Increasingly we are finding the need to have reactive Django templates, in order to present cross platform Django forms and pages to not only desktop users buy also tablet, and mobile phone users. We realize Bootstrap offers breakpoints as a means to control columns, still we are looking

Re: Reusable django templates

2022-03-14 Thread Heman Okumbo
Can't customize individual templates:the templates inherit all the properties of the base template eg styling and content.I am not able to add custom content to the template that inherits from base template. On Sat, Mar 12, 2022, 21:37 Clive Bruton wrote: > > On 12 Mar 2022, at 17:43,

Re: Reusable django templates

2022-03-12 Thread Clive Bruton
On 12 Mar 2022, at 17:43, Heman Okumbo wrote: How comes I'm not able to modify my templates after extending from a base template.eg can't add extra contents,the template only display contents of the inherited template. Some code might help. It's not really clear to me what you are asking

Reusable django templates

2022-03-12 Thread Heman Okumbo
How comes I'm not able to modify my templates after extending from a base template.eg can't add extra contents,the template only display contents of the inherited template. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubs

Reusable form templates not working in Django 4.0?!

2022-01-30 Thread Sammeeey
Please find the respective post in the Django Forum <https://forum.djangoproject.com/t/reusable-form-templates-not-working-in-django-4-0/11886> -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group an

"include super" with django templates?

2021-12-30 Thread Nick Farrell
form instance, I cannot just override the default template name) Another example is say django/forms/templates/django/forms/widgets/number.html. It consists of a single include() statement pointint to input.html. I would like to override input.html, but in a way which eventually renders

Re: Multiple Templates in single list view

2021-11-24 Thread Lalit Suthar
I have gone through your views and template. They are looking fine to me. Are you getting any error? On Wed, 24 Nov 2021 at 23:02, Lalit Suthar wrote: > > Anyone plz review my code i am struggling to figure out what the issue > here is > > What is the issue you are trying to resolve right now?

Re: Multiple Templates in single list view

2021-11-24 Thread Lalit Suthar
> Anyone plz review my code i am struggling to figure out what the issue here is What is the issue you are trying to resolve right now? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails

Re: Multiple Templates in single list view

2021-11-22 Thread Trippy Samurai
Its done bro model is configured already i didn't just posted the models.py file On Monday, 22 November 2021 at 21:18:12 UTC+5:30 ram.asf...@gmail.com wrote: > will update asap > > On Mon, Nov 22, 2021 at 1:22 PM David Nugent wrote: > >> Well, there are several ways you can deal with that. >>

Re: Multiple Templates in single list view

2021-11-22 Thread ram s
i think u forgot to configure model, please once configure and complete check first On Mon, Nov 22, 2021 at 4:36 PM Trippy Samurai wrote: > Thanks David for the idea i appreciate it i have gone with last way of > doing things but it doesnt render anything on data > > Pls correct my code below >

Re: Multiple Templates in single list view

2021-11-22 Thread ram s
will update asap On Mon, Nov 22, 2021 at 1:22 PM David Nugent wrote: > Well, there are several ways you can deal with that. > > Probably easiest is to override get_template() and switch the template > based on whatever type of ticket you're managing or you can change the > value of

Re: Multiple Templates in single list view

2021-11-22 Thread Trippy Samurai
Anyone plz review my code i am struggling to figure out what the issue here is On Monday, 22 November 2021 at 16:35:32 UTC+5:30 Trippy Samurai wrote: > Thanks David for the idea i appreciate it i have gone with last way of > doing things but it doesnt render anything on data > > Pls correct my

Re: Multiple Templates in single list view

2021-11-22 Thread Trippy Samurai
Thanks David for the idea i appreciate it i have gone with last way of doing things but it doesnt render anything on data Pls correct my code below *views.py:* class DeveloperTicketView(TemplateView): template_name = 'app/ticket_view.html' ticket = Ticket.objects.all() extra_content =

Re: Multiple Templates in single list view

2021-11-21 Thread David Nugent
Well, there are several ways you can deal with that. Probably easiest is to override get_template() and switch the template based on whatever type of ticket you're managing or you can change the value of self.template_name based on the request. Or maybe you prefer a single template to deal with

Re: Multiple Templates in single list view

2021-11-21 Thread Trippy Samurai
What about the templates i have three different templates for as u can see in template_name in the above views ,how do i deal with it if i actualyl had one template the above could have worked. On Monday, 22 November 2021 at 12:42:59 UTC+5:30 sutharl...@gmail.com wrote: > we can go l

Re: Multiple Templates in single list view

2021-11-21 Thread David Nugent
Hi Lalit, On Mon, Nov 22, 2021 at 6:12 PM Lalit Suthar wrote: > we can go like > > ``` > > class Manager(...): > def get_context_data(self, **kwargs): > context = super() > context["open_tickets"] = Ticket.objects.filter(status="OPEN") > context["accepted_tickets"] =

Re: Multiple Templates in single list view

2021-11-21 Thread Lalit Suthar
b: elena <http://github.com/elena/> >> >> >> On Mon, 22 Nov 2021 at 15:20, Trippy Samurai >> wrote: >> >>> Any one plz >>> >>> >>> On Sunday, 21 November 2021 at 15:09:39 UTC+5:30 Trippy Samurai wrote: >>&

Re: Multiple Templates in single list view

2021-11-21 Thread Trippy Samurai
UTC+5:30 Trippy Samurai wrote: >> >>> Hello, >>> I have different views for displaying different templates how do i write >>> them into one single Listview so that i can take care of DRY >>> >>> >>> [image: Screenshot 2021-11-21

Re: Multiple Templates in single list view

2021-11-21 Thread Elena Williams
r 2021 at 15:09:39 UTC+5:30 Trippy Samurai wrote: > >> Hello, >> I have different views for displaying different templates how do i write >> them into one single Listview so that i can take care of DRY >> >> >> [image: Screenshot 2021-11-21 at 3.08.5

Re: Multiple Templates in single list view

2021-11-21 Thread Trippy Samurai
Any one plz On Sunday, 21 November 2021 at 15:09:39 UTC+5:30 Trippy Samurai wrote: > Hello, > I have different views for displaying different templates how do i write > them into one single Listview so that i can take care of DRY > > > [image: Screenshot 2021-11-21

Re: Recognize Tags in templates

2021-10-28 Thread N'BE SORO
Hello Django tag is: {% %} Le jeu. 28 oct. 2021 à 14:48, Keila Z. Carpio T. a écrit : > Good morning, > > Hello Everybody, > > I use the tags to templates but it is being recognized for Server to show > content > > > > Please Help me. > > Greetings

Re: Recognize Tags in templates

2021-10-28 Thread Manuel Pita
Hi, Try changing what <% %> to {% %} El El jue, 28 oct 2021 a las 16:49, Keila Z. Carpio T. escribió: > Good morning, > > Hello Everybody, > > I use the tags to templates but it is being recognized for Server to show > content > > > > Please Help me.

Re: Recognize Tags in templates

2021-10-28 Thread sachinbg sachin
it seems like, use curly encoded <{}> thank you sachin b.g On Thu, 28 Oct 2021 at 20:18, Keila Z. Carpio T. wrote: > Good morning, > > Hello Everybody, > > I use the tags to templates but it is being recognized for Server to show > content > > > > Please

making TemplateView.template_name point to a file NOT in the templates directory.

2021-05-20 Thread Sharif Mehedi
I do not have a django-admin project and using django views (along with other django submodules) in my python app, so, i do not have a directory structure like django projects has and I never had a templates directory in my app. The way we configured it, serving from templates directory is out

RES: how to prevent Django do auto capitalize static text in templates

2021-05-18 Thread samuel nogueira bacelar
Adding Bootstrap's class="text-lowercase" was the way to go. Thank you!! Enviado do Email para Windows 10 De: Jason TurnerEnviado:terça-feira, 18 de maio de 2021 10:28Para: django-users@googlegroups.comAssunto: Re: how to prevent Django do auto capitalize static text in template

Re: how to prevent Django do auto capitalize static text in templates

2021-05-18 Thread Jason Turner
Have you tried Bootstrap's class="text-lowercase"? On Tue, May 18, 2021, 8:23 AM Samuel Nogueira wrote: > I am using bootstrap, so my CSS shouldn't go wrong > > > Em ter., 18 de mai. de 2021 às 10:04, 712189512 < > gabrielstonede...@gmail.com> escreveu: > >> It’s not django that’s doing

Re: how to prevent Django do auto capitalize static text in templates

2021-05-18 Thread Liu Zheng
Checking CSS is the right way to go. To verify, simply comment out all css styles (internal or external ones) and strip off the classes from these few lines. You shouldn’t have capitalisation problem any more On Tue, 18 May 2021 at 9:23 PM, Samuel Nogueira wrote: > I am using bootstrap, so my

Re: how to prevent Django do auto capitalize static text in templates

2021-05-18 Thread Samuel Nogueira
I am using bootstrap, so my CSS shouldn't go wrong Em ter., 18 de mai. de 2021 às 10:04, 712189512 escreveu: > It’s not django that’s doing that,have you checked your css? > > On Tue, 18 May 2021 at 12:56 David Tobrise wrote: > >> What happens if you try outputting the units from dynamically

Re: how to prevent Django do auto capitalize static text in templates

2021-05-18 Thread 712189512
Put that in a span and use css text-transform and set it to lowercase On Tue, 18 May 2021 at 13:18 Samuel Nogueira wrote: > Unfortunately didnt worked > > > Em ter., 18 de mai. de 2021 às 10:03, RANGA BHARATH JINKA < > bharathjink...@gmail.com> escreveu: > >> Hi, >> >> Try this jinja templating

Re: how to prevent Django do auto capitalize static text in templates

2021-05-18 Thread Samuel Nogueira
I didnt tried this yet, maybe should. Em ter., 18 de mai. de 2021 às 09:55, David Tobrise escreveu: > What happens if you try outputting the units from dynamically instead of > hard-coding it? > > *Best Regards,* > *David O. T.* > > > > > On Tue, May 18, 2021 at 1:07 PM samuel nogueira bacelar

Re: how to prevent Django do auto capitalize static text in templates

2021-05-18 Thread Samuel Nogueira
Unfortunately didnt worked Em ter., 18 de mai. de 2021 às 10:03, RANGA BHARATH JINKA < bharathjink...@gmail.com> escreveu: > Hi, > > Try this jinja templating lower filter > > {{ 'helLo WOrlD'|lower }} > > > On Tue, May 18, 2021 at 6:26 PM David Tobrise > wrote: > >> What happens if you try

Re: how to prevent Django do auto capitalize static text in templates

2021-05-18 Thread 712189512
It’s not django that’s doing that,have you checked your css? On Tue, 18 May 2021 at 12:56 David Tobrise wrote: > What happens if you try outputting the units from dynamically instead of > hard-coding it? > > *Best Regards,* > *David O. T.* > > > > > On Tue, May 18, 2021 at 1:07 PM samuel

Re: how to prevent Django do auto capitalize static text in templates

2021-05-18 Thread RANGA BHARATH JINKA
Hi, Try this jinja templating lower filter {{ 'helLo WOrlD'|lower }} On Tue, May 18, 2021 at 6:26 PM David Tobrise wrote: > What happens if you try outputting the units from dynamically instead of > hard-coding it? > > *Best Regards,* > *David O. T.* > > > > > On Tue, May 18, 2021 at 1:07 PM

Re: how to prevent Django do auto capitalize static text in templates

2021-05-18 Thread David Tobrise
What happens if you try outputting the units from dynamically instead of hard-coding it? *Best Regards,* *David O. T.* On Tue, May 18, 2021 at 1:07 PM samuel nogueira bacelar < hu3mule...@gmail.com> wrote: > Hi guys! > > I have something that appears to be a simple problem but I didn’t find

how to prevent Django do auto capitalize static text in templates

2021-05-18 Thread samuel nogueira bacelar
Hi guys!I have something that appears to be a simple problem but I didn’t find anything useful anywhere. My problem is that my text in a template next to a Django tag keeps auto capitalizing but I don’t want this to happen. In the image above you can see that m³/ano and m² is not capitalized at

Possible Bug: when using memcache backend, fragment templates aren't stored

2021-01-11 Thread Leon Albrecht
So, in my Project I have template that generates a lot of prcedual html (for loop with about 150 entries at once) so cahcing that "snippet" is a reasonable choice, but after activating caching for that project and this template, I still got consistent long generation times, so I looked in the

Shouldn't there be a library already for how to render your JS Frontend code into HTML and then insert your Django templates with jinja2 very easily?

2020-06-18 Thread Andrew
Hi all! I'm no frontend person, but I do help triage issues in djangorestframework-simplejwt. It's probably one of the most used authentication library for DRF users and most of all frontend framework devs of Django (i.e. React, Angular, Vue). I've been getting lots of comments about issue

DJango upvoting, downvoting - functions in templates

2020-06-02 Thread Jan Gregorczyk
': question, 'form' : form},) I'd like to use this function here with upvote, downvote elements.: {% for answer in question.answers.all %} {{answer.author}} {{answer.content}} {{answer.votes.count}} {% endfor %} Also I'm not sure which functions can be called in Django templates. Only those having

Re: Templates vs. source code

2020-05-29 Thread אורי
related to an answer of mine - >> how to access settings from templates in Django [ >> https://stackoverflow.com/a/53953578/1412564]. And I would like to know >> - is it generally unsafe to expose all my settings to templates and why? >> Should I use the updated answer and

Re: Templates vs. source code

2020-05-29 Thread Sencer Hamarat
, Sencer HAMARAT ‪On Fri, May 29, 2020 at 7:11 AM ‫אורי‬‎ wrote:‬ > Django users, > > There was a discussion in Stack Overflow related to an answer of mine - > how to access settings from templates in Django [ > https://stackoverflow.com/a/53953578/1412564]. And I wou

Templates vs. source code

2020-05-28 Thread אורי
Django users, There was a discussion in Stack Overflow related to an answer of mine - how to access settings from templates in Django [ https://stackoverflow.com/a/53953578/1412564]. And I would like to know - is it generally unsafe to expose all my settings to templates and why? Should I use

Re: Can we use python related api's on the Django templates ?

2020-05-28 Thread Derek
While you cannot use Python operators and functions directly in the templates, you can write your own "wrappers" around those you need: https://docs.djangoproject.com/en/3.0/howto/custom-template-tags/ On Wednesday, 27 May 2020 15:57:34 UTC+2, Daniel Roseman wrote: > > On W

Re: Regarding redering data in html templates

2020-05-27 Thread VenkataSivaRamiReddy
Chowdary < > karthichowdary...@gmail.com> wrote: > >> Hi i was beginner in django and i have a small query in templates. >> For suppose in the home page of any client browser if we have a button >> like SKINCARE or HEALTH CARE and if we click on that buttons we n

Re: Can we use python related api's on the Django templates ?

2020-05-27 Thread Daniel Roseman
think inside the {% %} we can > use python related evaluations. Am I right? > > Please throw some lights on this . > > Thanks. > > No, you are wrong, and this is explicitly pointed out in the docs (https://docs.djangoproject.com/en/3.0/ref/templates/language/): > bear

Can we use python related api's on the Django templates ?

2020-05-27 Thread ratnadeep ray
Hi all, Currently I am trying to print the type of a variable from the Django template html file as follows: The type of feature list report for version > {%type(version)%} is For the above, I am getting the following error: Invalid block tag on line 9: 'type(version)'. Did you

Re: Regarding redering data in html templates

2020-05-27 Thread Ifeanyi Chielo
...@unn.edu.ng http://www.unn.edu.ng/users/ifeanyichielo <http://www.unn.edu.ng> On Mon, May 25, 2020 at 4:05 PM Karthiki Chowdary < karthichowdary...@gmail.com> wrote: > Hi i was beginner in django and i have a small query in templates. > For suppose in the home page of any cl

Re: Regarding redering data in html templates

2020-05-27 Thread Karthiki Chowdary
ps://scotch.io/tutorials/working-with-django-templates-static-files > > On Monday, 25 May 2020 17:06:25 UTC+2, Karthiki Chowdary wrote: >> >> Hi i was beginner in django and i have a small query in templates. >> For suppose in the home page of any client browser if we have a button

Re: Regarding redering data in html templates

2020-05-27 Thread Derek
Lots of examples out there, but here is one: https://www.gun.io/blog/how-to-list-items-in-a-dictionary-in-a-django-template For working with static files (such as CSS or images), have a look at: https://scotch.io/tutorials/working-with-django-templates-static-files On Monday, 25 May 2020 17:06

Re: Regarding rendering templates query

2020-05-25 Thread Karthiki Chowdary
10:47 AM UTC-4, Karthiki Chowdary wrote: >> >> Hi, >> >> I have a query in in templates i was a beginner in django and python. >> Please help me out in this query . >> >> For suppose i have a buttons on client browser like SKINCARE or HAIR CARE >> product

Re: Regarding rendering templates query

2020-05-25 Thread Joe Leger
Where you are rendering a single image, instead use a for loop to render all of your images like so: {% for image in images %} {% endfor %} On Monday, May 25, 2020 at 11:10:47 AM UTC-4, Karthiki Chowdary wrote: > > Hi, > > I have a query in in templates i was a beginn

Regarding rendering templates query

2020-05-25 Thread Karthiki Chowdary
Hi, I have a query in in templates i was a beginner in django and python. Please help me out in this query . For suppose i have a buttons on client browser like SKINCARE or HAIR CARE products if i click on that buttons it should display the logos of skin care products or hair care products

Regarding redering data in html templates

2020-05-25 Thread Karthiki Chowdary
Hi i was beginner in django and i have a small query in templates. For suppose in the home page of any client browser if we have a button like SKINCARE or HEALTH CARE and if we click on that buttons we need to get the data of all skin care products companies logos/ health care companies logos

Templates in Django

2020-05-14 Thread אורי
edit_profile_links_1 %} {% if request.user.profile.is_active %} {% endif %} {% endblock %} Is this the correct way to do this? Or is there a better way to extend templates? Thanks, Uri. אורי u...@speedy.net -- You received this message because you are subscribed to the Google Groups

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 >

django templates stop to working html autocomplete

2020-05-07 Thread Eren ARTUÇ
hello everyone, Im using Vs.Code. When i enabled to django templates, my HTML autocomlete doesnt work. i want to work Python and HTML at the same time. How can i solve this problem ? Do you have any idea ? -- You received this message because you are subscribed to the Google Groups "D

Security question: Can Django templates be used to execute arbitrary code on the server?

2020-05-05 Thread jrief
Is it safe to keep Django template strings inside a TextField of a Django model and allow users with staff privileges to edit them? I'm asking because I'm unsure how safe/dangerous this could be. Would it be possible to abuse a built-in templatetag to execute arbitrary code on the server?

Re: Django s3 video files displaying to templates

2020-03-12 Thread Naveen Arora
video files in S3 to django > templates. > > Thanks in advance for your help > -- 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-

Django s3 video files displaying to templates

2020-03-11 Thread Irfan Khan
Hi all, Can any one guide me how to display uploaded video files in S3 to django templates. Thanks in advance for your help -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails fro

Re: Beginner needs help getting templates to work - is this the right group?

2020-03-07 Thread Deborah Emeni
ral times and >>>>> re-entered it, so I think it is unlikely that it is a typing error. >>>>> >>>>> >>>>> On Thu, Mar 5, 2020 at 8:27 PM Jorge Gimeno >>>>> wrote: >>>>> >>>>>> >>

Re: Beginner needs help getting templates to work - is this the right group?

2020-03-07 Thread Vikash Chitransh
020 at 6:04 PM Philip Means wrote: >> >>> I am new to web development. Wanted to help my daughter with a simple >>> website (she does pet portraits) and learn something that interests me. I >>> watched some you tube tutorials, then bought a book. First c

Re: Beginner needs help getting templates to work - is this the right group?

2020-03-06 Thread Ali Abubakar Muhd
May be you forgot to tell django where it looks for your template directory. To do this in your project directory go to setting and create a variable like this; TEMPLATE_DIR = os.path.join( BASE_DIR, 'templates') Then locate TEMPLATES in your setting and put TEMPLATE_DIR variable in DIRS, like

Re: Beginner needs help getting templates to work - is this the right group?

2020-03-06 Thread Shishir Jha
it is unlikely that it is a typing error. >>>> >>>> >>>> On Thu, Mar 5, 2020 at 8:27 PM Jorge Gimeno >>>> wrote: >>>> >>>>> >>>>> On Thu, Mar 5, 2020 at 6:04 PM Philip Means >>>>> wrote: >>>>>

Re: Beginner needs help getting templates to work - is this the right group?

2020-03-06 Thread Jorge Gimeno
o >>> wrote: >>> >>>> >>>> On Thu, Mar 5, 2020 at 6:04 PM Philip Means >>>> wrote: >>>> >>>>> I am new to web development. Wanted to help my daughter with a simple >>>>> website (she does pet portrait

Re: Beginner needs help getting templates to work - is this the right group?

2020-03-06 Thread Philip Means
lopment. Wanted to help my daughter with a simple >>>>> website (she does pet portraits) and learn something that interests me. I >>>>> watched some you tube tutorials, then bought a book. First couple simple >>>>> projects went OK. Then I got to template

Re: Beginner needs help getting templates to work - is this the right group?

2020-03-06 Thread SHANKAR JHA
t;> >>>> I am new to web development. Wanted to help my daughter with a simple >>>> website (she does pet portraits) and learn something that interests me. I >>>> watched some you tube tutorials, then bought a book. First couple simple >>>>

Re: Beginner needs help getting templates to work - is this the right group?

2020-03-06 Thread Alvaro Orozco
Wanted to help my daughter with a simple >>>> website (she does pet portraits) and learn something that interests me. I >>>> watched some you tube tutorials, then bought a book. First couple simple >>>> projects went OK. Then I got to templates and I have not been

Re: Beginner needs help getting templates to work - is this the right group?

2020-03-06 Thread Byiringiro Yves
my daughter with a simple >>>> website (she does pet portraits) and learn something that interests me. I >>>> watched some you tube tutorials, then bought a book. First couple simple >>>> projects went OK. Then I got to templates and I have not been able to get >>

Re: Beginner needs help getting templates to work - is this the right group?

2020-03-05 Thread Jorge Gimeno
020 at 8:27 PM Jorge Gimeno wrote: >> >>> >>> On Thu, Mar 5, 2020 at 6:04 PM Philip Means wrote: >>> >>>> I am new to web development. Wanted to help my daughter with a simple >>>> website (she does pet portraits) and learn something that interests

Re: Beginner needs help getting templates to work - is this the right group?

2020-03-05 Thread Shishir Jha
t; I am new to web development. Wanted to help my daughter with a simple >>> website (she does pet portraits) and learn something that interests me. I >>> watched some you tube tutorials, then bought a book. First couple simple >>> projects went OK. Then I got to templates and

Re: Beginner needs help getting templates to work - is this the right group?

2020-03-05 Thread Shishir Jha
Can you show the code that you have written upto page 55? -- 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 view

Re: Beginner needs help getting templates to work - is this the right group?

2020-03-05 Thread Jorge Gimeno
ects went OK. Then I got to templates and I have not been able to get > the example project to work. Been banging my head against the wall for > about a week. Part of the problem is my directory structure does not look > like the authors and so I am not sure I am putting things in the rig

Beginner needs help getting templates to work - is this the right group?

2020-03-05 Thread Philip Means
I am new to web development. Wanted to help my daughter with a simple website (she does pet portraits) and learn something that interests me. I watched some you tube tutorials, then bought a book. First couple simple projects went OK. Then I got to templates and I have not been able to get

New to Django, need help using my intermediate table to show the m2m relationship in my templates.

2020-02-24 Thread Silas Nicholls
-templates Thank you in advance. -- 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 view this discussion on the

Re: Access to choice-value-constants from templates when using IntegerChoices

2020-01-29 Thread Integr@te System
odel(models.Model): > class State(models.IntegerChoices): > DRAFT = 0, 'draft' > PUBLISHED = 1, 'published' > state = models.PositiveIntegerField(choices=State, default=State.DRAFT) > > But then I'm not able to access the constant values for the states fr

Access to choice-value-constants from templates when using IntegerChoices

2020-01-29 Thread Bernhard Dick
): class State(models.IntegerChoices): DRAFT = 0, 'draft' PUBLISHED = 1, 'published' state = models.PositiveIntegerField(choices=State, default=State.DRAFT) But then I'm not able to access the constant values for the states from my templates. Is there a preffered way to circumvent

Re: Removing Hardcoded urls in Templates

2019-12-10 Thread Bruckner de Villiers
Thank you Daniel. Bruckner de Villiers 083 625 1086 From: on behalf of Daniel Hepper Reply to: Date: Tuesday, 10 December 2019 at 13:54 To: Subject: Re: Removing Hardcoded urls in Templates It should be {% url 'polls:detail' question.id %} I think you mixed up the steps

Re: Removing Hardcoded urls in Templates

2019-12-10 Thread Bruckner de Villiers
Thank you Sencer. Bruckner de Villiers 083 625 1086 From: on behalf of Sencer Hamarat Reply to: Date: Tuesday, 10 December 2019 at 13:51 To: Subject: Re: Removing Hardcoded urls in Templates Would you please replace url name with 'polls:detail', as described at https

Re: Removing Hardcoded urls in Templates

2019-12-10 Thread GGFU GAME
Your code: “<*li*><*a* href="{% *url* 'detail' question.id %}">{{ question.question_text }}” Try addinga polls:detail like this: “<*li*><*a* href="{% *url* 'polls:detail' question.id %}">{{ question.question_text }}” uto, 10. dec 2019. 11:58 Bruckner de Villiers је написао/ла: > Running

Re: Removing Hardcoded urls in Templates

2019-12-10 Thread Daniel Hepper
It should be {% url 'polls:detail' question.id %} I think you mixed up the steps "Removing hardcoded URLs in templates" and "Namespacing URL names" Hope that helps, Daniel On Tue, Dec 10, 2019 at 11:58 AM Bruckner de Villiers < bruckner.devilli...@gmail.com> wr

Re: Removing Hardcoded urls in Templates

2019-12-10 Thread Sencer Hamarat
Would you please replace url name with 'polls:detail', as described at https://docs.djangoproject.com/en/3.0/topics/http/urls/#id5 Saygılarımla, Sencer HAMARAT On Tue, Dec 10, 2019 at 1:58 PM Bruckner de Villiers < bruckner.devilli...@gmail.com> wrote: > Running Django 3.0 & Python 3.7.3. >

Removing Hardcoded urls in Templates

2019-12-10 Thread Bruckner de Villiers
Running Django 3.0 & Python 3.7.3. Issue with Tutorial Part 3: I replaced “{{ question.question_text }}” with “{{ question.question_text }}” and get the following error: Reverse for 'detail' not found. 'detail' is not a valid view function or pattern name. {{ question.question_text }}

Re: [Django] How to traverse through query set in java script using django templates?

2019-12-09 Thread Andréas Kühne
This is a strange way to do things - but all you need to do is to add a template for loop in the javascript part of your template. For example: {% for gsp in apply_gsp_model %} var value1 = {% gsp.id %}; {% endfor %} What will happen then is that the iteration will create that line

[Django] How to traverse through query set in java script using django templates?

2019-12-06 Thread Dilipkumar Noone
Hi, I have a model named ApplyGSP in models.py. *In my views.py:* apply_gsp_model = ApplyGSP.objects.all() context = {'form': form,'apply_gsp_model':apply_gsp_model, 'Message': message, 'action': action} if action == 'edit': print("action is edit") return render(request,

Re: Django Admin templates not being overwritten by app templates

2019-11-10 Thread Aldian Fazrihady
admin, the Django admin templates > are always being used. > > My application structure is as follows: > > ├── bug > │ ├── __init__.py > │ ├── __pycache__ > │ ├── settings.py > │ ├── urls.py > │ └── wsgi.py > ├── db.sqlite3 > ├── manage.py > └─

Re: Django Admin templates not being overwritten by app templates

2019-11-10 Thread Alexander Beach
This behavior seems counter intuitive, and contrary to what the documentation says For example: my settings.py file is as follows: TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS

Re: Django Admin templates not being overwritten by app templates

2019-11-10 Thread Mike Dewhirst
On 11/11/2019 7:02 am, Alexander Beach wrote: I am trying to create registration forms using Django's built in auth forms.  However, when using the Django admin, the Django admin templates are always being used. My application structure is as follows: | ├──bug │├──__init__.py │├──__pycache__

Django Admin templates not being overwritten by app templates

2019-11-10 Thread Alexander Beach
I am trying to create registration forms using Django's built in auth forms. However, when using the Django admin, the Django admin templates are always being used. My application structure is as follows: ├── bug │ ├── __init__.py │ ├── __pycache__ │ ├── settings.py │ ├── urls.py

Re: Query regarding Jija templates with django project

2019-10-30 Thread 'Amitesh Sahay' via Django users
rote: Hello Team, I am kind of new to software development, and trying to find my feat. I have a queries which could be quite dumb to most of you, but I need to know.   As far as I know, we need Jija templates in the HTML files, so that we can assign correct path of the static files

  1   2   3   4   5   6   7   8   9   10   >