Re: Query regarding Jija templates with django project

2019-10-25 Thread red
d 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. > > Its a general practice to create base.html and extend thi

Query regarding Jija templates with django project

2019-10-25 Thread 'Amitesh Sahay' via Django users
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. Its a general

Re: Templates rendering problem

2019-10-16 Thread Boris Romero
e stack of how you pass data in a view and how >>>> you render it in a template >>>> >>>> On Tuesday, October 15, 2019 at 9:31:26 PM UTC+3, Boris Romero wrote: >>>>> >>>>> Any help or ideas? Thanks! >>>>> >>

Re: Templates rendering problem

2019-10-16 Thread Boris Romero
15, 2019 at 9:31:26 PM UTC+3, Boris Romero wrote: >>>> >>>> Any help or ideas? Thanks! >>>> >>>> On Thursday, October 10, 2019 at 12:15:42 PM UTC-3, Boris Romero wrote: >>>>> >>>>> Hi! Yes, it's reproducing when I run

Re: Templates rendering problem

2019-10-16 Thread lemme smash
es, it's reproducing when I run it locally, but with DEBUG=FALSE >>>> and with nginx and uwsgi. And no, it's not a database encoding problem, it >>>> just involves the templates, because the same database, with diferents >>>> instances of the app (with the u

Re: Templates rendering problem

2019-10-16 Thread Boris Romero
October 10, 2019 at 12:15:42 PM UTC-3, Boris Romero wrote: >>> >>> Hi! Yes, it's reproducing when I run it locally, but with DEBUG=FALSE >>> and with nginx and uwsgi. And no, it's not a database encoding problem, it >>> just involves the templates, because the sam

Re: Templates rendering problem

2019-10-16 Thread lemme smash
problem, it just >> involves the templates, because the same database, with diferents instances >> of the app (with the upload and without it) not make any differences. >> >> Thanks for the ideas! >> >> >> On Thursday, October 10, 2019 at 11:38:48 AM

Re: Templates rendering problem

2019-10-15 Thread Boris Romero
Any help or ideas? Thanks! On Thursday, October 10, 2019 at 12:15:42 PM UTC-3, Boris Romero wrote: > > Hi! Yes, it's reproducing when I run it locally, but with DEBUG=FALSE and > with nginx and uwsgi. And no, it's not a database encoding problem, it just > involves the templa

Re: Templates rendering problem

2019-10-10 Thread Boris Romero
Hi! Yes, it's reproducing when I run it locally, but with DEBUG=FALSE and with nginx and uwsgi. And no, it's not a database encoding problem, it just involves the templates, because the same database, with diferents instances of the app (with the upload and without it) not make any differences

Re: Templates rendering problem

2019-10-10 Thread lemme smash
ngo from 1.11 to 2.2.6 and I have a serious problem > with the templates rendering when i put on production my site (Nginx + > uWSGI + Django). The problem is a lot of '/n' and strangers characters that > appears when I render any page, that obviuosly suggest is a encoding > p

Templates rendering problem

2019-10-09 Thread Boris Romero
Hi! I recently update Django from 1.11 to 2.2.6 and I have a serious problem with the templates rendering when i put on production my site (Nginx + uWSGI + Django). The problem is a lot of '/n' and strangers characters that appears when I render any page, that obviuosly suggest is a encoding

Re: Django cms and templates

2019-09-19 Thread MEGA NATHAN
Hi. you check app name 127.0.0.8/app name *Regards* Meganathan G On Thu, Sep 19, 2019 at 4:30 AM Perceval Maturure wrote: > Dear all > > I have a django project done with Django 2.1 and successfully made an > apphook to the cms page bt the problem is that the template file does not

Django cms and templates

2019-09-18 Thread Perceval Maturure
Dear all I have a django project done with Django 2.1 and successfully made an apphook to the cms page bt the problem is that the template file does not display model data unless if I remove the syntax { %extends base.html %} at the top of the template html file What could be causing this?

Re: use site's templates

2019-08-15 Thread RONAK JAIN
sheets (static). I will use {% load static %}. Can > I use this template approach in extending templates {% extends > "project/base.html" %} > > Can you give me few other examples of using this? > > > Copied from the above stackoverflow link. > > There's a set of cu

Re: use site's templates

2019-08-15 Thread dupakoor kannan
Hi, I am trying to use a Django tip from stackoverflow https://stackoverflow.com/a/946397/4037275 I have static css style sheets (static). I will use {% load static %}. Can I use this template approach in extending templates {% extends "project/base.html" %} Can you give me few othe

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

Re: How to provide function calling event for button in django html templates ?

2019-04-20 Thread Jani Tiainen
Hi, I also suggest that take a look at Django Girls tutorial. It does pretty good job at describing web basics and django same time. https://tutorial.djangogirls.org/en/ On Sat, Apr 20, 2019 at 10:17 AM Mayur Bagul wrote: > Hello Community, > > i'm facing one problem. Scenario is such that

Re: How to provide function calling event for button in django html templates ?

2019-04-20 Thread Gil Obradors
Before continuing with this, read some about http methods like : https://www.tutorialspoint.com/http/http_methods.htm Yes, it's suported. one example function playing with post requests: def form(request): form = facturaForm if request.method == 'POST':

Re: How to provide function calling event for button in django html templates ?

2019-04-20 Thread Mayur Bagul
hello gil, thanks for tutorial link i will check it out that one. As you gave solution of calling a function via view i did so but it didnt worked and another thing i dint understand is about post i thought it didnt support in django. can you please provide me little code your talking about

Re: How to provide function calling event for button in django html templates ?

2019-04-20 Thread Gil Obradors
Hi! If you want you can re-use django.contrib.auth package Here one tutorial: https://wsvincent.com/django-user-authentication-tutorial-login-and-logout/ Otherwise, you can do a POST to a URL, and this url (url.py) call a function ( views.py) Good luck! Missatge de Mayur Bagul del dia ds.,

How to provide function calling event for button in django html templates ?

2019-04-20 Thread Mayur Bagul
Hello Community, i'm facing one problem. Scenario is such that i have one template login.html in Django Project, inside this file i have wrote html code for login purpose. what i want that once user click on Log-In Button it should call function ( onclick using Javascript cant use in Django)

Re: templates and Views

2019-02-19 Thread abdouramane mahamane
Thank you so much, for this reply that solves my problem :) Le lundi 18 février 2019 16:15:05 UTC+1, abdouramane mahamane a écrit : > > I'm trying to show in one template .html multiple results of my views.py > class. > But when i add an other {%block content2 %} in my base.html, i have an >

Re: templates and Views

2019-02-19 Thread abdouramane mahamane
Thank you so much, for this reply that solves my problem :) Le lundi 18 février 2019 22:55:24 UTC+1, mohamed khaled a écrit : > > I think this link can help you > >

templates and Views

2019-02-18 Thread mohamed khaled
I think this link can help you https://www.google.com/url?sa=t=web=j=https://stackoverflow.com/questions/12187751/django-pass-multiple-models-to-one-template=2ahUKEwimi5aqosbgAhUJtRoKHaiCCYYQjjgwAHoECAcQAQ=AOvVaw0pFQWtYwtjrd03LHLWZ8rz -- You received this message because you are subscribed to

templates and Views

2019-02-18 Thread abdouramane mahamane
I'm trying to show in one template .html multiple results of my views.py class. But when i add an other {%block content2 %} in my base.html, i have an error. Because i have the same url path('partenaire/', views.OffrePListView.as_view(), name='offreListP'), path('partenaire/',

How to customize Django AdminLTE 2 templates.

2019-02-06 Thread Achyut Pandey
hello ! guys i implement the Django Admin LTE 2 for django admin. I want to customize the templates that come with this package according my project. But the problem is i couldn't not find the way of customize the base.html of adminlte however i can customize login.html page. please help me guys

Re: What do you think about unify templates feature?

2019-01-18 Thread Jani Tiainen
ith code in Django, and > more difficult with a new feature. > > To understand it, the best is to use the command with a simple template > such as admin/index.html. > > Best, > > >> >> On Fri, Jan 18, 2019 at 7:23 PM J. Pablo Martín Cobos >> wrote: >>

Re: What do you think about unify templates feature?

2019-01-18 Thread J . Pablo Martín Cobos
> >> Sorry, I reply beetween lines >> >> El vie., 18 ene. 2019 16:32, J. Pablo Martín Cobos >> escribió: >> >>> Hi another time, >>> >>> I am tring to reply every people in this email: >>> >>> Josh >>> >

Re: What do you think about unify templates feature?

2019-01-18 Thread Jani Tiainen
J. Pablo Martín Cobos > escribió: > >> Hi another time, >> >> I am tring to reply every people in this email: >> >> Josh >> >> I was not using django.template.loaders.cached.Loader, but the result are >> very similar i.e: >> >> App T

Re: What do you think about unify templates feature?

2019-01-18 Thread J . Pablo Martín Cobos
.e: > > App Template Num templates rendered before unify Num templates rendered > after unify AVG Time render template before unify (ms) AVG Time render > template after unify (ms) > Django admin admin/index.html 3 1 80 70 > Django constance admin/constance/change_list.html 7 1

Re: What do you think about unify templates feature?

2019-01-18 Thread J . Pablo Martín Cobos
Hi another time, I am tring to reply every people in this email: Josh I was not using django.template.loaders.cached.Loader, but the result are very similar i.e: App Template Num templates rendered before unify Num templates rendered after unify AVG Time render template before unify (ms) AVG

Re: What do you think about unify templates feature?

2019-01-18 Thread J . Pablo Martín Cobos
late extends of another and include others. So Django has to get these templates to create an HTML. This process get time. 2. My proposal: Preprocess templates for some (or all) them. Creating a template without extends or includes. So, in my previous email you can see, Django render less t

Re: What do you think about unify templates feature?

2019-01-18 Thread J . Pablo Martín Cobos
I answer between lines El jue., 17 ene. 2019 a las 18:42, Maciek Olko () escribió: > Did you try to measure the difference in time of rendering standard and > your way? > > Yes. I have several examples: App Template Num templates rendered before unify Num templates rendered afte

What do you think about unify templates feature?

2019-01-17 Thread J . Pablo Martín Cobos
Hi, >From one year ago, I am using an own command for Django templates that unify them. With an example it is easy to see. If I am to render for example a template call news.html like it: 1. news.html {% extends "base.html" %} {% block title %} {% include "i

Re: Posting data from templates to views.py without using forms.

2019-01-02 Thread Osezele Orukpe
I guess you not using a frontend framework like reactJs or AngularJs. So i would suggest you look into AJAX. this could be done easily using jQuery's ajax function On Tuesday, January 1, 2019 at 3:46:53 PM UTC+1, Surajeet Das wrote: > > Well , I want to post data from templates to vi

Re: Posting data from templates to views.py without using forms.

2019-01-01 Thread pradam
Hi Surjeet, Then you should rely on ajax call or angularjs using ng-click. On Tue, Jan 1, 2019 at 8:16 PM Surajeet Das wrote: > Well , I want to post data from templates to views.py by clicking a button > without using forms. Basically the button should not be of type submit > becaus

Re: Posting data from templates to views.py without using forms.

2019-01-01 Thread pradam
Hi Surjeet, Then you should rely on ajax call or angularjs using ng-click. On Tue, Jan 1, 2019 at 8:16 PM Surajeet Das wrote: > Well , I want to post data from templates to views.py by clicking a button > without using forms. Basically the button should not be of type submit > becaus

Posting data from templates to views.py without using forms.

2019-01-01 Thread Surajeet Das
Well , I want to post data from templates to views.py by clicking a button without using forms. Basically the button should not be of type submit because I don't want the page to be refreshed .I want to view the data from database after the query in the same page. -- You received

Re: How to send parameters to templates and adjust the page url by path?

2018-12-13 Thread Saeed Pooladzadeh
Thank you Ira در چهارشنبه 12 دسامبر 2018، ساعت 19:21:26 (UTC-8)، lingo...@gmail.com نوشته: > > Hello, > > How to send parameters to templates and adjust the page url by path? > > regards, > > Saeed > -- You received this message because you are subscribed to the G

Re: How to send parameters to templates and adjust the page url by path?

2018-12-12 Thread Ira Abbott
hi, This is not much to go on: The 'parameters' are called 'context' You can read: https://docs.djangoproject.com/en/2.1/ref/templates/api/ to learn about templates and context. adding context in a view is done by adding context to a view as follows: def get_context_data(self, *args

How to send parameters to templates and adjust the page url by path?

2018-12-12 Thread lingo . saeed
Hello, How to send parameters to templates and adjust the page url by path? regards, Saeed -- 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 templates render

2018-09-02 Thread Kasper Laudrup
/models/ 2. How can i do HTML page should load from our db ? By using Django views and templates I guess? https://docs.djangoproject.com/en/2.1/topics/http/views/ Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users&q

Re: Django templates render

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

Re: Django templates render

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

Re: Wrting rtl templates for my web site

2018-08-18 Thread mottaz hejaze
يا عم محمد ده شغل css ابعتلي الكود وانا اشوفه .. ده ملوش علاقه بالدجانجو On Fri, 17 Aug 2018, 13:34 Mohamed El-sayed, < mohamed.elsayed.abdel...@gmail.com> wrote: > Hello Guys, > I have a question related to rtl templates > what i need is making a web site with heading rtl (

Wrting rtl templates for my web site

2018-08-17 Thread Mohamed El-sayed
Hello Guys, I have a question related to rtl templates what i need is making a web site with heading rtl (Arabic language) and i don't know how to make it First i used the RTL boot strap version with out integrating with django just a normal HTML file and the output was as expected [image

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

Django how to go about using npm modules with static/ templates

2018-07-13 Thread HashRocketSyntax
I have recently added *npm* to my project in order to keep better track of my js dependencies. Previously I have just been git cloning to my static/vendor folder. I've also added *gulp* , but have only got it doing hello world things right now. It seems simple enough - it can watch files,

Re: Templates html error

2018-06-28 Thread Tim Vogt (Tim Vogt)
/blog/mabase your structure must be /blog/mabase/templates/mabase/index.html TIm > Op 28 jun. 2018, om 15:35 heeft emmanuel wyckens het > volgende geschreven: > > /blog/mabase -- You received this message because you are subscribed to the Google Groups "Dj

Templates html error

2018-06-28 Thread emmanuel wyckens
Hello, I'am trying to use templates html files, but I've got some errors like this: TemplateDoesNotExist at /blog/mabase. It's seems that {% include 'navbar.html' %} is never find in template folders, but which folder to be used ? Thanks in advance to help me Emmanuel -- You received

Re: Where setting up templates directory in settings.py

2018-06-26 Thread Mikhailo Keda
> > you can use bitbucket or something similar for project sharing > there is an example of template directory settings - https://bitbucket.org/voron-raven/games/src/3fa65824be0d7fed2f8042ca189a3039ef016f28/games/settings.py#lines-102 -- You received this message because you are subscribed

Re: Where setting up templates directory in settings.py

2018-06-26 Thread Oskar Artur
you could try to create "blog" directory in your templates folder and put the date.html in there... not sure thou as I am very beginner ;) On Tuesday, 26 June 2018 12:02:45 UTC+2, emmanuel wyckens wrote: > > Hello, > > I didn't solve my issue on adding the templates dir

Where setting up templates directory in settings.py

2018-06-26 Thread emmanuel wyckens
Hello, I didn't solve my issue on adding the templates directories in setting.py. I always the same error : See my project in zip file Thanks in advance Emmanuel TemplateDoesNotExist at /blog/date blog/date.html Request Method: GET Request URL: http://127.0.0.1:8000/blog/date Django

RE: Nested for loops in templates

2018-06-15 Thread Matthew Pava
ngs.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
ngo-template?utm_medium=organic_source=google_rich_qa_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 users > *Subje

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

Re: how i set pagination's in django templates

2018-06-14 Thread Jason
https://simpleisbetterthancomplex.com/tutorial/2016/08/03/how-to-paginate-with-django.html On Thursday, June 14, 2018 at 3:19:11 AM UTC-4, arvind yadav wrote: > > hello > I want set pagination in Django templates > my data format is directory > dict = {'a': 123, 'b': 12,'c':

how i set pagination's in django templates

2018-06-14 Thread arvind yadav
hello I want set pagination in Django templates my data format is directory dict = {'a': 123, 'b': 12,'c': 123, 'd': 12,'e': 123, 'f': 12,'g': 123, 'h': 12,'i': 123, 'j': 12,'k': 123, 'l': 12,'m': 123, 'n': 12,'o': 123, 'p': 12,} i want only 5 key value in one page -- You received

RE: Nested for loops in templates

2018-06-13 Thread Matthew Pava
?utm_medium=organic_source=google_rich_qa_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. Thanks

Re: Nested for loops in templates

2018-06-13 Thread Vijay Khemlani
field}}, I've tried with {{row}}.{{field}}, as > well as {{ row.{{field}} }} (yeah, long shot ...) > > Any ideas, or should I try to create an entirely different data structure > in my view, which can be parsed more easily by Django templates? > > > cheers + thanks

Nested for loops in templates

2018-06-13 Thread Mikkel Kromann
}} {% endfor %} {% endfor %} Besides trying with {{row.field}}, I've tried with {{row}}.{{field}}, as well as {{ row.{{field}} }} (yeah, long shot ...) Any ideas, or should I try to create an entirely different data structure in my view, which can be parsed more easily by Django templates? cheers

Re: Setting up Django templates

2018-05-21 Thread Daniel Roseman
On Sunday, 20 May 2018 15:31:08 UTC+1, Salty beggar wrote: > > Hi, I'm trying to set up Templates for Django. I already have models and > views that function, and now I'm trying to figure out a way to get an > actual page to show for it. > > > > The views return JS

Setting up Django templates

2018-05-20 Thread Salty beggar
Hi, I'm trying to set up Templates for Django. I already have models and views that function, and now I'm trying to figure out a way to get an actual page to show for it. My models are from django.db import models class Continent(models.Model): name = models.CharField(max_length=60

Re: Adding to all templates context via Middleware

2018-05-14 Thread Melvyn Sopacua
On maandag 7 mei 2018 17:59:02 CEST Daniel Roseman wrote: > I still don't understand what is being repeated or why. You need to specify > that in your settings, and you can add whatever context processors you > like. You don't need to specify it twice, so nothing is being repeated. What Bernd

Re: Adding to all templates context via Middleware

2018-05-07 Thread Daniel Roseman
I still don't understand what is being repeated or why. You need to specify that in your settings, and you can add whatever context processors you like. You don't need to specify it twice, so nothing is being repeated. -- You received this message because you are subscribed to the Google

Re: Adding to all templates context via Middleware

2018-05-07 Thread Bernd Wechner
Daniel, The backend code contains: TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [os.path.join(BASE_DIR, "templates"),], 'APP_DIRS': True, 'OPTIONS': { 'context_

Re: Adding to all templates context via Middleware

2018-05-03 Thread Daniel Roseman
xperience, that stuff added to response.context_data > in middleware is not seen in templates (perhaps comes too late!). > > Another pager here: > > https://mlvin.xyz/django-templates-context-processors.html > > describes how to add to context used context processors. Searchi

Adding to all templates context via Middleware

2018-05-02 Thread Bernd Wechner
This interests me: https://teamtreehouse.com/community/django-how-can-i-retrieve-a-value-from-the-middleware alas no answer there, and time has changed things. I have checked form experience, that stuff added to response.context_data in middleware is not seen in templates (perhaps comes

Adding to all templates context via Middleware

2018-05-01 Thread Bernd Wechner
This interests me: https://teamtreehouse.com/community/django-how-can-i-retrieve-a-value-from-the-middleware alas no answer there, and time has changed things. I have checked form experience, that stuff added to response.context_data in middleware is not seen in templates (perhaps comes too

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

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: >> >>

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

2018-04-23 Thread Julio Biason
You could, on your views, get the DEBUG setting (using django.conf) and pass it to the templates, as you do with all other variable. From: django-users@googlegroups.com <django-users@googlegroups.com> on behalf of Alexander Joseph <alexander.v.jos...@

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

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

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

Re: Templates and URL Mappings

2018-04-03 Thread Will Burchell
>> # /stock/nnn/ >> url(r'^(?P[0-9]+)/$', views.detail, name="detail"), >> # /stock/supplier >> url(r'^supplier', views.supplier, name="supplier"), >> # /stock/supplier/nnn/ >> url(r'^supplier/(?P[0-9]+)/$', views.

Re: Templates and URL Mappings

2018-04-02 Thread Daniel Roseman
l, name > ="supplierdetail"), > ] > Firstly, as a clarification, URLs don't map to templates at all; they map to views, and views may or may not render templates. But you do seem to know this. Your problem however is simply to do with regexes; you don't terminate your supp

Templates and URL Mappings

2018-04-02 Thread Will Burchell
Hi all, I'm having some trouble understanding fairly basic URL mappings and how they rout through to templates. I have an app "stock" which is registered in my base admin.py. I have three classes in my app, stock\models.py listed below: from django.db import models clas

Re: Adding seperate static css file for other extended templates.

2018-03-27 Thread Mike Dewhirst
On 27/03/2018 5:08 PM, prince gosavi wrote: Thanks for the reply but it is not working for me. When i check the page source of the loaded page the 'query.css' is not loaded. Is it because of the urls? or path? or something else. here is my static settings: | settings.py STATIC_URL ='/static/'

Re: Adding seperate static css file for other extended templates.

2018-03-27 Thread prince gosavi
Thanks for the reply but it is not working for me. When i check the page source of the loaded page the 'query.css' is not loaded. Is it because of the urls? or path? or something else. here is my static settings: settings.py STATIC_URL = '/static/' STATICFILES_DIRS = ( os.path.join(BASE_DIR,

Re: Adding seperate static css file for other extended templates.

2018-03-26 Thread Mike Dewhirst
On 27/03/2018 3:09 PM, prince gosavi wrote: I am working on a project where I need to have different styles for different templates. I have a base.html template which gets extended in other templates. Following is the snippet: | base.html {%load static%} Recommendation     href

Adding seperate static css file for other extended templates.

2018-03-26 Thread prince gosavi
I am working on a project where I need to have different styles for different templates. I have a base.html template which gets extended in other templates. Following is the snippet: base.html {% load static %} Recommendation {% block css%} {% endblock

Re: Dealing with templates in an open source Django project?

2018-03-20 Thread 'Simon Connah' via Django users
create admin views which allow users to customise the specifics of the templates. Is that what you meant? If it is, then it is indeed an interesting idea I hadn't considered. I'm not entirely sure how I would go about doing that at the moment. I'd have to think. If you meant somethin

Re: Dealing with templates in an open source Django project?

2018-03-19 Thread Etienne Robillard
might understand what you mean to a degree, but I'm not sure how to go about it. In effect, I should layout a basic template for general use and then create admin views which allow users to customise the specifics of the templates. Is that what you meant? If it is, then it is indeed an interesting

Re: Dealing with templates in an open source Django project?

2018-03-19 Thread 'Simon Connah' via Django users
views which allow users to customise the specifics of the templates. Is that what you meant? If it is, then it is indeed an interesting idea I hadn't considered. I'm not entirely sure how I would go about doing that at the moment. I'd have to think. If you meant something else, then please let me

Re: Dealing with templates in an open source Django project?

2018-03-18 Thread Etienne Robillard
Hi Simon, I'll try to help you out with that. Have you considered using Django models to allow end users to create, edit and customize templates within the Django admin? This should be pretty easy to do. All you need is to define some models for your customized templates and then the user

Dealing with templates in an open source Django project?

2018-03-18 Thread 'Simon Connah' via Django users
the answer. As I am building the blogging platform, I am of course writing my templates to make sure that everything is working correctly. But a side issue with that is that the templates now contain phrases related to the website I intend to create when the blogging platform is at a reasonable stage

Re: New Question How to Let a user upload a Video and then show the content on Templates in Django?

2018-03-12 Thread djangorobert
Hi Carlos I figured it out actually i put this {{user.profile.vid.url}} On Monday, March 12, 2018 at 2:29:11 PM UTC-5, sacrac wrote: > > what use Imagefield?, you use FileField is you need the user upload a > video like mp4. avi, mpg etc. > and in your html use tag for render. {{object.video}}

Re: New Question How to Let a user upload a Video and then show the content on Templates in Django?

2018-03-12 Thread anuch thakker
try to create one folder "{% static 'your folder name /file name' %}"also create static folder On Tuesday, 13 March 2018 00:46:52 UTC+5:30, djangorobert wrote: > > Hi Im not sure if i am the only one in the Django community who has been > trying to add this feauture for a couple of years

Re: New Question How to Let a user upload a Video and then show the content on Templates in Django?

2018-03-12 Thread carlos
what use Imagefield?, you use FileField is you need the user upload a video like mp4. avi, mpg etc. and in your html use tag for render. {{object.video}} example Your browser does not support the video tag. On Mon, Mar 12, 2018 at 1:16 PM, djangorobert wrote:

New Question How to Let a user upload a Video and then show the content on Templates in Django?

2018-03-12 Thread djangorobert
Hi Im not sure if i am the only one in the Django community who has been trying to add this feauture for a couple of years Basically what i want is to let the user upload videos. I know that you could add the line in your models with a ImageField is that right? but then in the template with a

Re: Designing templates for database application

2018-01-15 Thread Derek
ic-editing/ ). Templates tend to be very specifc to your app ... the main point to remember is that inheritance is key - the "boiler plate" look part needs to be inherited; so a typical form will only need up a needing a dozen or so lines of actual custom code. On Monday, 15 January 2018

Designing templates for database application

2018-01-14 Thread rich
I've developed database applications before but this is my first attempt to use Django. I'm building a client management system for my own use and would like to see examples of templates for this purpose. It's not a blog or document-heavy app, but consists of tables (the schema's written

Re: Django debug of templates and home.html

2017-11-15 Thread drone4four
ango cheat sheet. I encountered a number of issues and > resolved them but now I find myself stuck. > > When I try navigating to my new homepage, Django provides me with this > debug traceback <https://pastebin.com/QqXhgVM3>. Django is telling me > here that the templates

Re: Django debug of templates and home.html

2017-11-15 Thread drone4four
is time using a > supplementary Django cheat sheet. I encountered a number of issues and > resolved them but now I find myself stuck. > > When I try navigating to my new homepage, Django provides me with this > debug traceback <https://pastebin.com/QqXhgVM3>. Django is telling me

Re: Django debug of templates and home.html

2017-11-15 Thread 'Amitesh Sahay' via Django users
e here that the templates directory doesn’t exist, when it clearly does. Here is a screenshot of Atom so you can see my project’s file tree. As you can see my directory tree for my project, there is an folder which is called, blogitems. and within the blogitems folder is a sub-folder called, tem

Django debug of templates and home.html

2017-11-15 Thread drone4four
a supplementary Django cheat sheet. I encountered a number of issues and resolved them but now I find myself stuck. When I try navigating to my new homepage, Django provides me with this debug traceback <https://pastebin.com/QqXhgVM3>. Django is telling me here that the templates directory d

Re: Django Templates and Conditional CSS classes

2017-11-11 Thread PASCUAL Eric
make big rivers :) Eric From: django-users@googlegroups.com <django-users@googlegroups.com> on behalf of treyd <t...@treyd.us> Sent: Saturday, November 11, 2017 20:49 To: Django users Subject: Re: Django Templates and Conditional CSS classes Omar (a

<    1   2   3   4   5   6   7   8   9   10   >