Re: Is this a bug in the documentation? ModelForm 'fields' attributes throwing error without trailing comma in the Tuple

2012-05-16 Thread Kurtis Mullins
Irfan, I had a feeling it was something along those lines -- although I couldn't find a source for that information. It's definitely not a bug in the Django Documentation -- although it may be a helpful mention :) Then again, I guess a better Python foundation before jumping into Django wouldn't

Re: Thread safety with view arguments in class based views

2012-05-16 Thread Jon Paugh
That last part refers to the way *Python* handles arguments and the like. Whenever you have a complex object, such as an array, Python does not make a new copy of the object each time the view function is called. Instead, it passes a reference to the object, which means that if you change that

Re: Foreign Key don't work for me

2012-05-16 Thread Sandeep kaur
On Thu, May 17, 2012 at 6:09 AM, Jon Paugh wrote: > Ah. I believe, the Amount.job_no (i.e. the foreign key) should not be filled > with the id of the Client object, but with the actual client object, that > is, > > job_no = Client.objects.get(cd['job_no']) > > That matches the

Re: Is this a bug in the documentation? ModelForm 'fields' attributes throwing error without trailing comma in the Tuple

2012-05-16 Thread Irfan Baig
They put a trailing comma in that example because they're writing a tuple with only one element, and the trailing comma is syntactically required in Python to disambiguate from other types of expression. See: http://docs.python.org/tutorial/datastructures.html#tuples-and-sequences "A special

Re: Can't get sorl.thumbnail to work

2012-05-16 Thread DF
Like a charm! Thanks for your patience. I was working on this, my first django project, for months then put it away two months ago when things got too hectic. Still brushing off the cobwebs with some things, Many, many thanks. On Wednesday, May 16, 2012 9:43:34 PM UTC-4, Irfan Baig wrote: >

Re: Can't get sorl.thumbnail to work

2012-05-16 Thread Irfan Baig
Additionally, be sure to set THUMBNAIL_DEBUG = True in your settings file, as this will make sorl spit debug info. See the documentation here: http://thumbnail.sorl.net/reference/settings.html -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Can't get sorl.thumbnail to work

2012-05-16 Thread Irfan Baig
{% if profile.user.profile_pic %} > {% thumbnail item.image "50x50" crop="center" as im %} > width="{{ im.width }}" height="{{ im.height }}"> > {% endthumbnail %} > {% endif %} > > Looks like you have a lot of mistakes in the variables you are referencing above.

Re: settings file being imported four times

2012-05-16 Thread Russell Keith-Magee
Hi Tomas, If you're using Django 1.3, and you're using the development server (which it looks like you are), then yes, it's normal. See: http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html for an excellent explanation of what is going on. If you're using Django 1.4, you

Is this a bug in the documentation? ModelForm 'fields' attributes throwing error without trailing comma in the Tuple

2012-05-16 Thread Kurtis
Hey guys, I've ran into this problem before and it took me a while to figure out the issue. I've ran into it again while just playing around with a small app. In the ModelForm you can define which fields to use. The documented example is here:

Re: Problem with Jquery over Django

2012-05-16 Thread Jon Paugh
Check out "How to handle static files" from this page: https://docs.djangoproject.com/en/1.4/#the-development-process. Also note that the links on this page can help answer a lot of the basic questions about Django for you. Django has a built-in app to handle static files, and cases such as

Re: Foreign Key don't work for me

2012-05-16 Thread Jon Paugh
Ah. I believe, the Amount.job_no (i.e. the foreign key) should not be filled with the *id* of the Client object, but with the actual client * object*, that is, job_no = Client.objects.get(cd['job_no']) That matches the abstract relationship of, "This Client corresponds to this Amount.", then

Re: settings file being imported four times

2012-05-16 Thread Jon Paugh
Yes, when I put a print statement in my settings file, it prints out twice everytime I start the server. The file has to be imported in multiple places, and so it gets executed multiple times. I'm not sure what your error is, but it doesn't seem to be related to the multiple imports. On

Re: two versions of django onsame machine .. django and django-norel

2012-05-16 Thread Bolang
On 05/17/2012 12:42 AM, vijay shanker wrote: i have installed django 1.4 previously and want to install django- norel now.. should i unisntall django 1.4 first .. is it necessary If you use virtualenv, you can install many numbers of django version in the same time. -- You received this

[OFF TOPIC] Seeking Senior Django Developer in L.A. Area (Back-end / Freelance / Los Angeles)

2012-05-16 Thread Irfan Baig
OurGroup, Inc. is looking for senior level (6+ years of total experience) back-end developers in or near the Los Angeles area to join our growing team. Ideally, you would have the following qualities: * At least 3 years of experience with Django * Strong Python skills, and a good understanding

Thread safety with view arguments in class based views

2012-05-16 Thread Chris B
According to the docs on the generic class based views : > Each request served by a > View > has > an independent state; therefore,

Can't get sorl.thumbnail to work

2012-05-16 Thread DF
This is my first time using this app and I can't seem to get it working within the template. No errors. It's just that nothing shows up (which is obviously an error). Here's the snippet from the template: {% extends 'base.html' %} {% load thumbnail %} {% block page_title %}User Profile{%

settings file being imported four times

2012-05-16 Thread Tomas Neme
is it normal that the settings file is being imported four times? I'd give more info, but I really have no clue what's going on here's my manage.py: from django.core.management import execute_manager import imp try: imp.find_module('local_settings') # Assumed to be in the same directory.

Re: Can't locate 'media' directory

2012-05-16 Thread Min Hong Tan
hi, your media folder location should be /media example: your ROOT_PATH is c:\project\ajax_tut then your media file should be c:\project\ajax_tut\media MEDIA_ROOT = os.path.join(ROOT_PATH, 'media') MEDIA_URL = '/media/ ' < like this should be ok. you

Foreign Key don't work for me

2012-05-16 Thread Sandeep kaur
In my Django application, I am using forms for the users to enter the information. In this, I have linked two tables namely, ClientJob and Amount, by using foreign key. Here are the 2 tables: models.py>

R: Re: R: Re: Django-registration tutorial + code

2012-05-16 Thread francescobocca...@libero.it
Thanks, it works perfectly.:) Francesco >Messaggio originale >Da: mail2nishad...@gmail.com >Data: 16/05/2012 19.57 >A: "Django users" >Ogg: Re: R: Re: Django-registration tutorial + code > >Hi ! >Please try following steps , it would definitely work for

Re: R: Re: Django-registration tutorial + code

2012-05-16 Thread nishad
Hi ! Please try following steps , it would definitely work for you... Step1: Enable/Add 'django.contrib.auth.middleware.AuthenticationMiddleware', in your MIDDLEWARE_CLASSES section of 'settings.py' Step2:- Include/Modify following URL pattern in your 'urls.py' urlpatterns = patterns('

two versions of django onsame machine .. django and django-norel

2012-05-16 Thread vijay shanker
i have installed django 1.4 previously and want to install django- norel now.. should i unisntall django 1.4 first .. is it necessary -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: GUI for network interface

2012-05-16 Thread Tanveer Ali Sha
EXAMPLE COMPONENT DESIGN: --- COMPONENT --> PHYSCIAL NETWORK INTERFACE COMPONENT_KEY --> INTERFACE NUMBER START_COMPONENT_SCRIPT --> Bringup_interface SYNC_COMPONENT_SCRIPT --> Setup_interface On Wed, May 16, 2012 at 10:46 PM, Tanveer Ali Sha

Re: GUI for network interface

2012-05-16 Thread Tanveer Ali Sha
Thank you for your mail's actually am fresher ,just now only I started working ,from last two months I worked on python and linux.now TL told me to implement this GUISo am in bit confuse ...:( On Wed, May 16, 2012 at 10:41 PM, Dennis Lee Bieber wrote: > On

Re: Problem with Jquery over Django

2012-05-16 Thread Amr Abdel-wahab
Ok to solve that thing quickly for now I just copied the whole JS file into my HTML, another problem we're facing here is that I get the name of the file dynamically like the following swfobject.embedSWF("{{lecture.lectureFile}}", "myAlternativeContent", "800", "600", "9.0.0", false, flashvars,

Re: Problem with Jquery over Django

2012-05-16 Thread Phang Mulianto
Hi You need understand the different between open the html directly in you browser with open it from a web server. Check your static file setting and load it, is it returning the js or not On May 17, 2012 12:18 AM, "Marcin Tustin" wrote: > Host your JS on your server,

Re: GUI for network interface

2012-05-16 Thread Eugène Ngontang
Hi! Design your model with host entities. From What you wrote i can see only one entity right now : "host" But you can create other entities and define relationship between them (your entities). And give attributes to your entities. Attributes will depend on what information you want to store in

Re: Problem with Jquery over Django

2012-05-16 Thread Marcin Tustin
Host your JS on your server, and use an absolute URL. This is what the STATIC_URL setting is for. On Wed, May 16, 2012 at 5:15 PM, Amr Abdel-wahab < amr.mohamed.abdelwa...@gmail.com> wrote: > Oh ok, then can you give me a solution? > > -- > You received this message because you are subscribed to

Re: Problem with Jquery over Django

2012-05-16 Thread Amr Abdel-wahab
And I am sorry for bothering you. -- 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 django-users+unsubscr...@googlegroups.com. For

Re: Problem with Jquery over Django

2012-05-16 Thread Amr Abdel-wahab
Oh ok, then can you give me a solution? -- 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

Re: Problem with Jquery over Django

2012-05-16 Thread Marcin Tustin
Once again: You have a relative url for your JS. This is expanded to a different location depending on where it is served from. This means that in one case, your browser can find the file on the filesystem, but in the other, it tries to pull it from your server. On Wed, May 16, 2012 at 5:03 PM,

Re: Problem with Jquery over Django

2012-05-16 Thread Amr Abdel-wahab
It just doesn't work if rendered but the same exact file does work if I opened it in a browser view -- 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

Re: Problem with Jquery over Django

2012-05-16 Thread Amr Abdel-wahab
Man it's the same exact file, from the same directory and everything -- 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

Problem with Jquery over Django

2012-05-16 Thread Amr Abdel-wahab
That's an example of a code, this exact file works fine if I just double clicked it, but if when I render that HTML from a django view the java scripts stops, This is really odd because the same exact file runs out side the project if I just double clicked it as a HTML file, but if I just try to

Re: Database Error at /admin/coltrane/entry/add/

2012-05-16 Thread Furbee
Great to hear it. When you move to a production server where you will not be able to delete tables, you will want to use South, since syncdb does not implement changes (additions/deletions) to fields. Django's syncdb script will not touch an existing table, because they do not want to delete data.

GUI for network interface

2012-05-16 Thread Ali Shaikh
hi Django...!! I want to implement GUI for ma projectusing Django. Like in network different host are connected ,for that need to proved components like connect,disconnect ,status n all related staff Please help me to develop this GUI using Django.. Thank You -- You received

R: Re: Django-registration tutorial + code

2012-05-16 Thread francescobocca...@libero.it
hi, i have a question:i downloaded the templates folder but where i put it?i create a project called "mysite". I changed settings.py and urls.py files as you suggested.My question is: how i have to put the templates folder? i put it inside mysite folder but when i try to

Re: Use Django to implement my GUI!

2012-05-16 Thread Alec Taylor
Oh right, it's just Pyjamas. Still, annoyed I didn't think to recommend it first! On Thu, May 17, 2012 at 12:02 AM, Alec Taylor wrote: > On Wed, May 16, 2012 at 10:49 PM, Frank Stüss wrote: >> or maybe you might have a look at http://pyjs.org/

Re: Use Django to implement my GUI!

2012-05-16 Thread Alec Taylor
On Wed, May 16, 2012 at 10:49 PM, Frank Stüss wrote: > or maybe you might have a look at http://pyjs.org/ > which could help you having an event aware client app in your browser. > Served by and with django. I'm impressed (just read the exec summary from homepage) > >

Re: New Release of IBM_DB_DJANGO (1.0.4)

2012-05-16 Thread Phang Mulianto
Is the IBM db express free? I don't even know ubtil now... As django user, this is great news On May 16, 2012 9:42 PM, "Andre Terra" wrote: > I don't even use IBM databases, but I just wanted to say thank you and > great job! > > I'm always happy to see Django being

R: Re: Django-registration tutorial + code

2012-05-16 Thread francescobocca...@libero.it
Thanks to all for answers, i'll try all solutions and i let you know.Thanks you again Francesco Messaggio originale Da: scoobygalle...@gmail.com Data: 16/05/2012 15.34 A: Cc: "francescobocca...@libero.it" Ogg: Re:

Re: New Release of IBM_DB_DJANGO (1.0.4)

2012-05-16 Thread Andre Terra
I don't even use IBM databases, but I just wanted to say thank you and great job! I'm always happy to see Django being embraced all across the IT industry and to see IBM developing and maintaining an part of this great framework is always heart warming. Keep up the good work! Cheers, AT On

Re: Django-registration tutorial + code

2012-05-16 Thread scoobygalletas
Hi! You can go this way: 1. install the right version of django-registration 1. this command will do the trick: 2. pip install https://bitbucket.org/ubernostrum/django-registration/downloads/django-registration-0.8-alpha-1.tar.gz 2. Add "registration" to installed

Re: Django-registration tutorial + code

2012-05-16 Thread Sandro Dutra
I always used the native authentication API and it's sufficient for me, well documented: https://docs.djangoproject.com/en/1.4/topics/auth/ 2012/5/16 francescobocca...@libero.it > Hi all, > i'n new of Django and i like to create an registration user form my web >

Re: Django-registration tutorial + code

2012-05-16 Thread Sandro Dutra
I always used the native authentication API and it's sufficient for me, well documented: https://docs.djangoproject.com/en/1.4/topics/auth/ 2012/5/16 francescobocca...@libero.it > Hi all, > i'n new of Django and i like to create an registration user form my web >

Re: Django-registration tutorial + code

2012-05-16 Thread Frankline
This link should provide a few pointers, though a bit old. http://www.djangobook.com/en/beta/chapter12/ F.O.O -- 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

Re: Store base64 data in database with imagefield ?

2012-05-16 Thread bussiere bussiere
Thanks all But there is nothing to do it from imagefield directly ? Because if someone use the admin interface ? (mayber i've misread what you gave). regards Bussiere "Les nouvelles technologies offrent pleins de nouvelles possibilités, pleins de possibilités d'erreurs surtout en fait."

Django-registration tutorial + code

2012-05-16 Thread francescobocca...@libero.it
Hi all, i'n new of Django and i like to create an registration user form my web site (login, logout, profile user, password etc..) I read a lot of documentation but i didn't found a code that i can download with all right things (templates, urls etc). Anyone can help me to suggest any tutorial

Re: Help - Which IDE is best to use.

2012-05-16 Thread Frankline
@yati : True. I believe the following links should answer and, hopefully, close the discussion: http://stackoverflow.com/questions/126753/is-there-a-good-free-python-ide-for-windows http://stackoverflow.com/questions/81584/what-ide-to-use-for-python Regards, F.O.O. -- You received this

Re: Use Django to implement my GUI!

2012-05-16 Thread Frank Stüss
or maybe you might have a look at http://pyjs.org/ which could help you having an event aware client app in your browser. Served by and with django. Am Sonntag, den 13.05.2012, 17:14 +0400 schrieb Alireza Savand: > No, i posted django-tastypie not tastypie itself and it's easy to use. > Anyway

Re: Django for the first time

2012-05-16 Thread MEL
After setting PYTHONPATH to my and PATH to /django/bin (here is django-admin.py), I could run "django-admin.py startproject 'sitename' from command line :-) Thank you! -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion

Re: Django for the first time

2012-05-16 Thread MEL
After setting PYTHONPATH to my and PATH to /django/bin (here is django-admin.py), I could run "django-admin.py startproject 'sitename' from command line :-) Thank you! kl. 13:02:52 UTC+2 onsdag 16. mai 2012 skrev MEL følgende: > > Can anyone help me ? > Can't even create my first site in

Re: Help - Which IDE is best to use.

2012-05-16 Thread yati sagade
Let us take an oath not to answer any more of these IDE questions. I don't mean to be rude, but PLEASE SEARCH BEFORE ASKING. PLEASE do. Every other day someone asks. "Hi I'm new to Django, What IDE should I use?" and a steady stream of replies like "I use xxx", "I like yyy, but XXX looks

Re: Help - Which IDE is best to use.

2012-05-16 Thread Kejun He
Hi, I using wingide -- 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 django-users+unsubscr...@googlegroups.com. For more

Re: Use Django to implement my GUI!

2012-05-16 Thread Eugène Ngontang
Ok! But it's not so complited to understand. I will even send a diagram. Le 16 mai 2012 13:50, "Marcin Tustin" a écrit : > A lot of people seem confused by your architecture. It might help if you > provided a complete (but high-level) description of the architecture of

Re: Auto increase number number

2012-05-16 Thread Scott Gould
What is the purpose of the "no" field? If it's for display, it may be that you don't need to store it in the database at all. Something like: no, obj = enumerate(UserProfile.objects.all()) Even if it does need to be stored in the database, it's a calculated value that must be based upon the

Re: Django for the first time

2012-05-16 Thread Tom Evans
On Wed, May 16, 2012 at 12:02 PM, MEL wrote: > Can anyone help me ? > Can't even create my first site  in the tutorial :-( > > Python 2.7.3 (default, Apr 20 2012, 22:39:59) > [GCC 4.6.3] on linux2 > Type "copyright", "credits" or "license()" for more information.

Re: Django for the first time

2012-05-16 Thread Marcin Tustin
Some of these are python, and some of these are shell commands. If you are not familiar with python, then try a short tutorial before attempting to learn django. On Wed, May 16, 2012 at 12:02 PM, MEL wrote: > Can anyone help me ? > Can't even create my first site in the

Re: IndentationError

2012-05-16 Thread Tom Evans
On Wed, May 16, 2012 at 12:43 PM, ahmad wrote: > hi > I have a URL: > >> url(r'^airline/ticket/ajax/add$', airline_ticket_ajax_add, >> name='airline_ticket_ajax_add' ), > > > and when I try to reverse this URL I get: > >>> Exception Type: IndentationError at /sell/ >>>

IndentationError

2012-05-16 Thread ahmad
hi I have a URL: url(r'^airline/ticket/ajax/add$', airline_ticket_ajax_add, > name='airline_ticket_ajax_add' ), and when I try to reverse this URL I get: Traceback: > > File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py" in >> get_response > > 111.

Django for the first time

2012-05-16 Thread MEL
Can anyone help me ? Can't even create my first site in the tutorial :-( Python 2.7.3 (default, Apr 20 2012, 22:39:59) [GCC 4.6.3] on linux2 Type "copyright", "credits" or "license()" for more information. >>> import sys >>> sys.path.append("/home/morten/django") >>> import django >>> print

Re: Use Django to implement my GUI!

2012-05-16 Thread Marcin Tustin
A lot of people seem confused by your architecture. It might help if you provided a complete (but high-level) description of the architecture of the system in a single email. On Wed, May 16, 2012 at 12:47 PM, Eugène Ngontang wrote: > No i'm not inventing a server. > The

Re: Use Django to implement my GUI!

2012-05-16 Thread Eugène Ngontang
No i'm not inventing a server. The application has a centrilzed server (module server installed on a dedicated host ). The dispatches tasks to remote clients (the client module is installed on each client host) and receives informations from clients about taks state. How would you like me to

Re: Django AJAX forms and views

2012-05-16 Thread Joel Khan
Thanks. Actually I m using a lib called prototype where its returning the csrfmiddlewaretoken. I have tested the alert in my function and its returning the csrf token correctly. I m sending the color to the html page. I tried using both chrome and firefox with firebug and chrome doesnt do anything

Auto increase number number

2012-05-16 Thread yillkid
Hi all . I want to add a Field "no" for assign numbers to user. The content what I need as below ( user change page): nouser name --- 1 root 2 user_1 3 user_2 But "no" is different with "pk" of the user, because it's a

New Release of IBM_DB_DJANGO (1.0.4)

2012-05-16 Thread Rahul
IBM_DB_DJANGO-1.0.4 --- IBM_DB_DJANGO adaptor enables access to IBM databases from Django applications http://www.djangoproject.com/. The adaptor is developed and maintained by IBM. What's New? - Added support for Django-1.4 - Backward

Re: Use Django to implement my GUI!

2012-05-16 Thread Jani Tiainen
Hi, Like I said, it all depends what you have and what is the goal. You keep constantly talking about magical "server" that talks with the database. Is this server already existing piece of infrastructure that some programs already use and you like to hook up with that? Or is this server

Re: Help - Which IDE is best to use.

2012-05-16 Thread Tom Evans
On Tue, May 15, 2012 at 8:52 PM, knowledge_seeker wrote: > For people used to using Vim in Unix, there is an Eclipse plug-in called > Vwrapper. > > - knowledge_seeker > For people used to using vim there is vim. http://pragmatictips.com/22 No amount of point and

Re: Django News App

2012-05-16 Thread armagan
Thanks a lot. I've tried zinnia, cms and mezzanine. And now we -all of team members- will decide which blog is proper and useful for a news app. On May 14, 5:43 pm, Alec Taylor wrote: > Mezzanine might be a bit of fun to work with > > Also note that Django was developed

Re: Database Error at /admin/coltrane/entry/add/

2012-05-16 Thread Gethin Llyn ab Alwyn
Thank you for your answer, deleting the table and running manage.py syncdb did the trick Geth On 15 May 2012 17:02, Furbee wrote: > Have you checked your database to see that the field actually exists. If > you've added excerpt_html since you ran python manage.py syncdb

Re: sweat-equity

2012-05-16 Thread Marcin Tustin
Cool. On Wed, May 16, 2012 at 1:06 AM, Mike Dewhirst wrote: > Marcin > > Some changes to increase coherence and a new Project Bootstrap page to > prompt incorporation of the project. > >

Re: django 1.4 : gunicorn can't find static files. settings option

2012-05-16 Thread Bolang
On 05/16/2012 01:08 PM, huseyin yilmaz wrote: For development, you could add this to main urls.py like this. (r'^static/(?P.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT, 'show_indexes':True}), Thanks, It solves the problem! But for production use your web

Re: django 1.4 : gunicorn can't find static files. settings option

2012-05-16 Thread huseyin yilmaz
For development, you could add this to main urls.py like this. (r'^static/(?P.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT, 'show_indexes':True}), But for production use your web server to serve static files. At least this is how I solved it. I hope that helps.