Re: Merging results from two tables

2012-07-23 Thread Madhu
Hi! How should i get the details from B and some content of A using that foreign key? Thanks Madhu On Saturday, January 31, 2009 10:37:58 PM UTC+5:30, Daniel Roseman wrote: > > On Jan 31, 12:27 pm, Markus wrote: > > Hi > > > > just starting to use Django, am stuck with the following problem:

can't attach more info to User

2012-07-23 Thread heni yemun
Hi, When i used to add more info to User using the method described in the standard specification and the inheritance method i couldnot do it. Here is what it says: My addon model UserProfile is composed of char, integer, date fields. And when i create a user it says sth like 'column username no

comment app with quote, like, etc

2012-07-23 Thread subin
Hi, Is there django comment app with quote & like feature? I have searching and found django-comments-xtd, django-threaded-comments, and django-comment-apps. But none of them support 'like'. Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group

Re: How To Display Non-Modal Popup From Resulting Asynchronous Javascript Request

2012-07-23 Thread Tomas Neme
your error's got nothing to do with AJAX. As the very helpful error message you're getting, there's no URL that matches your requested path: > Request URL: > > http://127.0.0.1:8000/mediahelp/mediaHelpPopup.html > > Using the URLconf defined in streamingmedia.urls, Django tried these URL > patter

Re: Difficulties using generic views (Tutorial 4, Django 1.4)

2012-07-23 Thread Carlos Palol
I'm glad. Not very prone to randomness, actually. Make sure the web server is restarting after your changes, and that the browser cache is not lying to you. Also, if you are changing module (file) names, better delete the .pyc files. Cheers, Carlos Palol On 23 Jul 2012, at 16:11, Ri

How To Display Non-Modal Popup From Resulting Asynchronous Javascript Request

2012-07-23 Thread curious1
I have a django application already developed which I'm trying to use to experiment with asynchronous javascript without using any of the standard JQuery type libraries, in order to better learn and understand AJAX concepts. The application itself has been written using python 2.7.1 and djang

Re: Checking if a dynamicallygenerated dropdown has a selected item

2012-07-23 Thread Sithembewena Lloyd Dube
Thanks Daniel :) Was just poring over the Formsets documentation now ... looks like what I need. I will update this thread with the results later. On Mon, Jul 23, 2012 at 10:09 PM, Daniel Roseman wrote: > On Monday, 23 July 2012 21:05:54 UTC+1, Lloyd Dube wrote: >> >> Hi all, >> >> I am not us

Re: django-admin.py startproject mysite... this command does nothing for me

2012-07-23 Thread Ramiro Morales
On Mon, Jul 23, 2012 at 4:58 PM, boxxtcy wrote: > I tried without the .py, still doesn't do anything. django-admin.py lives > in my C:\Python27\Scripts just as it is supposed to. I don't really see > what the issue is :/ Don't rely on the association of .py files with the Python interpeter and

Re: Checking if a dynamicallygenerated dropdown has a selected item

2012-07-23 Thread Daniel Roseman
On Monday, 23 July 2012 21:05:54 UTC+1, Lloyd Dube wrote: > > Hi all, > > I am not using django forms for this. I did think along the lines of doing > the following: > - implement the Question form, override __init__ in the model to return > answers for that question, > - instantiate a form for e

Re: Checking if a dynamicallygenerated dropdown has a selected item

2012-07-23 Thread Sithembewena Lloyd Dube
Hi all, I am not using django forms for this. I did think along the lines of doing the following: - implement the Question form, override __init__ in the model to return answers for that question, - instantiate a form for each question, set model=whatever_model_in_ current_loop and append it to a

Re: Checking if a dynamicallygenerated dropdown has a selected item

2012-07-23 Thread Sithembewena Lloyd Dube
Hi all, I am not using django forms for this. I did think along the lines of doing the following: - implement the Question form, override __init__ in the model to return answers for that question, - instantiate a form for each question, set model=whatever_model_in_current_loop and append it to a l

Re: django-admin.py startproject mysite... this command does nothing for me

2012-07-23 Thread boxxtcy
I tried without the .py, still doesn't do anything. django-admin.py lives in my C:\Python27\Scripts just as it is supposed to. I don't really see what the issue is :/ On Monday, July 23, 2012 2:59:18 PM UTC-4, Joel Goldstick wrote: > > On Mon, Jul 23, 2012 at 12:38 PM, boxxtcy wrote: > > Wh

Re: How to install psycopg2 using Pip?

2012-07-23 Thread Mehrdad Majzoobi
Ok, I realized what the issue was. In the setup.cfg file, the pg_config path had to include the pg_config executable name as well: pg_config = /usr/pgsql-9.1/bin/pg_config On Monday, July 23, 2012 2:01:29 PM UTC-5, Mehrdad Majzoobi wrote: > > Guys, I have a similar problem but the difference is

Re: How to install psycopg2 using Pip?

2012-07-23 Thread Mehrdad Majzoobi
Guys, I have a similar problem but the difference is pg_config is actually in my PATH: $ which pg_config /usr/pgsql-9.1/bin/pg_config I get the following error when I try to pip install psychopg2 ### Error: pg_config executable not found. Please add the directory containing p

Re: django-admin.py startproject mysite... this command does nothing for me

2012-07-23 Thread Joel Goldstick
On Mon, Jul 23, 2012 at 12:38 PM, boxxtcy wrote: > When trying to follow this tutorial, I get stuck after django-admin.py > startproject mysite because no directory is created. I doubt the command is > even being executed, all it brings up is the code in a notepad++ window. I > have django insta

Re: Two identical pages but only one works

2012-07-23 Thread Javier Guerra Giraldez
On Mon, Jul 23, 2012 at 1:20 PM, twelve_o_clock wrote: > return render_to_response('micropost/micropost_list.html', > {'mposts',mposts}) is that copy/paste? check the dictionary syntax, it should be {'mposts':mposts} -- Javier -- You received this message because you are subscribed to t

Two identical pages but only one works

2012-07-23 Thread twelve_o_clock
I have a page that I want to list all users and another page which I want to use to list all microposts. The user page works fine but the micropost page does not work even though the two look like they are of an identical format. On the micropost page, I just get an empty table. Here is part

CSRF token missing or incorrect

2012-07-23 Thread twelve_o_clock
When I try to submit a form in my django project, I get an error saying, "CSRF token missing or incorrect," even though I put a "{% csrf_token %}" tag inside the form. Here is signup.html: Sign up {% csrf_token %} Name: E-mail address: Password: Here is a part of views.py:

Re: Checking if a dynamicallygenerated dropdown has a selected item

2012-07-23 Thread Thomas Orozco
Are you using django forms? Should be pretty straightforward once you have the input nicely formatted to just count the number of fields that have been filled in. Le 23 juil. 2012 19:01, "Babatunde Akinyanmi" a écrit : > Maybe I don't really understand the question but I think if you want > to c

Re: Checking if a dynamicallygenerated dropdown has a selected item

2012-07-23 Thread Babatunde Akinyanmi
Maybe I don't really understand the question but I think if you want to check if the user has answered 3 questions, check from the keys in request.GET or request.POST as the case may be. On 7/23/12, Sithembewena Lloyd Dube wrote: > Hi all, > > I have a dynamically generated dropdown in this fashi

Re: Can't access members in a template

2012-07-23 Thread twelve_o_clock
That worked. Thanks for the help. On Monday, July 23, 2012 9:50:07 AM UTC-7, Dmitry Zimnukhov wrote: > Note, that u1 is not a model instance, but a QuerySet object > To get a model you should call manager's "get" method rather than "filter" > replace: > u1 = User.objects.filter(id=u) > with:

django-admin.py startproject mysite... this command does nothing for me

2012-07-23 Thread boxxtcy
When trying to follow this tutorial, I get stuck after django-admin.py startproject mysite because no directory is created. I doubt the command is even being executed, all it brings up is the code in a notepad++ window. I have django in

Not able to run django-admin.py startproject on Windows 7

2012-07-23 Thread shm
Hi, I am trying to create a new project to work on. Have installed python and Django and tested they are working (Was able to get the version numbers for both from the shell). But, It doesn't let me run " django-admin.py startproject" it gives me this error. It looks like it doesn't recognis

Re: Can't access members in a template

2012-07-23 Thread Sithembewena Lloyd Dube
pardon, the closing 'for' tag would be {% endfor %} On Mon, Jul 23, 2012 at 6:53 PM, Sithembewena Lloyd Dube wrote: > ^^ as above ... > > try ... > > > {% for user in u %} > User ID{{user.id }} > User Name{{user.name }} > tr> > User E-mail{{user.email}} > Date/Time jo

Re: Can't access members in a template

2012-07-23 Thread Sithembewena Lloyd Dube
^^ as above ... try ... {% for user in u %} User ID{{user.id }} User Name{{user.name }} User E-mail{{user.email}} Date/Time joined{{user.date}} {% end %} On Mon, Jul 23, 2012 at 6:50 PM, Dmitry Zimnukhov wrote: > Note, that u1 is not a model instance, but a Query

Re: Can't access members in a template

2012-07-23 Thread Dmitry Zimnukhov
Note, that u1 is not a model instance, but a QuerySet object To get a model you should call manager's "get" method rather than "filter" replace: u1 = User.objects.filter(id=u) with: u1 = User.objects.get(id=u) 2012/7/23 twelve_o_clock : > I tried that and it still did not work. Also, {{u}} and {{i

Re: Can't access members in a template

2012-07-23 Thread twelve_o_clock
I tried that and it still did not work. Also, {{u}} and {{i}} without spaces works, but it doesn't work when I try to access the member of something like {{ u.name }}. On Monday, July 23, 2012 9:14:24 AM UTC-7, Kurtis wrote: > Try: {{ u.name }} (with spaces) > > > -- You received this messa

Checking if a dynamicallygenerated dropdown has a selected item

2012-07-23 Thread Sithembewena Lloyd Dube
Hi all, I have a dynamically generated dropdown in this fashion (when viewing source): a) Spend the majority of time indoors b) Value superior darkness and consider in-car activation c) Value indoor clarity over outdoor darkness

Re: Can't access members in a template

2012-07-23 Thread Kurtis Mullins
Try: {{ u.name }} (with spaces) On Mon, Jul 23, 2012 at 10:35 AM, twelve_o_clock wrote: > I am trying to access data in a template in django. I have a variable u > with members name, email, id, and date. However when I put {{u.name}} in > a template, it doesn't appear in the HTML file even thoug

Re: phpBB3 to DjangoBB migration...

2012-07-23 Thread jens
We improve the migration. Seems that the most work is done! The last thing to migrate is the topic subscriptions, but django can't handle the model. See: https://github.com/jedie/django-phpBB3/issues/5 On 20 Jul., 15:27, jens wrote: > Anyone who interest the migration from phpBB3 to DjangoBB s

Can't access members in a template

2012-07-23 Thread twelve_o_clock
I am trying to access data in a template in django. I have a variable u with members name, email, id, and date. However when I put {{u.name}} in a template, it doesn't appear in the HTML file even though just {{u}} appears just fine. For reference, here is the template: View user {{ u.id

Re: Image Cropping in template form

2012-07-23 Thread Nicolas Noé
Hi Patrick, Did you find any solution to this issue ? I'm facing exactly the same problem... The widget is imported and assigned to the field without any error, but on rendering it works like a basic textfield. The markup look like the field is initially rendered correctly in HTML, but then t

Re: Difficulties using generic views (Tutorial 4, Django 1.4)

2012-07-23 Thread Ricardo Cardoso
Oddly, when i started up the server this morning i could now see the polls correctly, while not having changed my code, by accessing http://127.0.0.1:8000/polls. Don't know if Django is prone to such randomness but am happy that it works now. Tested everything, added a view so that http://127.0

Re: Variable # of fields in a form

2012-07-23 Thread Alex Strickland
On 2012/07/23 02:29 PM, Alex Strickland wrote: Thank you Daniel. I have done this and see that it answers my question (that HTML output is pretty ugly!). In Bootstrap I have used an accordion so that the the categories are grouped: Internal x Evan x Joe External x Alex where x's

Re: Variable # of fields in a form

2012-07-23 Thread Alex Strickland
On 2012/07/20 01:37 PM, Daniel Roseman wrote: You don't want a variable number of fields, you just want a single MultipleChoiceField field using a CheckboxSelectMultiple widget. https://docs.djangoproject.com/en/1.4/ref/forms/fields/#multiplechoicefield https://docs.djangoproject.com/en/1.4/ref

Re: Handling millions of rows + large bulk processing (now 700+ mil rows)

2012-07-23 Thread Cal Leeming [Simplicity Media Ltd]
Hi Alex, Yup - video will be made available - although I may ask if anyone here with a Vimeo/Youtube Director account would mind uploading it instead.. Otherwise the video will need splitting :/ Cal On Mon, Jul 23, 2012 at 7:54 AM, Alex wrote: > Hello! > > Will you make the video available aft

Re: Difficulties using generic views (Tutorial 4, Django 1.4)

2012-07-23 Thread Carlos Palol
Let's see the whole error page. On Sunday, 22 July 2012 23:43:59 UTC+2, Ricardo Cardoso wrote: > > Thank you for your input guys. > > Sadly, i had already checked it Carlos and have my templates for polls > under: > /home/my_user/Webdev/Templates/polls > > In this case my template dir is set up

Re: Django TypeError

2012-07-23 Thread bruno desthuilliers
On Tuesday, July 17, 2012 8:00:39 AM UTC+2, sandy wrote: > > I want to have different views for my application for different types > of users. For this I have this code for my views.py file : > > def index1(request): > u = User.objects.all() > This has been solved. > if u.is