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

2017-03-04 Thread Tom Tanner
>How are you referring to the assets in the template? In `interactive/index.html`, in the `` tag, I have `` On Saturday, March 4, 2017 at 8:55:22 AM UTC-5, Daniel Roseman wrote: > > On Saturday, 4 March 2017 13:30:37 UTC, Tom Tanner wrote: >> >> In my `views.py`, I have one path render an html

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

2017-03-04 Thread Daniel Roseman
On Saturday, 4 March 2017 13:30:37 UTC, Tom Tanner wrote: > > In my `views.py`, I have one path render an html file: > > def interactive(request): > if request.session.get('interactiveID') == None: > t= get_template('blank-interactive.html') > else: > interactive_template=

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

2017-03-04 Thread Tom Tanner
In my `views.py`, I have one path render an html file: def interactive(request): if request.session.get('interactiveID') == None: t= get_template('blank-interactive.html') else: interactive_template= 'interactive-' + str(request.session['id']) + '/index.html' t=

Re: Django template language resolve url

2017-02-22 Thread chris rose
sorry i typed an s in there, here is that code amended > > -- 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

Re: Django template language resolve url

2017-02-22 Thread chris rose
hey xyron.. i replied to your other thread your namespace should actually just be links so the answer should be: -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an

Re: Django template language resolve url

2017-02-22 Thread Luvpreet Singh
more than 12 hours for a solution for my problem and > I'm kinda frustrated. > > I want to use a form and define the link using django template language in > a html-file: > > {% extends "base/header.html" %} > {% block content %} > > >Enter

Re: Error using url in django template language

2017-02-20 Thread chris rose
hey you tried: you app name is links rather than myapp, so try: -- 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

RE: Error using url in django template language

2017-02-16 Thread Matthew Pava
Subject: Error using url in django template language Hey there, I'm searching since more than 12 hours for a solution for my problem and I'm kinda frustrated. I want to use a form and define the action link using django template language in a html-file: {% extends "base/header.html" %

Re: Django template language resolve url

2017-02-16 Thread ludovic coues
gt; > I want to use a form and define the link using django template language in a > html-file: > > {% extends "base/header.html" %} > {% block content %} > > >Enter Youtube-Link > > > I get following error: > > Reverse for 'links.view

Error using url in django template language

2017-02-16 Thread xyron
Hey there, I'm searching since more than 12 hours for a solution for my problem and I'm kinda frustrated. I want to use a form and define the action link using django template language in a html-file: {% extends "base/header.html" %} {% block content %} Enter Youtube-Link

Django template language resolve url

2017-02-16 Thread xyron
Code hier eingeben... Hey there, I'm searching since more than 12 hours for a solution for my problem and I'm kinda frustrated. I want to use a form and define the link using django template language in a html-file: {% extends "base/header.html" %} {% block content %} Ent

Re: Accessing to objects of a dynamic way in django template

2016-12-05 Thread ludovic coues
You could write a custom filter to apply on the queryset. 2016-12-05 1:12 GMT+01:00 Bernardo Garcia : > I have the following class based view in which I perform to queryset: > > > class PatientDetail(LoginRequiredMixin, DetailView): > >model = PatientProfile > >

Accessing to objects of a dynamic way in django template

2016-12-04 Thread Bernardo Garcia
I have the following class based view in which I perform to queryset: class PatientDetail(LoginRequiredMixin, DetailView): model = PatientProfile template_name = 'patient_detail.html' context_object_name = 'patientdetail' def get_context_data(self, **kwargs):

Re: javascript variable to django template

2016-11-15 Thread GMail
Hi, As any other variable: var myAwesomeVar = {{ my_awesome_var }}; alert(myAwesomeVar); > On 15 Nov 2016, at 18:46, kml Awad <ka.ao...@gmail.com> wrote: > > Hi, > > How can I inject javacript object (variable ) in django template (html) ? > > Thank you

javascript variable to django template

2016-11-15 Thread kml Awad
Hi, How can I inject javacript object (variable ) in django template (html) ? Thank you for your help. regards. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, sen

Re: Show the output of python variable in django template

2016-11-11 Thread Marlysson Silva
to send my result in python in django template > -- 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

Show the output of python variable in django template

2016-11-11 Thread Dattatreya Sadhu
I am building a chat bot application. i have created a form in my html view and send a post request and in python i am able to capture it but i am not able to send my result in python in django template -- You received this message because you are subscribed to the Google Groups "D

Re: Unit testing in django for django template

2016-10-12 Thread ludovic coues
s/testing/tools/#testing-responses > > -James > > On Wed, Oct 12, 2016 at 12:17 PM, <codemaster...@gmail.com> wrote: >> >> How to Unit testing in django for django template >> >> please any one help me??? >> >> -- >> You received this

Re: Unit testing in django for django template

2016-10-12 Thread James Schneider
In general, you would request the page and inspect the rendered output. https://docs.djangoproject.com/en/1.10/topics/testing/tools/#testing-responses -James On Wed, Oct 12, 2016 at 12:17 PM, <codemaster...@gmail.com> wrote: > How to Unit testing in django for django template >

Unit testing in django for django template

2016-10-12 Thread codemaster472
How to Unit testing in django for django template please any one help 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

Re: Django template iterating through two dictionaries/variables

2016-08-30 Thread Aaron Weisberg
This is why i ask this group. Everyone helped out, but Nate's link pushed me in the right direction. Sometimes I don't even know what to ask stack overflow, but the google group always helps out. Thanks On Tuesday, August 30, 2016 at 11:28:37 AM UTC-5, Nate Granatir wrote: > > You could also

Re: Django template iterating through two dictionaries/variables

2016-08-30 Thread Nate Granatir
You could also just join the dicts before passing them to the template. It looks like it's relatively straightforward (scores is just a list that contains dicts of a 'Number' and a 'score', right?) Then you could turn scores into a dict, assuming Numbers are unique: scores_new =

Re: Django template iterating through two dictionaries/variables

2016-08-29 Thread Asad Jibran Ahmed
Unfortunately without knowing your project layout I can't show you exactly how to load the filters, but you should give this a read: https://docs.djangoproject.com/en/1.10/howto/custom-template-tags/. Your template should look like the example from Ludovic. Asad Jibran Ahmed

Re: Django template iterating through two dictionaries/variables

2016-08-29 Thread Aaron Weisberg
I hate to be thick but could you explain to me how to load the filters and also how the template should look with the updated function? Solving this will unlock a ton of functionality for my app. Thanks, Aaron On Aug 29, 2016 12:34 PM, "Asad Jibran Ahmed" wrote: > No

Re: Django template iterating through two dictionaries/variables

2016-08-29 Thread Asad Jibran Ahmed
No problem. The most probable reason why you're getting the invalid filter error is because you forgot to load the filters. Your explanation of the workflow is correct, with one small correction. The template will handoff the search for the correct *Score* to the filter function. Whatever the

Re: Django template iterating through two dictionaries/variables

2016-08-29 Thread Aaron Weisberg
Thanks Asad. Is that why I'm getting errors saying invalid filter name? Also I'm having a difficult time thinking my way through the workflow. I'm defining a new function that requires scores(my URL based dictionary) and person (my database dictionary). The function then asks to return the scores

Re: Django template iterating through two dictionaries/variables

2016-08-29 Thread Asad Jibran Ahmed
Since the example given by Ludovic uses the same variable names that are already present in your context, you won't need to change anything in the context dictionary. Just use {% load APP_NAME %} on top of the template file to load the filter and you should be good to go. On Monday, August

Re: Django template iterating through two dictionaries/variables

2016-08-29 Thread Asad Jibran Ahmed
No need to change the context, since the variable names the example here uses are the same as your existing context. It should work as long as you remember to {% load APPNAME %} your filters in the template first. ​ Asad Jibran Ahmed http://blog.asadjb.com On Mon, Aug 29,

Re: Django template iterating through two dictionaries/variables

2016-08-29 Thread Aaron Weisberg
Thanks ludovic, I'm trying to write that python code presently- would I have to also change the context? how would that look? Thanks On Fri, Aug 26, 2016 at 10:40 AM, ludovic coues wrote: > You could write a filter [1]. It would be used like {{ > scores|from_player:person

Re: Django template iterating through two dictionaries/variables

2016-08-26 Thread ludovic coues
You could write a filter [1]. It would be used like {{ scores|from_player:person }} and look like that: def from_player (scores, player): return scores[player.Number] You might want to adjust to your actual code, check that you got the right arguments and that kind of things. [1]

Django template iterating through two dictionaries/variables

2016-08-26 Thread Aaron Weisberg
I didn't really know how to label this question, but I think it's an interesting concept and I haven't seen a resolution anywhere else. I currently have two different dictionaries as context for a template: Enter code here...context ={ 'person':person,

Re: Using hashids in django template

2016-08-18 Thread Paul Aswa
Thanks for the shedding light on filters, really helpful. I should have thought about that! On Thursday, August 18, 2016 at 8:46:22 PM UTC+3, ludovic coues wrote: > > Filter are a way to apply a function to a value in a django template. > > The filter would look like that: > &

Re: Using hashids in django template

2016-08-18 Thread ludovic coues
Filter are a way to apply a function to a value in a django template. The filter would look like that: def hashid(value): return hashids.encode(value) and your template like that: {{ id|hashid }} I omitted some part that are in the doc, like making the filter available in your

Re: Using hashids in django template

2016-08-18 Thread Paul Aswa
Being a newbie to python and django, this seems to be giving me problems On Thursday, August 18, 2016 at 2:57:56 PM UTC+3, ludovic coues wrote: > > You might be looking for this > https://docs.djangoproject.com/en/1.10/howto/custom-template-tags/ > > 2016-08-18 12:57 GMT+02:00 Paul Aswa

Re: Using hashids in django template

2016-08-18 Thread ludovic coues
You might be looking for this https://docs.djangoproject.com/en/1.10/howto/custom-template-tags/ 2016-08-18 12:57 GMT+02:00 Paul Aswa : > Is there means of encoding an id using hashids in django templates? > > -- > You received this message because you are subscribed to the

Using hashids in django template

2016-08-18 Thread Paul Aswa
Is there means of encoding an id using hashids in django templates? -- 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

Template Django - Can't display model field in Django Template

2016-06-08 Thread Yan L'kabousse
Hello everyone :) I want to display some datas on a wtih Django Template. I have menus (for eat in reaturant) But I can't display the menuItems in the But it displays other parts of the table. Here is my stackoverflow topic if you want more details (model for example) : http

Re: Why is my Django template not displaying?

2016-06-03 Thread Luis Zárate
Use plays as a list in form. You are passing context_list as context object so all variable inside context_list are available in template but not context_list. Other option is return render(request,'live.html', {"context_list": context_list}) El viernes, 3 de junio de 2016, Dave N

Re: Why is my Django template not displaying?

2016-06-03 Thread Dave N
That absolutely did it James - I thought I was accessing the instance, but what I needed was to access the template context contents of the instance. Also, great tip with the django debug toolbar - I've had it installed, but didn't know how much it actually shows! On Friday, June 3, 2016 at

Re: Why is my Django template not displaying?

2016-06-03 Thread James Schneider
On Jun 3, 2016 8:58 AM, "Dave N" wrote: > > Assuming my model contains data, I have myapp/views.py: > > from django.template import RequestContext > from django.shortcuts import render > from .models import History > import datetime > > def live_view(request): >

Why is my Django template not displaying?

2016-06-03 Thread Dave N
Assuming my model contains data, I have myapp/views.py: from django.template import RequestContextfrom django.shortcuts import renderfrom .models import Historyimport datetime def live_view(request): context = RequestContext(request) plays_list =

django template {% url %}

2016-04-04 Thread 颜刚
i have this code in my template: {% for i in var %} {% for action in actions %} {{ action.name_short }} {% endfor %} {% endfor %} the value of action.url_alias is 'user-edit' i.id host 'account' ,that's what i want from table,i use django-hosts in my project,the error is that: Reverse

Re: django template {% url %}

2016-04-04 Thread 颜刚
yes,you are right,i have noticed that,but now i have a new error: i have this code in my template: {% for action in actions %} {{ action.name_short }} {% endfor %} the value of action.url_alias is 'user-edit' i.id host 'account' ,that's what i want value from table,i use django-hosts in

Re: django template {% url %}

2016-04-03 Thread Larry Martell
On Sun, Apr 3, 2016 at 11:50 AM, 颜刚 wrote: > > > i have this code in my template: > > {% for action in actions %} > > {{ action.name_short }} > > {% endfor %} > > but that's error: > > Exception Type: TemplateSyntaxError > Exception Value: > Could not parse the remainder:

django template {% url %}

2016-04-03 Thread 颜刚
i have this code in my template: {% for action in actions %} {{ action.name_short }} {% endfor %} but that's error: Exception Type: TemplateSyntaxError Exception Value: Could not parse the remainder: '{{' from '{{' i want to use var in {% url {{}} %},can i? anyone can help me ? --

Re: Display the form errors in the django template with ajax post

2015-12-29 Thread Luis Zárate
I do it like this create a form template (for abbreviation I will use {{form}} form_template.html > {{form}} > in include form_template.html public_contact.html > > > {% include 'form_template.html' %} > > and in the ajax response from django.template.loader import render_to_string

Display the form errors in the django template with ajax post

2015-12-24 Thread Robin Lery
I have a contact form through which users would be able to contact me. I am using django with ajax, and it works fine *if* there's no error. I would like to show the errors if there's any like it displays above the input fields and not just the errors, but both the input and the errors. It does

Re: jquery and django template

2015-11-05 Thread Collin Anderson
Hi, Are you trying to show the user what filters are being applied to the data, or are you trying to filter the data based on a user selection? Collin On Monday, November 2, 2015 at 2:51:36 AM UTC+1, varun naganathan wrote: > > I basically have the database entries in the namespace of my

jquery and django template

2015-11-01 Thread varun naganathan
I basically have the database entries in the namespace of my template.I basically need to get the filter i want to apply on the databse entry using data available from user selection(using jquery).Any suggestions on how i can achieve this? -- You received this message because you are

Re: Django template coverage

2015-09-24 Thread Ned Batchelder
This plugin won't work with Jinja2 templates, but another coverage.py plugin could be written for Jinja2, sure. Get in touch if you want to get started on it. --Ned. On 9/20/15 9:45 AM, Avraham Serour wrote: would this work with jinja2 templates also? On Tue, Aug 25, 2015 at 3:45 AM, Ned

Re: Django template coverage

2015-09-20 Thread Avraham Serour
would this work with jinja2 templates also? On Tue, Aug 25, 2015 at 3:45 AM, Ned Batchelder wrote: > Hi all, > > If you've been using coverage measurement on your Django code, you might > be interested in a new development: now you can also measure the coverage > of your

Django template coverage

2015-08-24 Thread Ned Batchelder
Hi all, If you've been using coverage measurement on your Django code, you might be interested in a new development: now you can also measure the coverage of your templates. Coverage.py 4.0 (currently in the last stages of beta) supports plugins. Django-coverage-plugin implements measurement

Re: Django template not displaying

2015-03-12 Thread john
OK the view.py functions are the way Django responds to a browser request. IOW the browser asks for a page to display and Django checks the URL (in the urls.py). In the urls.py you have to have an entry something like url(r'signup/$', 'signup.views.home', name ='signup') and then Django

Re: Django template not displaying

2015-03-12 Thread sourav mohanty
from 'My templates just wouldn't load or show' , i mean that my base.html loads perfectly but signup.html doesn't show up. On Friday, March 13, 2015 at 12:20:26 AM UTC+5:30, sourav mohanty wrote: > > i have revised the views.py : > > from django.shortcuts import render, render_to_response,

Re: Django template not displaying

2015-03-12 Thread sourav mohanty
I thank you for your reply and time.. But please help me.. On Thursday, March 12, 2015 at 6:50:23 PM UTC+5:30, John Fabiani wrote: > > You have two 'home' functions in views.py. > You have an indent on the first line of the urls.py (could be the paste) > You did not provide the forms.py > > Johnf

Re: Django template not displaying

2015-03-12 Thread sourav mohanty
i have revised the views.py : from django.shortcuts import render, render_to_response, RequestContext # from .forms import SignUpForm # Create your views here. from django.template import Context, Template def home(request): # form = SignUpForm(request.POST or None) # if

Re: Django template not displaying

2015-03-12 Thread sourav mohanty
i have changed the views.py: from django.shortcuts import render, render_to_response, RequestContext # from .forms import SignUpForm # Create your views here. from django.template import Context, Template def home(request): # form = SignUpForm(request.POST or None) # if

Re: Django template not displaying

2015-03-12 Thread James Schneider
You also have two different URL's named 'home', which will lead to a bad time. Make sure that those are unique. >From what I can tell, none of your views render/reference 'signup.html', so I would never expect that template to be rendered. Configure a fields attribute on your form to get rid of

Re: Django template not displaying

2015-03-12 Thread john
You have two 'home' functions in views.py. You have an indent on the first line of the urls.py (could be the paste) You did not provide the forms.py Johnf On 03/12/2015 01:31 AM, sourav mohanty wrote: I dont know why but i'm facing a strange problem.. My templates just wouldn't load or show.

Django template not displaying

2015-03-12 Thread sourav mohanty
I dont know why but i'm facing a strange problem.. My templates just wouldn't load or show. can you please help me out. I'm using Django version 1.7 It shows the following warning as well in the cmd : C:\Users\Om Computers\PyDisco\venv\ddisco\signups\forms.py:5: RemovedInDjango18W arning:

Re: How not to explicly write very very big json object when rendering page in django template ?

2015-01-15 Thread Matlau Issu
OK. AJAX is the solution. -- 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

Re: django template auto format tool?

2014-12-17 Thread Abraham Varricatt
mber 13, 2014 9:53:56 PM UTC-5, Abraham Varricatt wrote: >> >> Hello, >> >> Is there any command-line based tool which would let one auto-format >> Django template files? Ideally, the tool should also be used to format >> HTML, CSS and .JS files too. >> >> I'

Re: django template auto format tool?

2014-12-17 Thread Collin Anderson
Hi Abraham, If you made a took, I'd use it. :) Collin On Saturday, December 13, 2014 9:53:56 PM UTC-5, Abraham Varricatt wrote: > > Hello, > > Is there any command-line based tool which would let one auto-format > Django template files? Ideally, the tool should also be used to

Re: django template auto format tool?

2014-12-15 Thread Abraham Varricatt
gt; >> Is there any command-line based tool which would let one auto-format >> Django template files? Ideally, the tool should also be used to format >> HTML, CSS and .JS files too. >> >> I've recently inherited a bad-looking code base and want to clean it up. >

Re: django template auto format tool?

2014-12-14 Thread Mario Gudelj
PyCharm ide does a great job for all those file types. On 14/12/2014 2:00 pm, "Abraham Varricatt" <abraham.varric...@googlemail.com> wrote: > Hello, > > Is there any command-line based tool which would let one auto-format > Django template files? Ideally, the tool s

Re: django template auto format tool?

2014-12-14 Thread Jose Regalado
my_python_file.py Now, for python works fine, but for html, I not yet test. 2014-12-13 22:23 GMT-04:30 Abraham Varricatt <abraham.varric...@googlemail.com>: > Hello, > > Is there any command-line based tool which would let one auto-format Django > template files? Ideally, th

django template auto format tool?

2014-12-13 Thread Abraham Varricatt
Hello, Is there any command-line based tool which would let one auto-format Django template files? Ideally, the tool should also be used to format HTML, CSS and .JS files too. I've recently inherited a bad-looking code base and want to clean it up. Have heard of the PEP8 autoformatter

Re: How not to explicly write very very big json object when rendering page in django template ?

2014-11-03 Thread Matlau Issu
Thank you for your help. I need all the data. Le lundi 3 novembre 2014 00:41:43 UTC+1, Vijay Khemlani a écrit : > > Do you really need all the data in that dictionary for the page? You could > request the necessary parts by AJAX after the page has loaded. > > On Sun, Nov 2, 2014 at 6:59 PM,

Re: How not to explicly write very very big json object when rendering page in django template ?

2014-11-02 Thread Vijay Khemlani
Do you really need all the data in that dictionary for the page? You could request the necessary parts by AJAX after the page has loaded. On Sun, Nov 2, 2014 at 6:59 PM, Matlau Issu wrote: > I mean, in my views.py i do : > return render(request, 'myapp/detail.html', {

How not to explicly write very very big json object when rendering page in django template ?

2014-11-02 Thread Matlau Issu
I mean, in my views.py i do : return render(request, 'myapp/detail.html', { pydic_jsonized : json.dumps(python_dict) } ) then in my html, i get pydic_jsonized with var json = {{ pydic_jsonized }}; But pydic_jsonized is just furiously big, and is written as harded coded data in the

Re: Open Django template in dialog box (not in window)

2014-09-29 Thread Collin Anderson
I have a jsfiddle working with my code. http://jsfiddle.net/mafos5ox/1/ Do any errors show up in the developer tools console? -- 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,

Re: Open Django template in dialog box (not in window)

2014-09-26 Thread Kamal Kaur
On Fri, Sep 26, 2014 at 10:40 PM, Collin Anderson wrote: > Ahh yup. I should really test my examples :) Indeed! > The SyntaxError will make the > even handler not register. Does removing the extra parentheses fix it? No. In fact, I got the content in next page only after

Re: Open Django template in dialog box (not in window)

2014-09-26 Thread Collin Anderson
Ahh yup. I should really test my examples :) The SyntaxError will make the even handler not register. Does removing the extra parentheses fix it? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: Open Django template in dialog box (not in window)

2014-09-26 Thread Kamal Kaur
On Fri, Sep 26, 2014 at 1:49 AM, Collin Anderson wrote: > $("#popup").dialog({modal: true}).dialog('open')).load(this.href) > > I've updated my blog post. This is opening the template on next page :/ And you need to edit the post: $("#popup").dialog({modal:

Re: Open Django template in dialog box (not in window)

2014-09-25 Thread Collin Anderson
I figured it out. html() isn't chainable. It needs to be one of these: $.get(this.href, function(data){ $("#popup").html(data) $("#popup").dialog({modal: true}).dialog('open') }) or $.get(this.href, function(data){ $("#popup").dialog({modal: true}).dialog('open').html(data) }) or, after I

Re: Open Django template in dialog box (not in window)

2014-09-24 Thread Fred Stluka
Excellent! Thanks! Now I can just point my team at it, instead of writing out the details myself. --Fred Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/ Bristle Software, Inc -- http://bristle.com --

Re: Open Django template in dialog box (not in window)

2014-09-24 Thread Collin Anderson
Here's the blog post, by popular demand :) http://collincode.wordpress.com/2014/09/24/jquery-ui-popup-with-django-backend/ -- 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

Re: Open Django template in dialog box (not in window)

2014-09-24 Thread Collin Anderson
I think you only included the "jquery" script code. You need to include both jquery and jqueryui. I'll work on the blog post. -- 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,

Re: Open Django template in dialog box (not in window)

2014-09-24 Thread Kamal Kaur
On Thu, Sep 25, 2014 at 12:10 AM, Jan Eskilsson wrote: > "Uncaught TypeError: Undef is not a function" error in the Java Script, dont > understand why really ? Yes, I get the same in Chromium (y) ​,​ but only after reopening, as I mentioned in

Re: Open Django template in dialog box (not in window)

2014-09-24 Thread Kamal Kaur
On Tue, Sep 23, 2014 at 11:17 PM, Fred Stluka wrote: > > Excellent sample. Thanks! That's a nice standalone summary > of how to do a popup dialog via jQuery and Ajax. Worth posting > to a tips page or blog if you have such, so other people can > Google it. @ Collin, please

Re: Open Django template in dialog box (not in window)

2014-09-24 Thread Jan Eskilsson
Sorry for budging in but for me this works $("#dialog-form").html(data) rather than load(data) but I get a "Uncaught TypeError: Undef is not a function" error in the Java Script, dont understand why really ? Thank You in Advance Jan Eskilsson 2014-09-24 22:05 GMT+04:00 Collin Anderson

Re: Open Django template in dialog box (not in window)

2014-09-24 Thread Collin Anderson
Interesting. Maybe it should be $("#dialog-form").html(data) rather than load(data) -- 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

Re: Open Django template in dialog box (not in window)

2014-09-24 Thread Kamal Kaur
On Tue, Sep 23, 2014 at 6:14 PM, Collin Anderson wrote: > # popupadvance.html > Here's the worker object: {{ worker }} > src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js"> > > Advance > What I see is that I need to write the contents to be shown,

Re: Open Django template in dialog box (not in window)

2014-09-24 Thread Kamal Kaur
On Wed, Sep 24, 2014 at 8:01 PM, Collin Anderson wrote: > Hmm... it seems to be trying to parse your html as javascript. Try using > adding to your $.ajax(): > > dataType: 'text', Nothing happened. -- Kamaljeet Kaur kamalkaur188.wordpress.com -- You received this

Re: Open Django template in dialog box (not in window)

2014-09-24 Thread Collin Anderson
Hmm... it seems to be trying to parse your html as javascript. Try using adding to your $.ajax(): dataType: 'text', -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an

Re: Open Django template in dialog box (not in window)

2014-09-24 Thread Kamal Kaur
On Tue, Sep 23, 2014 at 11:17 PM, Fred Stluka wrote: > Kamal, does this fill in the gaps for you? If not, let us know. I've used this example in my app and getting this, in Firefox console, on clicking the link: http://pastie.org/9590027 Here is what I get as output:

Re: Can not include jquery in django template

2014-09-23 Thread Collin Anderson
You need -- 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

Re: Can not include jquery in django template

2014-09-23 Thread Fred Stluka
Change it to: --Fred Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/ Bristle Software, Inc -- http://bristle.com -- Glad to be of service! Open Source: Without walls and fences, we need no

Can not include jquery in django template

When I try to include jQuery to my template index.html, I get an blank page. Html source code is loading but I get just white page -- 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

Re: Open Django template in dialog box (not in window)

Collin, Excellent sample. Thanks! That's a nice standalone summary of how to do a popup dialog via jQuery and Ajax. Worth posting to a tips page or blog if you have such, so other people can Google it. Kamal, does this fill in the gaps for you? If not, let us know. --Fred

Re: Open Django template in dialog box (not in window)

# popupadvance.html Here's the worker object: {{ worker }} # views.py def popupadvance(request): worker = Worker.objects.get(id=request.GET.get('worker_id') return render(request, 'popupadvance.html', {'worker': worker}) # urls.py from . import views urlpatterns = [

Re: Open Django template in dialog box (not in window)

On Mon, Sep 22, 2014 at 9:14 PM, Collin Anderson wrote: > What happens when you try? I'm not getting how to tell AJAX to go to a view and load the data that it returns as the template, (in dialog). It's just not done. Feeling too dumb to use it. And doesn't work when I send

Re: Open Django template in dialog box (not in window)

s or Gates. On 9/21/14 5:16 AM, Kamal Kaur wrote: I'm trying to open a Django template using JS as a popup. Actually I've done this. But it opens a separate window but I want a clean dialog box or simply a division instead of that window. Using window.o

Re: Open Django template in dialog box (not in window)

> > I've tried using AJAX, like told in the link below but yet unable to do: > > http://stackoverflow.com/questions/19267531/how-to-open-jquery-ui-dialog-with-ajax-request > What happens when you try? -- You received this message because you are subscribed to the Google Groups "Django

Open Django template in dialog box (not in window)

I'm trying to open a Django template using JS as a popup. Actually I've done this. But it opens a separate window but I want a clean dialog box or simply a division instead of that window. Using window.open method, clicking on the "Advance", "popitup" function runs. H

Re: Newbie Stuck on Django Tutorial 3 - Django Template system

i had the same problem by just copying the text on the web, pasting on textedit, and saving it into html. when i open html by Xcode, you will see extra lines, more than the text on the web. simply re-edit html by Xcode, the problem is solved. -- You received this message because you are

Re: Django Template Dir Question

On Wed, Jul 16, 2014 at 9:37 PM, G Z wrote: > My project structure goes > > holon > > -holon > -settings.py > -etc > > -portal -App name > -static > css / images > -templates >-main site template files >

Re: django template

Thanks On Wednesday, July 16, 2014 3:12:51 PM UTC+1, Andréas Kühne wrote: > > Hi, > > Sure, but I won't always be able to answer :-) > > Regards, > > Andréas > > > 2014-07-16 13:49 GMT+02:00 ngangsia akumbo >: > >> Thanks bro for this inside , can i always contact u

Re: django template

Thanks On Wednesday, July 16, 2014 3:12:51 PM UTC+1, Andréas Kühne wrote: > > Hi, > > Sure, but I won't always be able to answer :-) > > Regards, > > Andréas > > > 2014-07-16 13:49 GMT+02:00 ngangsia akumbo >: > >> Thanks bro for this inside , can i always contact u

Django Template Dir Question

My project structure goes *holon* * -holon* -settings.py -etc * -portal** -App name* * -static* css / images *-templates* -main site template files views.py urls.py etc * -templates* base.html

<    1   2   3   4   5   6   >