Re: Error: name 'include' is not defined

2023-04-02 Thread Larry Stevens
Perfect, thank you Larry Stevens (571) 289-7658 On Wed, Mar 22, 2023 at 9:49 AM Harouna Diallo wrote: > You must Import include : from django.urls import path, include > > On Wed, Mar 22, 2023 at 12:53 PM Larry Stevens > wrote: > >> Hello, >> >> I'm brand

Re: Error: name 'include' is not defined

2023-03-23 Thread Ikrombek
How can I use for dental clinic, For example, do I need to include 32 fields from the model to specify 32 teeth, or is there a way to do it in one? On Wednesday, March 22, 2023 at 8:24:18 PM UTC+5 Larry Stevens wrote: > Perfect, problem solved. > Thank you so much Jeman, Harouna, and Ro

Re: Error: name 'include' is not defined

2023-03-22 Thread Larry Stevens
Perfect, problem solved. Thank you so much Jeman, Harouna, and Robinson. Greatly appreciated. On Wednesday, March 22, 2023 at 11:16:58 AM UTC-4 Robinson wrote: > import path, include > > > On Wed, Mar 22, 2023 at 4:49 PM Harouna Diallo wrote: > >> You must Import inclu

Re: Error: name 'include' is not defined

2023-03-22 Thread Robinson
import path, include On Wed, Mar 22, 2023 at 4:49 PM Harouna Diallo wrote: > You must Import include : from django.urls import path, include > > On Wed, Mar 22, 2023 at 12:53 PM Larry Stevens > wrote: > >> Hello, >> >> I'm brand new to Django taking an o

Re: Error: name 'include' is not defined

2023-03-22 Thread Harouna Diallo
You must Import include : from django.urls import path, include On Wed, Mar 22, 2023 at 12:53 PM Larry Stevens wrote: > Hello, > > I'm brand new to Django taking an online course in Python. > I created a project named 'django_test' and I'm in the process of cr

Re: Error: name 'include' is not defined

2023-03-22 Thread Jeman Kumar
hi, replace the line "from django.urls import path" to "from django.urls import path, include" On Wed, 22 Mar, 2023, 6:22 pm Larry Stevens, wrote: > Hello, > > I'm brand new to Django taking an online course in Python. > I created a project named 'djang

Error: name 'include' is not defined

2023-03-22 Thread Larry Stevens
or the app 'hello_world'. My code in urls.py follows: from django.contrib import admin from django.urls import path urlpatterns = [ path('admin/', admin.site.urls), path('hello_world/', include('hello_world.urls')) ] The return error is

Re: Where to include libraries I write in a django app

2023-03-14 Thread Scott McKissock
.py ├── urls.py ├── utils.py > # include utility code as another module └── views.py > ​ > my_app ├── __init__.py ├── apps.py ├── models.py ├── urls.py ├── utils # > break out more complicated utility code into a package │ ├── __init__.py │ > ├── utility1.py │ └── utility2.p

Re: Where to include libraries I write in a django app

2023-03-13 Thread bck...@gmail.com
Hi Scott, Yes, generally single-app relevant utility code should be included as additional modules within that app. Some examples: my_app ├── __init__.py ├── apps.py ├── models.py ├── urls.py ├── utils.py # include utility code as another module └── views.py ​ my_app ├── __init__.py

Where to include libraries I write in a django app

2023-03-11 Thread Scott McKissock
Django/Python noob question. What is the convention for including utility packages/modules within a django app? I have a bit of code that will only be used in a single django app, and I'd like to write tests for it and use it within the app. Should I just put it in a directory/package in the ro

Re: Use include template tag in another app template folder

2022-09-02 Thread Wazed Khan
Sep 2, 2022, 5:22 PM mohamed khaled < >> mohamed.khaled33...@gmail.com> wrote: >> >>> I have two apps each one has template folder I want to use *include >>> *template >>> tag to get template from other app how can I handle that >>> >>>

Re: Use include template tag in another app template folder

2022-09-02 Thread Wazed Khan
It would be problematic. Just copy and paste the template file from one > app into the other. > > Abdul Qoyyuum Bin Haji Abdul Kadir > about.me/qoyyuum > > On Fri, Sep 2, 2022, 5:22 PM mohamed khaled > wrote: > >> I have two apps each one has template folder I want to use *inc

Re: Use include template tag in another app template folder

2022-09-02 Thread Abdul Qoyyuum Haji Abdul Kadir
It would be problematic. Just copy and paste the template file from one app into the other. Abdul Qoyyuum Bin Haji Abdul Kadir about.me/qoyyuum On Fri, Sep 2, 2022, 5:22 PM mohamed khaled wrote: > I have two apps each one has template folder I want to use *include *template > tag

Use include template tag in another app template folder

2022-09-02 Thread mohamed khaled
I have two apps each one has template folder I want to use *include *template tag to get template from other app how can I handle that -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiv

Re: how to include image dynamically

2022-02-24 Thread Adeyemi Deji
Make sure u configured the Media_root and Media_url appropriately in the settings.py file On Thu, 24 Feb 2022, 18:18 Adeyemi Deji, wrote: > They are two ways to this. But would talk about one, the other is more > practical. Takeout the baseUrl variable and the forward slash, then use {{ > cmp.im

Re: how to include image dynamically

2022-02-24 Thread Adeyemi Deji
They are two ways to this. But would talk about one, the other is more practical. Takeout the baseUrl variable and the forward slash, then use {{ cmp.img.url }}. This should work and if it doesn't. Look for solutions by googling it. Sure u would find answers to ur question. On Thu, 24 Feb 2022, 17

Re: how to include image dynamically

2022-02-24 Thread Kasper Laudrup
On 24/02/2022 16.41, Suresh_Chilukuri wrote: I am asking how we can get image from function based views dynamically in template file What do you mean by dynamic? Do you mean passing a list of files from a specific sub directory in the static folder to the template? Kind regards, Kasper L

Re: how to include image dynamically

2022-02-24 Thread Suresh_Chilukuri
I am asking how we can get image from function based views dynamically in template file Where images are present at static folder -static - Images - image1 On Thu, 24 Feb, 2022, 8:16 PM Kasper Laudrup, wrote: > On 24/02/2022 11.57, Suresh_Chilukuri wrote: > > I tried using

Re: how to include image dynamically

2022-02-24 Thread Kasper Laudrup
On 24/02/2022 11.57, Suresh_Chilukuri wrote: I tried using below method but the image was not displaying Which "method"? All you've provided is an image of some parts of some Django template code. That is in no way enough for anyone to be able to help you. Describe your problem in detail if

"include super" with django templates?

2021-12-30 Thread Nick Farrell
I would like to extend a django template which is used via the include macro. That is, I want to add additional output before or after what would otherwise be emitted. With the normal {% block %} syntax, it's easy to use super to follow the template heirachy similar to __mro__ - but

How do I return a queryset of all items (X) ManyToMany related to model class (Y) and include values for (Y) in the same result in each item X

2021-07-05 Thread mtp...@gmail.com
I have the following two model classes: ``` class Property(models.Model): """Represents property class model""" serial_no = models.CharField(unique=True,max_length=255,blank=True,null=True) map_no = models.CharField(max_length=255,blank=True,null=True) lr_no = models.CharField(ma

Re: Django Project Created in Pycharm using App Engine Does not include Django boiler files

2020-04-19 Thread Jorge Gimeno
gle cloud and I'm trying to set up a Django > app in Pycharm using app Engine. > I have followed all the steps recommend by JetBrain > > But it worries that each time I generate a project it doesn't always > include the Django files > > Here are the steps I followed to g

How to include choice value into queryset?

2020-02-02 Thread Leon Vaks
Dear Community Members, How would you include choice value into queryset specified in my models.py? When I run the following code in the terminal panel, I am getting correct results. i = Interactions.objects.get(pk=1) i.get_interactioncatid_display() # correct answer My query is the following

httpd.conf error on include django.conf and duplicate wsgi name

2019-05-16 Thread Kurosh Sol
I want to set up my Django in Apache server using wsgi I have already install mod_wsgi but when I make django.conf and try to include it in my "etc/apache2/conf.d/includes/pre_main_global.conf to get include to my httpd.conf i got this error in my whm Sorry, you cannot update the include

Re: Discussion: Why not Django include uWSGI/FastCGI support internally just like Spring Boot include tomcat ?

2019-02-27 Thread panfei
ter. > > > On Wed, 27 Feb 2019 at 09:35, panfei wrote: > >> If Django include these production-ready container, and then implement a >> mange.py admin command, by just executing the command we can start a >> production-ready service. >> >> Any possibil

Re: Discussion: Why not Django include uWSGI/FastCGI support internally just like Spring Boot include tomcat ?

2019-02-27 Thread Simone Federici
Spring boot is like a django boot external lib to start a django microservice. exactly like spring boot. you can build your spring application without a spring boot starter. On Wed, 27 Feb 2019 at 09:35, panfei wrote: > If Django include these production-ready container, and then implemen

Discussion: Why not Django include uWSGI/FastCGI support internally just like Spring Boot include tomcat ?

2019-02-27 Thread panfei
If Django include these production-ready container, and then implement a mange.py admin command, by just executing the command we can start a production-ready service. Any possibilities on this idea ? -- 不学习,不知道 -- You received this message because you are subscribed to the Google Groups

Re: Using {% include %} and getting context with me

2019-02-13 Thread Mikkel Kromann
Bah! I should really read the docs more carefully. >From the docs: "*Include:* *Loads a template and renders it with the current context.*" https://docs.djangoproject.com/en/2.1/ref/templates/builtins/#include The example I posted actually works perfectly fine with regards to th

Re: Using {% include %} and getting context with me

2019-02-13 Thread Avraham Serour
. > Each app is supposed to render various combinations of tables from its own > models, but also from other models' tables. > (yes, it is a hideously complex structure - and believe me, I've tried to > simplify it a lot - even with some success) > > Can I - in a page whic

Using {% include %} and getting context with me

2019-02-13 Thread Mikkel Kromann
' tables. (yes, it is a hideously complex structure - and believe me, I've tried to simplify it a lot - even with some success) Can I - in a page which extends a base, include various "template snippets", so that I can reuse the template snippets across several apps? base.html:

Re: Itterate with Include Tag

2019-01-02 Thread Osezele Orukpe
Hi Shazia, Can you post the included file? On Saturday, December 29, 2018 at 11:51:29 PM UTC+1, Shazia Nusrat wrote: > > Hi Guys, > > I have a form created from foreignkey model. I have used "include" with > jinja for displaying my fields. But I don't know how to

Itterate with Include Tag

2018-12-29 Thread Shazia Nusrat
Hi Guys, I have a form created from foreignkey model. I have used "include" with jinja for displaying my fields. But I don't know how to iterate through and include tag. % Below is the code and I would appreciate if someone can help me to iterate through following template code.

Re: from django.urls import include , path ImportError: cannot import name include

2018-12-05 Thread رهام صادقی
ow i changed here is and working fine.. > > from django.contrib import admin > from django.conf.urls import url, include > > urlpatterns = [ > url (r'^boadts/', include ('boadts.urls')), > url (r'^admin/',admin.site.urls), > ]

Re: from django.urls import include , path ImportError: cannot import name include

2018-12-05 Thread Dheeraj Kumar
It won't work. now i changed here is and working fine.. from django.contrib import admin from django.conf.urls import url, include urlpatterns = [ url (r'^boadts/', include ('boadts.urls')), url (r'^admin/',admin.site.urls), ] and in apps from djang

Re: from django.urls import include , path ImportError: cannot import name include

2018-12-04 Thread Harryxon Ndegwa
use django.urls import path instead to import path #%£& On Tue, 4 Dec 2018 7:06 pm Dheeraj Kumar thanks to respond me but still having an issue. > > from django.contrib import admin > from django.conf.urls import include, path > > urlpatterns = [ > path('boad

Re: from django.urls import include , path ImportError: cannot import name include

2018-12-04 Thread Dheeraj Kumar
thanks to respond me but still having an issue. from django.contrib import admin from django.conf.urls import include, path urlpatterns = [ path('boadts/', include ('boadts.urls')), path('admin/',admin.site.urls), ] File "/home/myproject/mypro

Re: from django.urls import include , path ImportError: cannot import name include

2018-12-04 Thread C. Kirby
from django.conf.urls import include you are missing conf On Tuesday, December 4, 2018 at 8:21:39 AM UTC-5, tal...@gmail.com wrote: > > plz advise... > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

from django.urls import include , path ImportError: cannot import name include

2018-12-04 Thread talkdkg
plz advise... -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@google

Re: view must be a callable or a list/tuple in the case of include()

2018-10-12 Thread Gift Emmanuel Alua
Thanks. I fixed it On Fri, Oct 12, 2018 at 3:07 PM Ігор Магур wrote: > You need to import polls.views, and pass view.index into path func > Ex from polls import views > urlpatterns = [ > path('polls/', views.index), > ] > > -- > You received this message because you are subscribed to the Goo

view must be a callable or a list/tuple in the case of include()

2018-10-12 Thread Ігор Магур
You need to import polls.views, and pass view.index into path func Ex from polls import views urlpatterns = [ path('polls/', views.index), ] -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving em

view must be a callable or a list/tuple in the case of include()

2018-10-12 Thread Gift Emmanuel Alua
Hello everyone, I am new to Django. I have been following the documentation and getting started with my first app.I get the following TypeError: view must be a callable or a list/tuple in the case of include(). I added path(r'^polls/$' ,'polls.views.index'), in the mysite u

Re: TypeError: view must be a callable or a list/tuple in the case of include().

2018-08-25 Thread ansh srivastav
Use the following in urls.py: from django.conf.urls import include,url On Sat, Aug 25, 2018 at 12:54 PM Aware Fun wrote: > > > rahul > > On Fri, Aug 24, 2018, 3:17 AM herve kabore wrote: > >> this is the urls.py >> >> >> from django.conf.urls

Re: TypeError: view must be a callable or a list/tuple in the case of include().

2018-08-25 Thread Aware Fun
rahul On Fri, Aug 24, 2018, 3:17 AM herve kabore wrote: > this is the urls.py > > > from django.conf.urls import include,url > from django.contrib import admin > > urlpatterns = [ > url(r'^admin/', include(admin.site.urls)), > >

Re: TypeError: view must be a callable or a list/tuple in the case of include().

2018-08-25 Thread Glen D souza
is the urls.py > > > from django.conf.urls import url > from django.contrib import admin > > urlpatterns = [ > url(r'^admin/', include(admin.site.urls)), > > url(r'^$', 'blog.views.home', name='home'), > ] > > &g

TypeError: view must be a callable or a list/tuple in the case of include().

2018-08-23 Thread herve kabore
this is the urls.py from django.conf.urls import url from django.contrib import admin urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^$', 'blog.views.home', name='home'), ] this is the views from django.shortcut

Re: How to include delete function in UpdateView instead a DeleteView

2018-08-11 Thread Melvyn Sopacua
On vrijdag 10 augustus 2018 16:51:54 CEST zengkeat wrote: > I have a UpdateView for editing a post, but instead of making a DeleteView > for delete a post, i try to make UpdateView include a function to delete > the post. So ,i want to edit and delete a post in UpdateView. Is that >

How to include delete function in UpdateView instead a DeleteView

2018-08-10 Thread zengkeat
I have a UpdateView for editing a post, but instead of making a DeleteView for delete a post, i try to make UpdateView include a function to delete the post. So ,i want to edit and delete a post in UpdateView. Is that possible ? form_valid() missing 1 required positional argument: &#x

How to include delete function in UpdateView instead a DeleteView

2018-08-10 Thread zengkeat
down vofavori <https://stackoverflow.com/questions/51772361/how-to-include-delete-function-in-updateview-instead-a-deleteview#> I have a UpdateView for editing a post, but instead of making a DeleteView for delete a post, i try to make UpdateView include a function to delete the post.

RE: How to include a Where clause for each query on django?

2018-06-14 Thread Matthew Pava
MyModel: objects = MyCustomerManager() From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Fellipe Henrique Sent: Thursday, June 14, 2018 9:09 AM To: Django Users Subject: How to include a Where clause for each query on django? Hello.. Each model

How to include a Where clause for each query on django?

2018-06-14 Thread Fellipe Henrique
Hello.. Each model of my app, has a field named user... so, I need to filter any query on that model user=current_user... I already do that, but manually for each model, on a view.. and I like to do that directly on some where when I try to use a query, any record will be filtered. Can I

Re: ImportError : cannot import name include

2018-05-18 Thread James Farris
ation for your version of Django: > > https://docs.djangoproject.com/en/1.11/ > > You are seeing this specific error because in Django 2.0, you can write > "from django.urls import include", while in Django 1.11, you have to write > "from django.conf.urls import include

Re: ImportError : cannot import name include

2018-05-18 Thread Journal-Immo
sion 2.0. Use the right documentation for your version of Django: https://docs.djangoproject.com/en/1.11/ You are seeing this specific error because in Django 2.0, you can write "from django.urls import include", while in Django 1.11, you have to write "from django.conf.urls impor

Re: ImportError : cannot import name include

2018-05-18 Thread Gerald Brown
t.com/en/1.11/ You are seeing this specific error because in Django 2.0, you can write "from django.urls import include", while in Django 1.11, you have to write "from django.conf.urls import include". Note that using Debian packages, you won't get the latest version of

Re: ImportError : cannot import name include

2018-05-18 Thread Fidel Leon
You need to follow the CORRECT tutorial: https://docs.djangoproject.com/en/1.11/ In the urls.py file, instead of: from django.contrib import adminfrom django.urls import include, path urlpatterns = [ path('polls/', include('polls.urls')), path('admin/', adm

Re: ImportError : cannot import name include

2018-05-18 Thread Daniel Hepper
fic error because in Django 2.0, you can write "from django.urls import include", while in Django 1.11, you have to write "from django.conf.urls import include". Note that using Debian packages, you won't get the latest version of Django (or any other Python packages)

Re: ImportError : cannot import name include

2018-05-18 Thread Journal-Immo
Thank But (I use debian 9) Apt-get update Apt-get install python python3 python-django django-admin --version 1.11.13 Where is the problem ? Le 17/05/2018 à 21:01, Fidel Leon a écrit : You are using the wrong combination of Django and tutorial: “include” is available in Django 2 and up

Re: ImportError : cannot import name include

2018-05-17 Thread Pranay reddy
From which package you have imported "in

Re: ImportError : cannot import name include

2018-05-17 Thread Daniel Hepper
You are using Django 1.11 with the tutorial written for Django 2.0. Therr should be a version picker on the bottom right of the tutorial. You are seeing this error because the way to import ‚include’ has changed from 1.11 to 2.0 Hope that helps, Daniel > Am 17.05.2018 um 19:34 schrieb Tris

Re: ImportError : cannot import name include

2018-05-17 Thread Fidel Leon
You are using the wrong combination of Django and tutorial: “include” is available in Django 2 and up, but you’re using Django 1.11. Fidel Leon fi...@flm.cat Phone: +34 622 26 44 92 GPG: 2585 30C2 E3C7 7151 0864 946B 7423 F94B 5753 5FC7 El 17 de mayo de 2018 a las 20:56:56, Tristan Demot

ImportError : cannot import name include

2018-05-17 Thread Tristan Demot
Hello, I use docs.djangoproject.co/en/2.0 Python 2 7 13 Gjango 1.11.13 Creating the Polls app OK Write your first view OK But python manage runserver don't work With : python -Wall manage.py test ImportError : cannot import name include If you want to see something, ask me Many t

Re: First Django Patch: django.contrib.auth 'Specifying a namespace in include() without providing an app_name '

2018-04-15 Thread Tim Graham
rst patch on django with it. I am using Django 2.0.4. > > Error code: > > File "/Users/User/PycharmProjects/django 0-1 login > test/auth0login/urls.py", line 18, in > > path('', include('django.contrib.auth.urls', 'auth')), >

Re: Will django include a simpler way to change username to email for registration in the future ?

2018-01-24 Thread Nick Sarbicki
seUser in order to change user to email for registration and >>> login. Takes time and it is a lot of code. I was wondering if django will >>> include a simpler way of doing it ? Something simple like just changing a >>> settings.py variable to email and boom, u can create a

Re: Will django include a simpler way to change username to email for registration in the future ?

2018-01-24 Thread Avraham Serour
l Cîrstea < > daniel.cirste...@gmail.com> wrote: > >> Hello. For a while I noticed that it is a struggle to extend the >> AbstractBaseUser in order to change user to email for registration and >> login. Takes time and it is a lot of code. I was wondering if django wi

Re: Will django include a simpler way to change username to email for registration in the future ?

2018-01-23 Thread Vijay Khemlani
is a lot of code. I was wondering if django will > include a simpler way of doing it ? Something simple like just changing a > settings.py variable to email and boom, u can create accounts with email > address. > > -- > You received this message because you are subscribed to

Will django include a simpler way to change username to email for registration in the future ?

2018-01-23 Thread Daniel Cîrstea
Hello. For a while I noticed that it is a struggle to extend the AbstractBaseUser in order to change user to email for registration and login. Takes time and it is a lot of code. I was wondering if django will include a simpler way of doing it ? Something simple like just changing a

Django module - include dependencies

2017-10-22 Thread Pablo Camino Bueno
Hi, I'm building my own Django package to publish it to PyPI. It has some JS dependencies. Some are mine, and some are external. What is the best way to include them? I can keep the js files within the plugin. I think this is something that other django packages do, although it'

Re: include template in a page

2017-08-25 Thread Mike Morris
I may be alone in this, but perhaps it will help piceofkayk2718 to know that I completely ignore his (?) posts because there is never any context On 08/23/2017 12:01 PM, pieceofkayk2...@gmail.com wrote: Do you have an action on your register form? Like -- You received this message beca

Re: include template in a page

2017-08-23 Thread pieceofkayk2718
Do you have an action on your register form? Like -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this gr

include template in a page

2017-08-07 Thread MPY
I want to include the registration form in a page of cmd. so first 1.- create the page in the backend 2.- create a template for this page 3 assign the template for this page 4 and add the form like this.. {%include 'account/register.html'%} In this point, I see my registration form on

Re: how to include template

2017-05-03 Thread Thiago Luiz Parolin
com', > '/home/html/default', > ], > }, > { > 'BACKEND': 'django.template.backends.jinja2.Jinja2', > 'DIRS': [ > '/home/html/jinja2', > ], > }, > ] > &

Re: how to include template

2017-05-03 Thread Dartos
'/home/html/jinja2', ], }, ] Once Django is aware of where to search for templates, you can include templates from your project's templates directory as follows: {% include "Error.html" %} And you can include app templates as follows: {% include "App1/App1.

how to include template

2017-05-03 Thread Thiago Luiz Parolin
I have a project that has a folder structure like this: Project1 / --Templates / Base.html Error.html --App1 Templates / --App1 / App1.html How can i include error.html in app1.html? I am trying using {% include

Re: Include pictures in content

2017-04-11 Thread Steve Watts
te. I want to incorporate pictures into content on a post. The 'insert >> image' icon on the content toolbar asks for an 'image web link'. The >> pictures I want to include (as pictures, not as links) are on the web site >> in the default home/assets/images fo

Re: Include pictures in content

2017-04-06 Thread john
content toolbar asks for an 'image web link'. The pictures I want to include (as pictures, not as links) are on the web site in the default home/assets/images folder. Can anyone tell me the format of the link to these images stored on the site? Thank You, Alan Dunn

Re: Include pictures in content

2017-04-06 Thread Ardunn
orate pictures into content on a post. The 'insert image' > icon on the content toolbar asks for an 'image web link'. The pictures I > want to include (as pictures, not as links) are on the web site in the > default home/assets/images folder. Can anyone tell me the f

Re: Include pictures in content

2017-04-06 Thread ludovic coues
> on the content toolbar asks for an 'image web link'. The pictures I want to > include (as pictures, not as links) are on the web site in the default > home/assets/images folder. Can anyone tell me the format of the link to > these images stored on the site? > Thank You, Ala

Include pictures in content

2017-04-06 Thread ardunn
I am new to using django which has been used to create our church website. I want to incorporate pictures into content on a post. The 'insert image' icon on the content toolbar asks for an 'image web link'. The pictures I want to include (as pictures, not as links) are on

How to include related_names in a mixing for a model?

2016-11-04 Thread Jonty Needham
So I have one model, which uses a ContentType to point to a collections of models across separate apps. I want to be able to "plug in" the functionality linking that model to the other models in the separate app. So we have the follwing: class MyModelMixin(models.Model): """ Mixin to get the

Re: TypeError: view must be a callable or a list/tuple in the case of include(). in urls.py

2016-09-05 Thread James Schneider
On Sep 5, 2016 6:06 AM, "arun kumar" wrote: > > Hi, > >I'm working in Django 1.10 and I got the type error in the below file at this line " url(r'^$', views.dashboard, name = 'dashboard')," > > from django.conf.urls import includ

Re: TypeError: view must be a callable or a list/tuple in the case of include(). in urls.py

2016-09-05 Thread 'Abraham Varricatt' via Django users
r still persists, it will help if you include the full traceback in your email. Yours, Abraham V. On Monday, September 5, 2016 at 6:36:37 PM UTC+5:30, arun kumar wrote: > > Hi, > >I'm working in Django 1.10 and I got the type error in the below file > at this

TypeError: view must be a callable or a list/tuple in the case of include(). in urls.py

2016-09-05 Thread arun kumar
Hi, I'm working in Django 1.10 and I got the type error in the below file at this line "* url(r'^$', views.dashboard, name = 'dashboard'),*" *from django.conf.urls import include, url* *from . import views* *urlpatterns = [* *#preview login view* *

{% include {% static "css/some.css" %} %} Idea

2016-08-06 Thread Roberth Solis Martínez
Hello guys, some time ago I read that 90% of the time, the CPU waits for an I / O HDD, but django recommends using static files on another server, but if you include the styles and JavaScript in the

Re: template include for Django 1.8

2016-07-14 Thread Mike Dewhirst
On 14/07/2016 5:17 PM, James Schneider wrote: Includes the css file thanks James but it doesn't satisfy the pdf software. Back to the embedded styles copied and pasted. Oh well. I'd be curious as to why. There should be no difference between you c/p the styles in to the template vs. havi

Re: template include for Django 1.8

2016-07-14 Thread James Schneider
> > > Includes the css file thanks James but it doesn't satisfy the pdf software. > > Back to the embedded styles copied and pasted. > > Oh well. > I'd be curious as to why. There should be no difference between you c/p the styles in to the template vs. having them included via the template tag.

Re: template include for Django 1.8

2016-07-14 Thread Mike Dewhirst
On 14/07/2016 4:53 PM, James Schneider wrote: On Jul 13, 2016 6:54 PM, "Mike Dewhirst" mailto:mi...@dewhirst.com.au>> wrote: I need to include the contents of a css file in my template [1] The css content needs to exist within and </pre></blockquote><pre styl

Re: template include for Django 1.8

2016-07-13 Thread James Schneider
On Jul 13, 2016 6:54 PM, "Mike Dewhirst" wrote: > > I need to include the contents of a css file in my template [1] > > The css content needs to exist within and tags so that the pdf output software I'm using can see the styles. > > I can get the correct

template include for Django 1.8

2016-07-13 Thread Mike Dewhirst
I need to include the contents of a css file in my template [1] The css content needs to exist within and </tt><tt> tags so that the pdf output software I'm using can see the styles. I can get the correct effect by copying and pasting the contents of the css file into the

Extending Form to include 'placeholder' text

2016-03-22 Thread Rich Rauenzahn
Hi, I'd like to make a mixin to set the placeholder text in the widget attrs. Reading this https://code.djangoproject.com/ticket/5793, it seems that extending Meta for custom fields is somewhat discouraged. Would the following be the recommended way to do it? Just adding a class variable to t

Re: TypeError: view must be a callable or a list/tuple in the case of include()

2016-02-19 Thread ruben . charleville
Many thanks Tim! Problem solved. Best Regards, Ruben -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this

Re: TypeError: view must be a callable or a list/tuple in the case of include()

2016-02-19 Thread Tim Graham
, February 19, 2016 at 8:55:44 AM UTC-5, ruben.ch...@gmail.com wrote: > > Hi there. To test out django I created a Work_manager for a site, and > created this for he urls.py: > > from django.conf.urls import include, url > # from django.contrib import admin > > urlpatterns

TypeError: view must be a callable or a list/tuple in the case of include()

2016-02-19 Thread ruben . charleville
Hi there. To test out django I created a Work_manager for a site, and created this for he urls.py: from django.conf.urls import include, url # from django.contrib import admin urlpatterns = [ # url(r'^admin/', admin.site.urls), url(r'^$', 'TasksManager.view

Aw: React.js with django-rest-framework using SessionAuthentication: How to include CSRF-Token documentation has not helped me :/

2015-12-28 Thread lnzy35en
SessionAuthentication: How to include CSRF-Token documentation has not helped me :/       -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-user

React.js with django-rest-framework using SessionAuthentication: How to include CSRF-Token documentation has not helped me :/

2015-12-27 Thread lnzy35en
  Hi, I am getting crazy finding out how to submit data to the django-rest-api via react.js to include a valid CSRF token by using SessionAuthentication. My template is very basic: {% extends "base.html" %} {% load staticfiles %} {% block title %} ToDo List {% endblock %} {% blo

Re: include template which extends something else

2015-10-28 Thread Sven Wanner
get what you mean. I think thats > exactly what I tried to do. > > I have kind of a main.html doing that: > > {% block my-wall %} > > > {% for obj in objects %} > > {% include 'wall_item.html' with obje

Re: include template which extends something else

2015-10-28 Thread Carl Meyer
On 10/28/2015 10:25 AM, Sven Wanner wrote: > Yes, sorry I was confused... No I don't get what you mean. I think thats > exactly what I tried to do. > > I have kind of a main.html doing that: > > {% block my-wall %} > > > {% for obj in objects %}

Re: include template which extends something else

2015-10-28 Thread Sven Wanner
Yes, sorry I was confused... No I don't get what you mean. I think thats exactly what I tried to do. I have kind of a main.html doing that: {% block my-wall %} {% for obj in objects %} {% include 'wall_item.html'

Re: include template which extends something else

2015-10-28 Thread Carl Meyer
On 10/28/2015 10:11 AM, Sven Wanner wrote: > Ok, it's a pitty, but you're totally right. Using if in my template > should be also fine. Not of that elegance I planned ;) , but will > definitely work, too. I'm not sure what you mean. I thought I just explained how you can use `extends` in an inclu

Re: include template which extends something else

2015-10-28 Thread Sven Wanner
ndependent inheritance hierarchy, with blocks. > > So you can have an `item_base.html` that contains `{% block someblock > %}{% endblock %}`, and then define `item_foo.html` that `{% extends > "item_base.html" %}` and has `{% block someblock %}foo content{% > endblock %}

Re: include template which extends something else

2015-10-28 Thread Carl Meyer
with blocks. So you can have an `item_base.html` that contains `{% block someblock %}{% endblock %}`, and then define `item_foo.html` that `{% extends "item_base.html" %}` and has `{% block someblock %}foo content{% endblock %}`, and you can have a `main.html` that has `{% include "item

Re: include template which extends something else

2015-10-28 Thread Tim Graham
_template > html? > > Hope I achieved to explain the problem well enough... > > 2015-10-28 16:39 GMT+01:00 Tim Graham >: > >> I think that's a limitation described in the {% include %} docs: >> https://docs.djangoproject.com/en/1.8/ref/templates/builtins/

  1   2   3   4   5   >