Re: Help with many-to-many field update

2011-11-24 Thread Leslie Maclachlan
Hi Mario, Thanks so much - I updated my view as below and it is now working as expected! Regards, Leslie if form.is_valid(): new_item = form.save(commit=False) new_item.client = orderClient new_item.orderdate = datetime.now() new_item.orderIP =

Re: Delete a Field...

2011-11-24 Thread Nolhian
Hello, I'm not familiar with ManyToMany relationships since I use Django with mongodb and this doesn't exist like so. But I'll give it a shot : > For example: "foo", "pepe1", "pepe2" are users of the project. I > delete returns "foo" > I try in every way like this: >

How to add middle ware Selecting the current time zone

2011-11-24 Thread Ganesh Kumar
How to add Middleware to my code. I cant import from django.utils import timezone please guide me. How to import timezone. I already installed pytz. any one help me. any clues. Here's an example that stores the current timezone in the session. (It skips error handling entirely for the sake of

Re: Basic installation

2011-11-24 Thread Timothy Makobu
- Install setup tools http://pypi.python.org/pypi/setuptools/0.6c11 - Go to the command line (cmd.exe) and type - easy_install django - easy_install ipython (not needed by django, but very useful, as you will see when you come to running "python manage.py shell" Then read

Re: filesystem path in settings.py

2011-11-24 Thread Timothy Makobu
And this too http://www.djangobook.com/en/2.0/ On Fri, Nov 25, 2011 at 7:41 AM, Timothy Makobu wrote: > Hi, > > Please read this whole thing > https://docs.djangoproject.com/en/dev/howto/static-files/ > > > On Fri, Nov 25, 2011 at 6:28 AM, TANYA

Re: filesystem path in settings.py

2011-11-24 Thread Timothy Makobu
Hi, Please read this whole thing https://docs.djangoproject.com/en/dev/howto/static-files/ On Fri, Nov 25, 2011 at 6:28 AM, TANYA wrote: > # Absolute filesystem path to the directory that will hold user-uploaded > files. > # Example: "/home/media/media.lawrence.com/media/"

filesystem path in settings.py

2011-11-24 Thread TANYA
# Absolute filesystem path to the directory that will hold user-uploaded files. # Example: "/home/media/media.lawrence.com/media/" MEDIA_ROOT = '' I want to upload css files and images so must I put them in /home/media or /home/my/media/path/ ? Should the filesystem path in settings.py be changed

Re: Reverse and variables in template

2011-11-24 Thread youpsla
Thnaks a lots, it works. Youpsla -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/ZATE6UT7dWwJ. To post to this group, send email to

Re: Reverse and variables in template

2011-11-24 Thread Ivo Brodien
Don't use brackets around the variables. On Nov 25, 2011, at 1:48, youpsla wrote: > Hello, > > The following line in my template return an error: > Modifier > > Error is: > Could not parse the remainder: '{{' from '{{' > > If i use (has view in the doc): > Modifier > it

Re: Installation of Django

2011-11-24 Thread JJ Zolper
JoeLinux, I read on the Django site that versions 2.3 to 2.6 where the appropiate versions of Python for the Django code. That's what I meant by agree. Does it work fine with 2.7 Python? JJ On Thu, Nov 24, 2011 at 11:57 AM, Daniel Roseman wrote: > On Thursday, 24

Reverse and variables in template

2011-11-24 Thread youpsla
Hello, The following line in my template return an error: Modifier Error is: Could not parse the remainder: '{{' from '{{' If i use (has view in the doc): Modifier it works fine. Then is the syntax {% url url_name {{model.field}} %} allowed ? Somebody has an idea ? Thanks for your

Re: Basic installation

2011-11-24 Thread ek_wals
On Nov 24, 3:02 pm, ek_wals wrote: > I'm at a loss as to installing Django - and I have spent the day > reading the documentation, the FAQ etc. > I understand that I should download django, unzip and un-tar, and then > run setup.py in the resulting directory. When I do

Re: Help with many-to-many field update

2011-11-24 Thread Mario Gudelj
Hey Leslie, Try add() method like in this answer on SO http://stackoverflow.com/questions/1226290/django-manytomany-relation-add-error Cheers, On 25 November 2011 00:43, Nichehosters wrote: > Hi, > I am relatively new to Django, and am trying to update a many-to-many >

Basic installation

2011-11-24 Thread ek_wals
I'm at a loss as to installing Django - and I have spent the day reading the documentation, the FAQ etc. I understand that I should download django, unzip and un-tar, and then run setup.py in the resulting directory. When I do this, I get a bunch of stuff in that directory, and nothing in my

Re: Automatic Submit

2011-11-24 Thread Antoni Aloy
2011/11/24 jose osuna perez : > I get that it was not necessary to press the button "Save" > for the sbmit. > > value = "Save" /> > This is not a Django related question, it's more a javascript one. You can use jQuery with jQuery Forms http://jquery.malsup.com/form/

Re: Upload a file

2011-11-24 Thread Antoni Aloy
2011/11/24 jose osuna perez : > My last question is whether anyone can tell me how to upload files > of any kind, not just image. > I've got the image, changing the picture of a user (in > my program) > but do not know how to upload files ... > Thanks in advance.

Automatic Submit

2011-11-24 Thread jose osuna perez
I get that it was not necessary to press the button "Save" for the sbmit. Do so without having to press the button(save or enter), that when you pass this sequence is executed automatically. Thanks -- You received this message because you are subscribed to the Google Groups "Django users"

Django 1.4 (dev) doesn't redirect to i18n url when debug is false

2011-11-24 Thread Jesus Rodriguez
Hello, I have an app using Django 1.4 dev. Im using i18n_patterns and well, it works perfectly. If im on a spanish session and I go to: /foo/ It redirects me to: /es/foo/ so far so good. But when I disable DEBUG, it doesn't work. If you go to: /foo/ it just redirect you to 500.html.

Upload a file

2011-11-24 Thread jose osuna perez
My last question is whether anyone can tell me how to upload files of any kind, not just image. I've got the image, changing the picture of a user (in my program) but do not know how to upload files ... Thanks in advance. -- You received this message because you are subscribed to the Google

Delete a Field...

2011-11-24 Thread jose osuna perez
Hello, I have a question that I have not been resolved, well three, took and a few days researching the subject, but this being impossible I would appreciate your help, as they are the last 3 points I have left to complete a project: I have the class: class Proyectos(models.Model):

Re: Named URLs Error

2011-11-24 Thread eeyore
Here is the traceback: http://pastebin.com/AXrfkAiW Matt On Nov 24, 12:07 pm, Tom Evans wrote: > On Thu, Nov 24, 2011 at 4:58 PM, eeyore wrote: > > > Traceback: > > >http://pastebin.com/9nLp4uP5 > > >> Confused, how does creating a new app and

Re: how to uninstall the django version

2011-11-24 Thread TANYA
I installed django and python in a different directory but it is still using /usr/local/bin and not python 2.7 and gives path error. Should I delete the python2.6 version for it to work with 2.7? On Tue, Nov 22, 2011 at 4:32 PM, Andre Terra wrote: > Ideally, after

Re: Named URLs Error

2011-11-24 Thread Tom Evans
On Thu, Nov 24, 2011 at 4:58 PM, eeyore wrote: > > Traceback: > > http://pastebin.com/9nLp4uP5 > >> Confused, how does creating a new app and importing urls.py from that >> test the validity of the urls.py in your current app? > > I did this to make sure no other app was

Re: converting to a template

2011-11-24 Thread Tom Evans
On Thu, Nov 24, 2011 at 4:40 PM, marjenni wrote: > > I have a python script in which I am building up an html page, and > then making a call to HttpResponse(html) to show the page. > > > Now I want to start to using templates, but this is not as easy as I > hoped

Re: Installation of Django

2011-11-24 Thread Daniel Roseman
On Thursday, 24 November 2011 16:52:00 UTC, JJ Zolper wrote: > > Tom, > > 7zip works great. I am able to unzip the .tgz file and I have my .tar > file. Now it is on to installation of it. > > .tar is stil an archive. You need to extract that as well - 7zip should be able to do the job. -- DR.

Re: Named URLs Error

2011-11-24 Thread eeyore
Traceback: http://pastebin.com/9nLp4uP5 > Confused, how does creating a new app and importing urls.py from that > test the validity of the urls.py in your current app? I did this to make sure no other app was causing errors. Without starting a new app(!), can you import > from

Re: Installation of Django

2011-11-24 Thread Ivo Brodien
> windows users have extracted your command will look like this: ... > to execute the .tar file. as tom mentioned, you have to use 7zip two times. the tar file is another archive (like .zip, .gz ) which you have to decompress and then you have the django directory and you can go on with

Re: Installation of Django

2011-11-24 Thread Daniel Roseman
On Thursday, 24 November 2011 16:55:06 UTC, JJ Zolper wrote: > > JoeLinux, > > Oh interesting. It seems the 64 bit version is sort of unclear. Any > help there? > > Would I be able to install my Python is well with a smaller command? I > am back at ground zero because I had to adjust the Python

Re: Installation of Django

2011-11-24 Thread Tom Evans
On Thu, Nov 24, 2011 at 4:52 PM, JJ Zolper wrote: > Tom, > > 7zip works great. I am able to unzip the .tgz file and I have my .tar > file. Now it is on to installation of it. > OK, you're still not getting it. You haven't extracted anything, you've gunzipped it. You now must

Re: Installation of Django

2011-11-24 Thread JJ Zolper
JoeLinux, Oh interesting. It seems the 64 bit version is sort of unclear. Any help there? Would I be able to install my Python is well with a smaller command? I am back at ground zero because I had to adjust the Python version back to 2.5 so Django would agree. I am interested just not sure how

Re: Installation of Django

2011-11-24 Thread JJ Zolper
Tom, 7zip works great. I am able to unzip the .tgz file and I have my .tar file. Now it is on to installation of it. Okay I have worked with UNIX before so I have some knowledge. I am studying to be a Computer Engineer at VT and have had some experience. My intuition tells me that if I even

Re: Named URLs Error

2011-11-24 Thread Tom Evans
On Thu, Nov 24, 2011 at 3:43 PM, eeyore wrote: > Tom, > > 1) The 'product' directory is not a module itself - it has no > __init__.py > > The 'product' directory has __init.__.py > > 2) You have two modules called 'product', and it is attempting to > import urls from the

converting to a template

2011-11-24 Thread marjenni
I have a python script in which I am building up an html page, and then making a call to HttpResponse(html) to show the page. Now I want to start to using templates, but this is not as easy as I hoped because my html contains a table with a lot of information, and I don't know how to make

Re: Installation of Django

2011-11-24 Thread Joey Espinosa
If you install the "setuptools" package (http://goo.gl/UjFh), then all you have to do to install Django (or any other Python library) is this: easy_install django And it will handle the rest. Just a suggestion. -- Joey "JoeLinux" Espinosa Software Developer http://about.me/joelinux On Nov 24,

Re: Using DSE when a model contains a manytomany field

2011-11-24 Thread Fabio Natali
On 11/24/2011 03:17 PM, Fabio Natali wrote: Hi everybody. I want to insert data into my Django db as I read from a CSV file. Everything was fine with a first model of mine. ## fields = ("name", "price") for (counter, row) in

Re: google always finds development version first

2011-11-24 Thread badlearner
People behind Django have no control over that. So your question (no offense) makes little sense here. :) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from

Re: Named URLs Error

2011-11-24 Thread eeyore
Tom, 1) The 'product' directory is not a module itself - it has no __init__.py The 'product' directory has __init.__.py 2) You have two modules called 'product', and it is attempting to import urls from the 'wrong one'. I created a new app with only one module to test it. "from product.urls

Re: Installation of Django

2011-11-24 Thread Tom Evans
On Thu, Nov 24, 2011 at 5:00 AM, JJ Zolper wrote: > Hello, > > I am new to Django! I was able to download and install: Python 2.7.2 > x86 64 on my Windows 7 64 bit machine. I think that is all that I will > need to execute the command line? > > I installed Python to C:/Python27

google always finds development version first

2011-11-24 Thread Ivo Brodien
Hi, although I know i should bookmark things, but often I find myself googling for some django docs and google always shows the development version. Wouldn’t it be more useful, if the docs of the latest release would be shown first? I understand it might be googles algorithms of showing the

Re: Seeking example of django.contrib.staticfiles usage

2011-11-24 Thread Ivo Brodien
> 3) Have django.contrib.staticfiles to serve static content (perhaps > non-optimally) from the Django runtime. this is just for developing purposes. 1) 2) are the ways to go. > Is there a simple example of #3 (the only one that lets me package up > a complete "app")? > > I've read: >

Re: com_error

2011-11-24 Thread Virginia
I forgot to mention that Microsoft office is not install on the server. Is it a problem? Regard, V.B. On 24 nov, 09:58, Phanounou wrote: > Good day everyone, > > I am trying to create/edit and close an excel file. Everything went fine on > my developpement machine.

Re: getting errors in http://www.ftdichip.com/Drivers/D2XX/D2XXSample/D2XXSample.zip on android 2.3.3

2011-11-24 Thread Tom Evans
Django != Android. Stop posting Android questions on this list please. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to

getting errors in http://www.ftdichip.com/Drivers/D2XX/D2XXSample/D2XXSample.zip on android 2.3.3

2011-11-24 Thread srinivasan shanmugam
Hi I am getting the below errors for the code which i have attched in the below link, am not able to resolve the it when i was debugging in the android sdk could ne body pls help me code link: http://www.ftdichip.com/Drivers/D2XX/D2XXSample/D2XXSample.zip Errors: 11-24 10:40:54.462:

Seeking example of django.contrib.staticfiles usage

2011-11-24 Thread brycenesbitt
I'm evaluating frameworks, writing the same app different ways. I've run smack into Django's static file handling. I understand that with Django my basic options for static files are: 1) Static files on a separate web server 2) Configure apache to send some content to Django, serve some

Loading django templates/static files from pyrcc4 generated resource file

2011-11-24 Thread bb6xt
Hi folks, I am writing a PyQt frontend to a django application. Before calling app.exec_() on the qt app i first start up the django development server on a thread and later on access my views through a QtWebView. Since I use the pyrcc4 generated resource file for my qt app I just think it

Help with many-to-many field update

2011-11-24 Thread Nichehosters
Hi, I am relatively new to Django, and am trying to update a many-to-many related table using a ModelForm. I see fro the documentation that if I use save(commit=False) - which I do - I need to use save_m2m() after saving the initial form. I am using the save_m2m(), but my related table does not

Installation of Django

2011-11-24 Thread JJ Zolper
Hello, I am new to Django! I was able to download and install: Python 2.7.2 x86 64 on my Windows 7 64 bit machine. I think that is all that I will need to execute the command line? I installed Python to C:/Python27 as the program intended. I then downloaded: Django-1.3.1.tar.gz file and was try

Re: Django : CSRF and variable handling in a view

2011-11-24 Thread Nolhian
I guess I'll surrender and go with only the template authenticated check solution even if it still disturb me a little that the user can display the sign-up form in a page, then log in on another page and still be able to sign-up by sending the form. That's nice to know about the RequestContext !

com_error

2011-11-24 Thread Phanounou
Good day everyone, I am trying to create/edit and close an excel file. Everything went fine on my developpement machine. But on the prod server I get the* following error* : com_error at /mycontracts/getContactClient/ (-2147221005, 'Invalid class string', None, None) *and this trace back*

Re: Django : CSRF and variable handling in a view

2011-11-24 Thread Ivo Brodien
Hi! Ah, ok. Now it makes a more sense - index was indeed confusing. Well in your template I would just make the check and show the form or not. If your don’t show the form, the user cannot make a POST to the signup view since he does not have a valid CSRF token. Anyway, if the user is logged

Using DSE when a model contains a manytomany field

2011-11-24 Thread Fabio Natali
Hi everybody. I want to insert data into my Django db as I read from a CSV file. Everything was fine with a first model of mine. ## fields = ("name", "price") for (counter, row) in enumerate(csvReader): product_dict =

Re: Editable datagrid

2011-11-24 Thread Javier Guerra Giraldez
On Thu, Nov 24, 2011 at 6:28 AM, Gabriel - Iulian Dumbrava wrote: > I have successfully used jqgrid. It's very customizable and you have > inline editing and form editing. same here. slicktables looks very good too, but documentation is lacking, so i haven't really

Re: Django : CSRF and variable handling in a view

2011-11-24 Thread Nolhian
Hello, First of all thanks for your answer ! I think that the name I gave "index.html" is causing confusion. In fact that's the first view I created and so the only template I have at the moment and I awkwardly named it index.html, It should be named signup.html or something like that. I'm not

Re: Named URLs Error

2011-11-24 Thread Tom Evans
On Thu, Nov 24, 2011 at 5:07 AM, eeyore wrote: > This seems like a very simple problem but I can't figure out why it > doesn't work. > > What I am trying to do is to link to a particular view via a named > url. > > > Error >

Re: Django : CSRF and variable handling in a view

2011-11-24 Thread Ivo Brodien
DrBloodMoney is right, It is kind of odd how you are solving the problem but it might me kind of right depending on what you are trying to do. Considering how most of the websites work you should do this. In all the templates include another template which does this: {% if not

Re: Import error when unit testing with django.test.client on django 1.1.1

2011-11-24 Thread Erlendur Hákonarson
Thanks Xavier I will research this better but the path for the settings file is wrong in this error, it should be 'bo.settings' not 'DER.settings' but that might be because the tests do not have my project in their path Thanks again Erlendur -- You received this message because you are

Re: Named URLs Error

2011-11-24 Thread Ivo Brodien
forget my previous post, it is wrong. > /templates/products/index.html > -- > Products > > Error > -- > In template

Re: Named URLs Error

2011-11-24 Thread Ivo Brodien
Not sure but I think you have to put {% load tags %} in your template. On Nov 24, 2011, at 6:07 , eeyore wrote: > This seems like a very simple problem but I can't figure out why it > doesn't work. > > What I am trying to do is to link to a particular view via a named > url. > > > /urls.py

Re: cannot connect to postgresql database

2011-11-24 Thread Nikhil Verma
No Problem dear It happens.!! On Thu, Nov 24, 2011 at 4:38 PM, TANYA wrote: > I keep seeing this message, KSycocaPrivate::openDatabase: Trying to > open ksycoca from "/var/tmp/kdecache-tani/ksycoca4" > > > On Thu, Nov 24, 2011 at 9:49 AM, Daniel Roseman

Re: Editable datagrid

2011-11-24 Thread Gabriel - Iulian Dumbrava
Hi Vikas, I have successfully used jqgrid. It's very customizable and you have inline editing and form editing. Best regards, Gabriel On 21 nov., 13:46, Vikas Rawal wrote: > I am new to django and to web programming. I am trying to build a > database application

Re: cannot connect to postgresql database

2011-11-24 Thread TANYA
I keep seeing this message, KSycocaPrivate::openDatabase: Trying to open ksycoca from "/var/tmp/kdecache-tani/ksycoca4" On Thu, Nov 24, 2011 at 9:49 AM, Daniel Roseman wrote: > On Thursday, 24 November 2011 09:39:58 UTC, Tanya wrote: >> >> Page not found (404) >> Request

Re: cannot connect to postgresql database

2011-11-24 Thread TANYA
ok, I didnt know. I trry http://127.0.0.1:8000/hello/ and it works. Thankyou. -- TANYA -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send

Re: aggregate(Sum('x')) returns None

2011-11-24 Thread Cal Leeming [Simplicity Media Ltd]
None != 0 If no rows were encountered, then None should be returned, because there was no data to aggregate, thus how can it logically come back with 0? I'm -1 on this On Wed, Nov 23, 2011 at 6:24 PM, M. Can Bayrak wrote: > Agree, i think sum must return decimal. Same

Re: cannot connect to postgresql database

2011-11-24 Thread Nikhil Verma
Hi Tanya Okay 404 is a page not found error. According to your problem what i can say is when there is something wrong in the urls.py file. Check it carefully. Explanation :- When you type in the url (which should be present in the urls.py file) it match to a praticular function in views. I

Re: cannot connect to postgresql database

2011-11-24 Thread Daniel Roseman
On Thursday, 24 November 2011 09:39:58 UTC, Tanya wrote: > > Page not found (404) > Request Method: GET > Request URL: http://127.0.0.1:8000/ > > Using the URLconf defined in mysite.urls, Django tried these URL > patterns, in this order: > >1. ^hello/$ > > The current URL, , didn't match any

Re: Large Queryset Calculation In Background?

2011-11-24 Thread Tom Evans
On Wed, Nov 23, 2011 at 8:09 PM, Nikolas Stevenson-Molnar wrote: > What database are you using? You should be able to find information in > the documents about the locking behavior for that database. Compare that > with the operations your running and determine whether

Re: cannot connect to postgresql database

2011-11-24 Thread TANYA
Page not found (404) Request Method: GET Request URL:http://127.0.0.1:8000/ Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order: 1. ^hello/$ The current URL, , didn't match any of these. You're seeing this error because you have DEBUG = True