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 dashbo

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, send an

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, blank=Tr

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, > > -- > You received this message becaus

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. > > Greetings, > > -- > You received this 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 Help me. > > Greetings, > > -- > You r

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 tem

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 that,hav

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 CS

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 i

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 out

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 nogueir

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 all

DJango upvoting, downvoting - functions in templates

2020-06-02 Thread Jan Gregorczyk
I'm using this package https://pypi.org/project/django-vote/ and i want to do something smilar to this guy https://github.com/shellfly/django-vote/issues/51 - I need function callable in template, which will tell me if user has downvoted or upvoted, but exactly downvoted or exactly upvoted. I

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

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

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 Dja

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.

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 }} index

How to pass variables to update form in templates.

2019-05-04 Thread sairanganadh Narayana
I have integrated an api. I wrote add functionality by using simple form and saving the details and effecting on api. But, while writing update functionality, there is requirement to send data from views file to templates. Because, I didn't use any models. How to pass data to templates from view

Re: trouble adding variables to URLs in templates... seems some characters get cut out like "?"

2018-08-02 Thread Christian Seberino
legroups.com [mailto: > django...@googlegroups.com ] *On Behalf Of *Christian > Seberino > *Sent:* Thursday, August 2, 2018 3:36 PM > *To:* Django users > *Subject:* trouble adding variables to URLs in templates... seems some > characters get cut out like "?" > >

RE: trouble adding variables to URLs in templates... seems some characters get cut out like "?"

2018-08-02 Thread Matthew Pava
adding variables to URLs in templates... seems some characters get cut out like "?" Suppose you have a URL built from a variable in a template like so...test. I noticed that parts of some_variable get cut out if they include certain characters. For example... "/search/?search

trouble adding variables to URLs in templates... seems some characters get cut out like "?"

2018-08-02 Thread Christian Seberino
Suppose you have a URL built from a variable in a template like so...test. I noticed that parts of some_variable get cut out if they include certain characters. For example... "/search/?search=" seems to get replace with "/search/". What is the part after "?" cut off? (I have same problem eve

RE: Nested for loops in templates

2018-06-15 Thread Matthew Pava
TEMPLATE_STRING_IF_INVALID) or settings.TEMPLATE_STRING_IF_INVALID From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Mikkel Kromann Sent: Friday, June 15, 2018 6:36 AM To: Django users Subject: Re: Nested for loops in templates Thanks Matthew. The field_list is a lis

Re: Nested for loops in templates

2018-06-15 Thread Mikkel Kromann
n-a-django-template?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa > > > > > > *From:* django...@googlegroups.com [mailto: > django...@googlegroups.com ] *On Behalf Of *Mikkel Kromann > *Sent:* Wednesday, June 13, 2018 3:54 PM > *To:* Django u

Re: Nested for loops in templates

2018-06-15 Thread Mikkel Kromann
Thank you Vijay. That link seems to be a feasible path for me to take (reproduced below). Perhaps you or others can help me with an additional question (I am a bit new to both Python and Django), that I'm struggling with: Which type of data structure is Django iterating over in the templates (i

RE: Nested for loops in templates

2018-06-13 Thread Matthew Pava
?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Mikkel Kromann Sent: Wednesday, June 13, 2018 3:54 PM To: Django users Subject: Nested for loops in templates Dear Django users. T

Re: Nested for loops in templates

2018-06-13 Thread Vijay Khemlani
As far as I know you can't do it directly in the templating system Yo could write a template tag as described here https://stackoverflow.com/questions/2894365/use-variable-as-dictionary-key-in-django-template/10700142#10700142 or use a different data structure, for example each row as a list of

Nested for loops in templates

2018-06-13 Thread Mikkel Kromann
Dear Django users. Thanks to the good advice of many people on this list, I've managed to create some nice generic class based views that work simultaneously with many models. The models may differ from each other with regards to the number of columns in their data tables as well as the naming

Re: if statement for development/production mode in templates?

2018-04-23 Thread Alexander Joseph
I found the answer here. https://stackoverflow.com/questions/1271631/how-to-check-the-template-debug-flag-in-a-django-template Thanks On Monday, April 23, 2018 at 8:04:02 AM UTC-6, larry@gmail.com wrote: > > Somewhere in the code is a place where data is passed to the template. > Did you wri

Re: if statement for development/production mode in templates?

2018-04-23 Thread Larry Martell
Somewhere in the code is a place where data is passed to the template. Did you write the app? On Mon, Apr 23, 2018 at 9:55 AM, Alexander Joseph wrote: > I dont know what that means > > On Monday, April 23, 2018 at 7:49:25 AM UTC-6, larry@gmail.com wrote: >> >> On Mon, Apr 23, 2018 at 9:34 AM,

Re: if statement for development/production mode in templates?

2018-04-23 Thread Julio Biason
Subject: Re: if statement for development/production mode in templates? I dont know what that means On Monday, April 23, 2018 at 7:49:25 AM UTC-6, larry@gmail.com wrote: On Mon, Apr 23, 2018 at 9:34 AM, Alexander Joseph wrote: > Hello, is there a way to make an if statement that is based

Re: if statement for development/production mode in templates?

2018-04-23 Thread Alexander Joseph
I dont know what that means On Monday, April 23, 2018 at 7:49:25 AM UTC-6, larry@gmail.com wrote: > > On Mon, Apr 23, 2018 at 9:34 AM, Alexander Joseph > > wrote: > > Hello, is there a way to make an if statement that is based on whether > you > > are running in development mode or product

Re: if statement for development/production mode in templates?

2018-04-23 Thread Larry Martell
On Mon, Apr 23, 2018 at 9:34 AM, Alexander Joseph wrote: > Hello, is there a way to make an if statement that is based on whether you > are running in development mode or production mode? Or based on which > settings file you are using? > > My app allows users to login with their office365 account

if statement for development/production mode in templates?

2018-04-23 Thread Alexander Joseph
Hello, is there a way to make an if statement that is based on whether you are running in development mode or production mode? Or based on which settings file you are using? My app allows users to login with their office365 account instead of with django allauth and I'd like to only give them t

Re: how to display models in templates

2016-09-13 Thread Timothy Steele
thank you very mach it has work. i am most grateful, any way this did not let me sleep the hole night On Tuesday, September 13, 2016 at 8:33:53 AM UTC+1, Timothy Steele wrote: > > please i try my best but i can display my models in a templates i have > just created. > > *Please have a look at t

Re: how to display models in templates

2016-09-13 Thread ludovic coues
Yeah, it's because of |pprint. It is a debug tools. It can help with a few issue like model not having a __str__ method (not your case). It also show how many item are in the queryset (one in your case). Now that you found the error, you can remove it 2016-09-13 10:30 GMT+02:00 Timothy Steele :

Re: how to display models in templates

2016-09-13 Thread Timothy Steele
thanks i have seen it, but i need to only display *Packt Publishing* but it give this ** in addition On Tuesday, September 13, 2016 at 8:33:53 AM UTC+1, Timothy Steele wrote: > > please i try my best but i can display my models in a templates i have > just created. > > *Please have a look at t

Re: how to display models in templates

2016-09-13 Thread ludovic coues
Sorry, I should have double checked instead of copy/pasting. {% for bookmark in bookmaks %} < you forgot a r in bookmarks. 2016-09-13 10:00 GMT+02:00 Timothy Steele : > > >

Re: how to display models in templates

2016-09-13 Thread Timothy Steele
please i like your help but it now return in the database, but in can see the name of the bookmark but how can i do away with the QuerySet please On Tuesday, September 13

Re: how to display models in templates

2016-09-13 Thread ludovic coues
Can you try this in your template ? {{ bookmarks|pprint }} {% for bookmark in bookmaks %} {{ bookmark|pprint }} {% endfor %} Also, in your for loop, you use bookmarks.title, notice the s. 2016-09-13 9:33 GMT+02:00 Timothy Steele : > please i try my best but i can display my models in a templ

how to display models in templates

2016-09-13 Thread Timothy Steele
please i try my best but i can display my models in a templates i have just created. *Please have a look at the codes in the models.py file* from django.db import models from django.contrib.auth.models import User # Create your models here. class Link(models.Model): url=models.URLField(uniq

Re: Possible error at usage of reverse URL in templates.

2014-06-22 Thread Russell Keith-Magee
Hi Sebastian, There is a very significant difference between the third pattern and the last - the extra set of braces. That extra set of braces means that the regex group that is being matched is (?P\d+)/ That is - one or more numerical digits, identified as playerId, that *must* be followed by

Possible error at usage of reverse URL in templates.

2014-06-21 Thread Sebastian Piskorski
I'd like to make sure that this is an error not the feature. I use following code in template {{ player.id }} : "{{ player.name}}" And in urls.py everything goes fine with those rules: 1. url(r'^player/select/(?P\d+)/$', myapp.views.player.select, name="player-select"), result URL is: /player

Re: Static files in templates with VARIABLES

2014-05-05 Thread Damián Adriel Pérez Valdés
thanks On Mon, May 5, 2014 at 10:29 AM, Charly Román wrote: > {% static LOGO %} > > 2014-05-05 10:27 GMT-05:00 Damián Pérez : > > Hello everyone: > > > > I'm using for the templates {% static 'images/logo.png' %}, but what can > i > > do if I have the logo url on the variable ?, something like

Re: Static files in templates with VARIABLES

2014-05-05 Thread Charly Román
{% static LOGO %} 2014-05-05 10:27 GMT-05:00 Damián Pérez : > Hello everyone: > > I'm using for the templates {% static 'images/logo.png' %}, but what can i > do if I have the logo url on the variable ?, something like static LOGO > > thanks. > > best regards, > > -- > You received this message b

Static files in templates with VARIABLES

2014-05-05 Thread Damián Pérez
Hello everyone: I'm using for the templates {% static 'images/logo.png' %}, but what can i do if I have the logo url on the variable ?, something like static LOGO thanks. best regards, -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsub

Re: get user profile info in templates

2014-04-24 Thread Ramón Carrillo
want get user profile information in templates who is logged in. > try everypossible solution but didn't achieve anything > > this is my profile models code below: > > from django.db import models > from django.utils.translation import ugettext_lazy as _ > > from C

get user profile info in templates

2014-04-24 Thread sourav
hi i am a newbie in django i am creating an app with customuser and profile i want get user profile information in templates who is logged in. try everypossible solution but didn't achieve anything this is my profile models code below: from django.db import models from django.utils.transl

Re: x|add:-1 in templates doesn't work as I expect.

2013-04-23 Thread Marcos Borunda
for others looking for an answer, put your value between double quotes: Previous | Next El jueves, 6 de diciembre de 2007 15:44:32 UTC-6, J. Clifford Dyer escribió: > > Hello. > > I'm trying to get a template to render previous and next links on a series > of pages, as follows. > > Previous |

Re: makemessages failing with non ascii characters in templates

2013-03-26 Thread Bastian
I have to search again to filter only the non ascii chars in the comments. Right now I have a list of all non ascii characters. But I am considering upgrading to 1.4 before that not only for the translations. If not, or if the problem still exists by then I will search for the exact template. Th

Re: makemessages failing with non ascii characters in templates

2013-03-26 Thread Ramiro Morales
On Tue, Mar 26, 2013 at 9:23 AM, Bastian wrote: > If I understand well, your fix is used to allow non ascii characters in the > comments of a template. I found non ascii characters outside comments too, > won't this break also? Unfortunately we don't have information about which template file is

Re: makemessages failing with non ascii characters in templates

2013-03-26 Thread Bastian
If I understand well, your fix is used to allow non ascii characters in the comments of a template. I found non ascii characters outside comments too, won't this break also? On Tuesday, March 26, 2013 12:19:36 PM UTC+1, Ramiro Morales wrote: > > On Tue, Mar 26, 2013 at 8:04 AM, Bastian > > wro

Re: makemessages failing with non ascii characters in templates

2013-03-26 Thread Bastian
Thanks Ramiro, I don't know the actual burden of upgrading a whole project from 1.3 to 1.4 but it does sound terrifying :) I might go the patch way. On Tuesday, March 26, 2013 12:19:36 PM UTC+1, Ramiro Morales wrote: > > On Tue, Mar 26, 2013 at 8:04 AM, Bastian > > wrote: > > Hi, I am trying t

Re: makemessages failing with non ascii characters in templates

2013-03-26 Thread Ramiro Morales
On Tue, Mar 26, 2013 at 8:04 AM, Bastian wrote: > Hi, I am trying to create a .po file to start a translation. I use the > command './manage.py makemessages -l ru' to try to create the Russian > locale. The script seems to be working for a while and then crashes with: > > processing language ru >

makemessages failing with non ascii characters in templates

2013-03-26 Thread Bastian
Hi, I am trying to create a .po file to start a translation. I use the command './manage.py makemessages -l ru' to try to create the Russian locale. The script seems to be working for a while and then crashes with: processing language ruTraceback (most recent call last): File "./manage.py", li

Re: error in templates...

2013-02-19 Thread Pankaj Singh
url(r'^contact/$', direct_to_template, {"template": >>> "contact.html"}, >>> name="contact"), >>> url(r'^archive/$', direct_to_template, {"template": >>> "archive.html"

Re: error in templates...

2013-02-19 Thread Avnesh Shakya
mplate, {"template": >> "archive.html"}, >> name="archive"), >> ) >> >> Sincerely, >> Pankaj Singh >> http://about.me/psjinx >> >> >> On Tue, Feb 19, 2013 at 5:06 PM, Avnesh Shakya wrote: >>

Re: error in templates...

2013-02-19 Thread Avnesh Shakya
mplate": > "archive.html"}, > name="archive"), > ) > > Sincerely, > Pankaj Singh > http://about.me/psjinx > > > On Tue, Feb 19, 2013 at 5:06 PM, Avnesh Shakya wrote: > >> ya i have done it but error has occured again.. >&

Re: error in templates...

2013-02-19 Thread Pankaj Singh
name="contact"), url(r'^archive/$', direct_to_template, {"template": "archive.html"}, name="archive"), ) Sincerely, Pankaj Singh http://about.me/psjinx On Tue, Feb 19, 2013 at 5:06 PM, Avnesh Shakya wrote: > ya i have done it but

Re: error in templates...

2013-02-19 Thread Avnesh Shakya
ya i have done it but error has occured again.. On Tue, Feb 19, 2013 at 5:04 PM, Pankaj Singh wrote: > Hey, > > I asked you to make changes in templates (i.e. home.html, about.html etc.) > and not urls.py. > > > Sincerely, > Pankaj Singh > http://about.me/psjinx >

Re: error in templates...

2013-02-19 Thread Pankaj Singh
Hey, I asked you to make changes in templates (i.e. home.html, about.html etc.) and not urls.py. Sincerely, Pankaj Singh http://about.me/psjinx On Tue, Feb 19, 2013 at 4:56 PM, Avnesh Shakya wrote: > hi pankaj, i have got again error same.. > if i change &g

Re: error in templates...

2013-02-19 Thread Avnesh Shakya
hi pankaj, i have got again error same.. if i change from django.conf.urls.defaults import * urlpatterns= patterns('myapp.views', url(r'^$','home',name="home"), url(r'^about/$','about',name="about"), url(r'^contact/$','contact',name="contact"), url(r'^contact/$','archive',n

Re: error in templates...

2013-02-19 Thread Pankaj Singh
Hey Avnesh, In your templates you have written following lines homeaboutarchivecontact Change them to following, notice single quotes surrounding url pattern name homeaboutarchivecontact Sincerely, Pankaj Singh http://about.me/psjinx On Tue, Feb 19, 2013 at 4:06 PM, Avnesh Shakya wrote: >

Re: error in templates...

2013-02-19 Thread Avnesh Shakya
On Tue, Feb 19, 2013 at 3:47 PM, Avnesh Shakya wrote: > ya i have completed and i m just doing copy n paste from from tutorial but > there is no error but i m facing this error again n again... > https://www.udemy.com/full-django-tutorial/#lecture/63701/question/9902 > can i add my page for help.

Re: error in templates...

2013-02-19 Thread Avnesh Shakya
ya i have completed and i m just doing copy n paste from from tutorial but there is no error but i m facing this error again n again... https://www.udemy.com/full-django-tutorial/#lecture/63701/question/9902 can i add my page for help. i need your help plz.. On Tue, Feb 19, 2013 at 3:39 PM, Thoma

Re: error in templates...

2013-02-19 Thread Thomas Weholt
It means you haven't added any url matching / in your urlconfig, but it's hard to give a good answer without a bit more information. Have you completed the django tutorial which explains how these things work? Thomas On Tue, Feb 19, 2013 at 11:04 AM, Avnesh Shakya wrote: > Hello, I'm stuck in te

error in templates...

2013-02-19 Thread Avnesh Shakya
Hello, I'm stuck in teplagte page. error is occuring here after runserver..error.. NoReverseMatch at / Reverse for '' with arguments '()' and keyword arguments '{}' not found. I can't figure out why I'm getting the error, plz tell me, i have totally confused here. thanks avnesh shak

Re: Whats the point of having dicts in templates if one cannot access them by key?

2012-11-14 Thread Juan Pablo Tamayo
Thank you all. I have fix my issue icons sorteddict from the Python collections. Juan Pablo Tamayo H Sent from my Android phone On Nov 14, 2012 11:38 AM, "Bill Freeman" wrote: > > > On Tue, Nov 13, 2012 at 11:40 PM, Juan Pablo Tamayo wrote: > >> Let me explain, I have a nested dictionary like: >

Re: Whats the point of having dicts in templates if one cannot access them by key?

2012-11-14 Thread Bill Freeman
On Tue, Nov 13, 2012 at 11:40 PM, Juan Pablo Tamayo wrote: > Let me explain, I have a nested dictionary like: > > agenda = {'3': {'2012-11-11': , '2012-11-14': , ...}, > '7': {'2012-11-9': , }, > '2': {'2012-10-28': }, > } > > And I want to access it by specifying the two keys. I've red that

Re: Whats the point of having dicts in templates if one cannot access them by key?

2012-11-13 Thread Lachlan Musicman
I used the SortedDict datastructure :) https://docs.djangoproject.com/en/dev/ref/utils or /path/django-docs/ref/utils.html#django.utils.datastructures.SortedDict On Wed, Nov 14, 2012 at 4:40 PM, Juan Pablo Tamayo wrote: > Let me explain, I have a nested dictionary like: > > agenda = {'3': {'201

Whats the point of having dicts in templates if one cannot access them by key?

2012-11-13 Thread Juan Pablo Tamayo
Let me explain, I have a nested dictionary like: agenda = {'3': {'2012-11-11': , '2012-11-14': , ...}, '7': {'2012-11-9': , }, '2': {'2012-10-28': }, } And I want to access it by specifying the two keys. I've red that i must access the dict like (where attribute is an attribute of : {% fo

Re: Use STATIC_URL in templates

2012-09-12 Thread Chao Chen
hi ,in the Django files you can read the docs/howto/static-files.txt On Wed, Sep 12, 2012 at 10:12 PM, Axel Aguilar wrote: > Hello, I'm pretty new with django, exactly the same than with python, and > after reading a few tutorials and make a very simple django site, I have a > django/python que

Use STATIC_URL in templates

2012-09-12 Thread Axel Aguilar
Hello, I'm pretty new with django, exactly the same than with python, and after reading a few tutorials and make a very simple django site, I have a django/python question... I made this script in python: import os import random url ='/home/usuario/django/projects/volei/volei/static/i

Re: coding urls in templates

2012-08-31 Thread Michael Thon
Hi Amyth- That is exactly what I needed. Thanks. I'm now updating all my views. - Mike On Aug 31, 2012, at 8:44 AM, Amyth Arora wrote: > Hey Mike, > > I think i understand what you are trying to achieve now. You can basically > name your urls and then call the url template tag in the templ

Re: coding urls in templates

2012-08-30 Thread Amyth Arora
Hey Mike, I think i understand what you are trying to achieve now. You can basically name your urls and then call the url template tag in the templates with the url name as follows, this way you will not break any urls in your template if you simply move your app to a new location. Example: #zet

Re: coding urls in templates

2012-08-30 Thread Michael Thon
the root directlry of my domain is hosting wordpress, which I'm using to develop the landing pages: www.zetawrite.com (I know, it still needs a lot of work). The app itself will only be available to logged in users so I thought that the easiest way to deploy it would be to run it in a subdirecto

Re: coding urls in templates

2012-08-30 Thread Amyth Arora
could you post the directory structure and your urls.py file. Thanks. On Fri, Aug 31, 2012 at 11:00 AM, Mike wrote: > Quick question: I changed my urls.py so I can run my project in a > subdirectory and I broke all the urls in my templates. Should I be using > {% url path.to.some_view v1 v2 %}

coding urls in templates

2012-08-30 Thread Mike
Quick question: I changed my urls.py so I can run my project in a subdirectory and I broke all the urls in my templates. Should I be using {% url path.to.some_view v1 v2 %} in all my templates instead of hard coding the path? -- You received this message because you are subscribed to the Goog

Re: django makemessages doesn't recognize trans in templates

2012-08-24 Thread Jojo
thank you guys! very helpful! Il giorno lunedì 20 agosto 2012 12:43:20 UTC-5, Nick Apostolakis ha scritto: > > > > On Mon, Aug 20, 2012 at 8:18 PM, Jojo > > wrote: > >> what is the meaning of the fuzzy mark? >> >> > fuzzy is some kind of auto translated field. > it may be correct or not. > when y

Re: django makemessages doesn't recognize trans in templates

2012-08-20 Thread Nick Apostolakis
On Mon, Aug 20, 2012 at 8:18 PM, Jojo wrote: > what is the meaning of the fuzzy mark? > > fuzzy is some kind of auto translated field. it may be correct or not. when you are sure that the translation is correct, you remove the fuzzy annotation and then the translation works fine -- -

Re: django makemessages doesn't recognize trans in templates

2012-08-20 Thread Jojo
what is the meaning of the fuzzy mark? Il giorno venerdì 17 agosto 2012 23:11:25 UTC+2, Tomas Neme ha scritto: > > > For example for this link > > > > {% trans "contacts" > %} > > > > I have the msgstr="Contactos". I expect to see "Contactos" in the > browser, > > but I still see "contacts"

Re: django makemessages doesn't recognize trans in templates

2012-08-17 Thread Tomas Neme
> For example for this link > > {% trans "contacts" %} > > I have the msgstr="Contactos". I expect to see "Contactos" in the browser, > but I still see "contacts". Any suggestion? 1) case-sensitive. Are you sure you haven't translated "Contacts" instead of "contacts"? 2) fuzzy-mark. I've noticed t

Re: django makemessages doesn't recognize trans in templates

2012-08-17 Thread Jojo
Ok guys, I was missing the LOCALE_PATHS in settings.py, now it works properly. Il giorno venerdì 17 agosto 2012 04:15:59 UTC+2, Jojo ha scritto: > > Hi, the subject should be a little clear so, this is the project folder > structure > > project folder > locale > en > LC_MESSAGES >

Re: django makemessages doesn't recognize trans in templates

2012-08-17 Thread Jojo
I got it. My templates files have htm extension and makemessages looks for htmL files, so I used -e option specifying htm extension like this: django-admin.py makemessages -l es -e htm Now I have msgid/msgstr that I need. NOW I compiled the msgstr with the translations an compiled the messages

Re: django makemessages doesn't recognize trans in templates

2012-08-17 Thread Jojo
i'm sorry, templates are in application folder in the templates directory Il giorno venerdì 17 agosto 2012 04:15:59 UTC+2, Jojo ha scritto: > > Hi, the subject should be a little clear so, this is the project folder > structure > > project folder > locale > en > LC_MESSAGES > django.

Re: django makemessages doesn't recognize trans in templates

2012-08-17 Thread Melvyn Sopacua
On 17-8-2012 4:15, Jojo wrote: > I have created a locale folder and after I launched the django-admin.py > makemessages command as explained in the documentation, but when I open a > .po file (the command create the files actually), I can't found > the msgid/msgstr relative to the translation i

Re: django makemessages doesn't recognize trans in templates

2012-08-17 Thread Thomas Orozco
You gave us the project layout, but where are the templates? My guess is that Django is basically not picking them templates *up*, but I might be off. There are arguments to the makemessages command that can help you indicate the directory you want messages created for. You can also use higher ve

django makemessages doesn't recognize trans in templates

2012-08-16 Thread Jojo
Hi, the subject should be a little clear so, this is the project folder structure project folder locale en LC_MESSAGES django.po es LC_MESSAGES django.po it LC_MESSAGES django.po project __init__.py mochileros settings.py urls.py wsgi.py

Re: Conditionals in Templates

2012-07-04 Thread Melvyn Sopacua
instance with an attribute giving the name of the type >> as a string... > > 3. write a template tag 4. Don't use polymorphic variables in templates. Handle it in the view by providing differently named variables (x and x_list for example). -- Melvyn Sopacua -- You recei

Re: Conditionals in Templates

2012-07-03 Thread Javier Guerra Giraldez
On Tue, Jul 3, 2012 at 3:39 PM, Bill Freeman wrote: > The obvious ways are: > > 1. Provide a model method that returns a string representing the type > of the instance, compare against that > 2. Decorate the instance with an attribute giving the name of the type > as a string... 3. write a templa

Re: Conditionals in Templates

2012-07-03 Thread Bill Freeman
The obvious ways are: 1. Provide a model method that returns a string representing the type of the instance, compare against that 2. Decorate the instance with an attribute giving the name of the type as a string... Can't change the instance (I really think you can still decorate it in the view,

Re: Conditionals in Templates

2012-07-03 Thread Russ Abbott
Here's a workaround I came up with. I defined a class: class TableValue: def __init__(self, value): self.value = value self.is_list = isinstance(value, list) Then in the Template I wrote {% for row in rows %} {% f

Conditionals in Templates

2012-07-03 Thread Russ Abbott
I'm generating a table. I want the cells to be different depending on the type of the content. How do I test for the type of the content? I'd like to do something like this. {% for row in rows %} {% for cell in row %}

Re: My context variables don't show in templates

2012-05-21 Thread bruno desthuilliers
On May 20, 12:29 am, Mohamed Turki wrote: > > def home(request): >     var = "" >     n = None Better to use readable names. >     if request.method == u'GET': >         GET = request.GET >         if GET.has_key(u'name'): >             n = GET[u'name'] >             try: >                 user

  1   2   3   4   5   6   7   8   >