Re: Django training resources?

2010-12-17 Thread Kenneth Gonsalves
On Fri, 2010-12-17 at 18:37 -0800, Sean W wrote: > I should mention that a would prefer a tutorial that goes over > web development principals like Javascript and AJAX because I've never > used > those tools before. that has nothing to do with django -- regards Kenneth Gonsalves -- You recei

Re: registering app level signal handlers

2010-12-17 Thread Yaniv Aknin
Maybe I'm missing something here, but why not the app's __init__.py? (my main urls.py imports all my apps' urls.py, which means their __init__.py is likely to be called rather early in any request, no?) - Yaniv On Sat, Dec 18, 2010 at 3:10 AM, dmitry b wrote: > Aren't an app's models loaded l

VirtualHost and external IP

2010-12-17 Thread andy
I have the following in my apache httpd.conf file ServerName mastermac Alias /site_media/ /var/www/django_projects/master_mac_enterprise/ master_mac_enterprise/site_media/ Order deny,allow Allow from all Options -Indexes WSGIScr

Re: Django vs Postgres Connection

2010-12-17 Thread CLIFFORD ILKAY
On 12/17/2010 03:49 PM, armandoperico wrote: on settings.py.. DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'dbname', # Or path to datab

Authenticate every def in views.py

2010-12-17 Thread suckerfish
Hi guys I've added a decorator to *each* def in views.py to require authentication. Is there a simpler way that allows me to apply authentication automatically to every def in the file? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Django training resources?

2010-12-17 Thread Sean W
I should mention that a would prefer a tutorial that goes over web development principals like Javascript and AJAX because I've never used those tools before. Thanks again. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gr

Re: Django training resources?

2010-12-17 Thread Sean
USA On Dec 17, 2010 9:28 PM, "Kenneth Gonsalves" wrote: > On Fri, 2010-12-17 at 15:12 -0800, Sean W wrote: >> Is anyone aware of good quality, affordable training for Django? > > which country? > -- > regards > Kenneth Gonsalves > > -- > You received this message because you are subscribed to the

Re: Django training resources?

2010-12-17 Thread Kenneth Gonsalves
On Fri, 2010-12-17 at 15:12 -0800, Sean W wrote: > Is anyone aware of good quality, affordable training for Django? which country? -- regards Kenneth Gonsalves -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: How to get a web development job (i.e. Django/Python) if someone is an amateur programmer?

2010-12-17 Thread Kenneth Gonsalves
On Fri, 2010-12-17 at 13:15 -0500, Ken Huang wrote: > I've got a still-live Digg-like PHP site that I built two years ago > with a > few buddies. How much cred does that buy me if I'm looking for a > Django job? > Do I need to specifically build and/or open source Django? > > yes -- regards Ken

Re: How to get a web development job (i.e. Django/Python) if someone is an amateur programmer?

2010-12-17 Thread Kenneth Gonsalves
On Fri, 2010-12-17 at 09:03 -0800, Dopster wrote: > As an amateur, how could I position myself to get in the door at an > established startup (i.e., not founding team) or web dev shop as a > junior > Django/[insert language/framework here] developer? as a fellow amateur, I found the best way is

Re: Django training resources?

2010-12-17 Thread mengu
hi, i think you should definitely watch this screencast series: http://showmedo.com/videotutorials/video?name=336&fromSeriesID=336 On Dec 18, 1:12 am, Sean W wrote: > Is anyone aware of good quality, affordable training for Django?  I'm > entirely new to web development, although I do have s

Re: Django training resources?

2010-12-17 Thread Sebastian Gutierrez
try showmedo.com They have some django tutorials given by screen casts that are free and some that are pretty cheap. Sebastian On Dec 17, 2010, at 3:12 PM, Sean W wrote: > Is anyone aware of good quality, affordable training for Django? I'm > entirely new to web development, although I do h

Re: registering app level signal handlers

2010-12-17 Thread dmitry b
Aren't an app's models loaded lazily (upon the first use)? On Dec 16, 7:16 pm, "W. Craig Trader" wrote: > I usually register the signals for a given application at the bottom of that > app's model.py file. > > - Craig - -- You received this message because you are subscribed to the Google Group

Re: Django vs Postgres Connection

2010-12-17 Thread Anurag Chourasia
Hi Armando, To specify the Postgre password, you should set the environment variable pointing to the pgpass file .. basically add this line to your wsgi script (replacing with the actual location of your pgpass file of course) *os.environ['PGPASSFILE']='/home/ap2/.pgpass'* Let me know if it

Django training resources?

2010-12-17 Thread Sean W
Is anyone aware of good quality, affordable training for Django? I'm entirely new to web development, although I do have some experience with Python. I'm also a college student, so cost is a concern. I don't have the time to travel to a training seminar. I'm not one of those people who can mas

Re: Django vs Postgres Connection

2010-12-17 Thread armandoperico
sorry, how should do to specify the password on the wsgi file ? this would be the best i have so far. thanks On Dec 17, 10:17 pm, Anurag Chourasia wrote: > And did you had to provide a password for establishing that connection? Or > the .pgpass file took care of it? > > If you had to provide a

Re: Full text search with PostgreSQL and Django

2010-12-17 Thread Jorge Bastida
http://haystacksearch.org/ 2010/12/17 marcoarreguin > Hi!! > > I need to implement a search engine with full text search, I'm using > postgreSQL and Django, I have searched in google ( > http://barryp.org/blog/entries/postgresql-full-text-search-django/ ) > but isn't there a more simple way ?? >

Full text search with PostgreSQL and Django

2010-12-17 Thread marcoarreguin
Hi!! I need to implement a search engine with full text search, I'm using postgreSQL and Django, I have searched in google ( http://barryp.org/blog/entries/postgresql-full-text-search-django/ ) but isn't there a more simple way ?? Or just another way? -- You received this message because you ar

Re: Multiple conditions on same field in JOIN over three models

2010-12-17 Thread Jonas H.
On 12/17/2010 08:38 PM, Łukasz Rekucki wrote: Blog.objects.filter(post_tags__name__in=["foo", "bar"]).annotate(match_count=Count('post__tags')).filter(match_count=2) This should give you the right results. Neat! And blazingly fast, too, I guess! Thank you very much, anyway :-) Jonas -- You

Re: Request Object Data

2010-12-17 Thread Jonas H.
On 12/17/2010 10:18 PM, hank23 wrote: Is data entered on an input screen automatically added to the request when the screen is submitted? If so are there any special parameters or settings in the screen controls which have to be set/coded to get the entered data saved into the request and under w

Re: Django vs Postgres Connection

2010-12-17 Thread armandoperico
yes... no passwords. On Dec 17, 10:17 pm, Anurag Chourasia wrote: > And did you had to provide a password for establishing that connection? Or > the .pgpass file took care of it? > > If you had to provide a password then probably that's your clue. You might > be required to specify the pgpass in

Request Object Data

2010-12-17 Thread hank23
Is data entered on an input screen automatically added to the request when the screen is submitted? If so are there any special parameters or settings in the screen controls which have to be set/coded to get the entered data saved into the request and under what keys is the data saved? Once in the

Re: Django vs Postgres Connection

2010-12-17 Thread Anurag Chourasia
And did you had to provide a password for establishing that connection? Or the .pgpass file took care of it? If you had to provide a password then probably that's your clue. You might be required to specify the pgpass in mod wsgi script. On Sat, Dec 18, 2010 at 2:45 AM, armandoperico wrote: > ye

Re: Django vs Postgres Connection

2010-12-17 Thread armandoperico
could it be something related with permissions ?! because i have to change everything to "apache" - chown -R apache ../ myproject_folder/ which would be the right permissions to have ? thanks a lot On Dec 17, 10:04 pm, Anurag Chourasia wrote: >  On this server, are you able to connect to the Po

Re: Django vs Postgres Connection

2010-12-17 Thread armandoperico
yes. On Dec 17, 10:04 pm, Anurag Chourasia wrote: >  On this server, are you able to connect to the PostGre database using the > command line? > > psql -U myuser -h 127.0.0.1 -p 5432 -d dbname > > Regards, > Anurag > > On Sat, Dec 18, 2010 at 2:19 AM, armandoperico > wrote: > > > > > > > > > on

Re: Django vs Postgres Connection

2010-12-17 Thread Anurag Chourasia
On this server, are you able to connect to the PostGre database using the command line? psql -U myuser -h 127.0.0.1 -p 5432 -d dbname Regards, Anurag On Sat, Dec 18, 2010 at 2:19 AM, armandoperico wrote: > on settings.py.. > > DATABASES = { >'default': { >'ENGINE': 'django.db.backe

Re: Django vs Postgres Connection

2010-12-17 Thread armandoperico
Below follows my wsgi script. But i don't think it's not being able to read the settings.py because it is actually complaining about the info that is inside there. (the DB infos) :S -wsgi --- import os

Re: Django vs Postgres Connection

2010-12-17 Thread Anurag Chourasia
You might want to check your wsgi script. Looks like the environment variables that you have in there are wrong and not allowing the import of settings.py Regards, Anurag On Sat, Dec 18, 2010 at 1:32 AM, armandoperico wrote: > Hi, > this is the first time i try to deploy a django project and i'

Re: Django vs Postgres Connection

2010-12-17 Thread armandoperico
on my pg_hba.conf i right now have this: # "local" is for Unix domain socket connections only local all all trust # IPv4 local connections: hostall all 192.168.0.1/32trust hostall all 127.0.0.1/32trust

Re: Django vs Postgres Connection

2010-12-17 Thread armandoperico
on settings.py.. DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'dbname', # Or path to database file if using sqlite3. 'USER': 'myuser

RE: Django vs Postgres Connection

2010-12-17 Thread James DeMichele
This sounds more like a Postgresql settings problem than a Django/Python specific problem. I'd suggest taking a look at your pg_hba.conf file. It can be finicky, so you probably want to reference this if you haven't already: http://www.postgresql.org/docs/8.4/static/auth-pg-hba-conf.html -Jamie

Re: Django vs Postgres Connection

2010-12-17 Thread Mathieu Leduc-Hamel
check if postgresql is listening to 127.0.0.1, 0.0.0.0 or nothing in postgrsql On Fri, Dec 17, 2010 at 3:30 PM, Servais Nabil wrote: > Hello, I think postgresql is not running or doesnt use the 5432 port. Check > your processus. > > Le 17 déc. 2010 21:25, "Christophe Pettus" a écrit : >> >> On D

Re: Django vs Postgres Connection

2010-12-17 Thread Servais Nabil
Hello, I think postgresql is not running or doesnt use the 5432 port. Check your processus. Le 17 déc. 2010 21:25, "Christophe Pettus" a écrit : > > On Dec 17, 2010, at 12:02 PM, armandoperico wrote: >> On my local machine everything is running fine, but when i try to >> deploy to a running server

Re: Django vs Postgres Connection

2010-12-17 Thread Christophe Pettus
On Dec 17, 2010, at 12:02 PM, armandoperico wrote: > On my local machine everything is running fine, but when i try to > deploy to a running server with apache (mod_wsgi), i'm getting the > following error (database related): > > Caught OperationalError while rendering: could not connect to serve

Django vs Postgres Connection

2010-12-17 Thread armandoperico
Hi, this is the first time i try to deploy a django project and i'm not being able to solve a problem. On my local machine everything is running fine, but when i try to deploy to a running server with apache (mod_wsgi), i'm getting the following error (database related): Caught OperationalError w

wsgi.file_wrapper failing silently

2010-12-17 Thread Brian Craft
I'm testing the patch for ticket 2131 (http://code.djangoproject.com/ticket/2131) on 1.2.3. I'm getting back a 500 (internal server error) sometime after returning the HttpResponseSendFile(), with nothing in the apache error log. Any suggestions on how to debug this? -- You received this message

Re: Multiple conditions on same field in JOIN over three models

2010-12-17 Thread Łukasz Rekucki
On 17 December 2010 19:20, Jonas H. wrote: > Hello! > > Assuming the following data model: > > +--+                +--+                   +-+ > | Blog | has many (1:n) | Post | tagged with (n:m) | Tag | > +--+                +--+                   +-+ > > I want to filter o

Re: Multiple conditions on same field in JOIN over three models

2010-12-17 Thread Jonas H.
On 12/17/2010 08:21 PM, Javier Guerra Giraldez wrote: Blog.objects.filter(post__tags__name="foo").filter(post__tags__name="bar") That's "get all blogs that have at least one post tagged with 'foo' and one post tagged with 'bar'", not requiring that *one post* matches *both* conditions. -- Y

Re: Multiple conditions on same field in JOIN over three models

2010-12-17 Thread Javier Guerra Giraldez
On Fri, Dec 17, 2010 at 1:20 PM, Jonas H. wrote: > Blog.objects.filter(post__tags__name="foo", >                        post__tags__name="bar") untested: Blog.objects.filter(post__tags__name="foo").filter(post__tags__name="bar") -- Javier -- You received this message because you are subscrib

Re: PyDev Django Debugging

2010-12-17 Thread Tim Sawyer
Hi, You need to get it working in the dev server first, as you'll need that to debug with (I think). You need to modify the pythonpath so it can see your code. Modify manage.py in (1) and try running the dev server with: python manage.py runserver. You'll need something like this at the t

get request from an java API to DJango

2010-12-17 Thread sami nathan
THANKS FOR NOTIFICATION Hi i am newbie to django i am having task that want to get request from an java API and give Response to the same API (To act as an server ) So i am having WSDL file for the JAVA API I decided to do that in ZSI WEB SERVICE and i generated server file using wsdl2

Multiple conditions on same field in JOIN over three models

2010-12-17 Thread Jonas H.
Hello! Assuming the following data model: +--++--+ +-+ | Blog | has many (1:n) | Post | tagged with (n:m) | Tag | +--++--+ +-+ I want to filter out all blogs that have a post tagged with "foo" and "bar"

Re: How to get a web development job (i.e. Django/Python) if someone is an amateur programmer?

2010-12-17 Thread Ken Huang
OP here. I've got a still-live Digg-like PHP site that I built two years ago with a few buddies. How much cred does that buy me if I'm looking for a Django job? Do I need to specifically build and/or open source Django? Thanks for the advice guys - much appreciated! On Fri, Dec 17, 2010 at 1:10

Re: How to get a web development job (i.e. Django/Python) if someone is an amateur programmer?

2010-12-17 Thread garagefan
I was once in your shoes. No real resume experience to show... no sites to display my knowledge. My advice... makes more friends. It's all in who you know. Met some at an intro html course at a community college, ended up being good friends. He was a developer already, but a few years later he tel

One project, many apps, how to share single user profile

2010-12-17 Thread donn
Hi, I hope someone can give me a hand. I'd like to have a *single* UserProfile table/model which is *shared* across many apps, much like auth_user is. --- setup info --- Django 1.2.1 on a recent Linux system. All pretty up-to-date. One project (X). Many apps (A,B,C). The url, say: *.home.box,

Re: How to get a web development job (i.e. Django/Python) if someone is an amateur programmer?

2010-12-17 Thread Shawn Milochik
As someone who has hired a couple of people just like you in the past year, here's my response. Others may have different standards. Having links to sites you've developed is good. Having links to a github account with public projects is great. A resume with bad spelling, grammar, or obviously

Forbidden (403) - CSRF verification failed. Request aborted.

2010-12-17 Thread Daniel Roseman
It's not just the view that processes the form that needs RequestContext - the one that generates it does too. Normally these are the same view, but it looks from your code that you are posting to a different view. Perhaps you could show the code of the other one and we'll see what is wrong with

Re: How to get a web development job (i.e. Django/Python) if someone is an amateur programmer?

2010-12-17 Thread Carlos Daniel Ruvalcaba Valenzuela
I founded my own startup 2 years ago, personally I can tell you that having open source work published talks very well of you, even if is not your own project but substantial contributions. Open Source gives you the opportunity to develop your skills and show them to the world, personally I look f

How to get a web development job (i.e. Django/Python) if someone is an amateur programmer?

2010-12-17 Thread Dopster
*This is a question that can be generalized for any other amateur programmers looking to get into software development, and specifically startups. I specify Django/Python in my own details below, but it can be replaced with PHP, Ruby, etc.* As an amateur, how could I position myself to get i

Re: Date localization

2010-12-17 Thread eka (Esteban)
Fixed thanks! On Dec 17, 1:29 pm, "eka (Esteban)" wrote: > It tries both (en_US, en) but import_module fails to import it > > On Dec 17, 12:58 pm, "eka (Esteban)" wrote: > > > debugging found that is trying to open *** ImportError: No module > > named formats.en_US.formats > > > en_US ? shouldn'

Re: Date localization

2010-12-17 Thread eka (Esteban)
It tries both (en_US, en) but import_module fails to import it On Dec 17, 12:58 pm, "eka (Esteban)" wrote: > debugging found that is trying to open *** ImportError: No module > named formats.en_US.formats > > en_US ? shouldn't be 'en' ? > > On Dec 17, 12:40 pm, "eka (Esteban)" wrote: > > > Any r

Re: tinymce

2010-12-17 Thread Aljoša Mohorović
On Fri, Dec 17, 2010 at 3:27 PM, alecx wrote: > I integrated django-tinymce into my application. Now I can edit the > text in the former textarea field. > But when I submit the form, the field is empty. > I am not able to figure out why the text I wrote in the editor field > is not submitted. > Ha

Re: Date localization

2010-12-17 Thread eka (Esteban)
debugging found that is trying to open *** ImportError: No module named formats.en_US.formats en_US ? shouldn't be 'en' ? On Dec 17, 12:40 pm, "eka (Esteban)" wrote: > Any reason why django is not reading from my FORMAT_MODULE_PATH ? > USE_L10N = True, USE_I18N = True > the date is transformed

Re: wikileaks cables on a django site

2010-12-17 Thread Andre Terra
Love the idea, but where's the magic? It's really lacking a django pony! On Fri, Dec 17, 2010 at 12:25, ahppub wrote: > Check this out, WikiLeaks cables hosted on a Django site :) > http://www.dazzlepod.com/cable/ > > -- > You received this message because you are subscribed to the Google Group

Date localization

2010-12-17 Thread eka (Esteban)
Any reason why django is not reading from my FORMAT_MODULE_PATH ? USE_L10N = True, USE_I18N = True the date is transformed but not to my format but to the one in django.conf.locale django v1.2.3 -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Forbidden (403) - CSRF verification failed. Request aborted.

2010-12-17 Thread hank23
I have pretty much completed the intro. tutorial for django. I'm now trying to add some actual updating screens to the existing site, to experiment and also to try to figure out more how everything works. I'm currently trying to code an "addpoll" screen which I've coded to look like this: Add Poll

Re: JavaScript src files not found.

2010-12-17 Thread Vovk Donets
2010/12/17 Robert Steckroth > Hey coders, Where would stuff like .js src files go in a Django powered > Website? > ERROR --> 09:20:08.016: Network: GET > http://localhost:8000/users/PBUi/mouse.js [HTTP/1.0 404 NOT FOUND 30ms] > ERROR --> 09:20:07.823: Network: GET > http://localhost:8000/users/s

Re: PyDev Django Debugging

2010-12-17 Thread MLG
Hi Tim, Thank you for your prompt response. The "runserver --noreload" is in place as well in the arguments tab. I have already set this option. The truth is that i haven't tried to run the application in the development server but directly in the apache. The structure is as follow: 1)web/sites/

JavaScript src files not found.

2010-12-17 Thread Robert Steckroth
Hey coders, Where would stuff like .js src files go in a Django powered Website? ERROR --> 09:20:08.016: Network: GET http://localhost:8000/users/PBUi/mouse.js [HTTP/1.0 404 NOT FOUND 30ms] ERROR --> 09:20:07.823: Network: GET http://localhost:8000/users/sylvester.js [HTTP/1.0 404 NOT FOUND 11ms]

Re: PyDev Django Debugging

2010-12-17 Thread Tim Sawyer
Here's my instructions for debugging in PyDev, hope that helps: http://drumcoder.co.uk/blog/2010/apr/21/debugging-django-pydev/ This is done using the development server, not Apache, from within Eclipse. Does your app work in the development server? Tim. > Hi, > > I am new to Django trying to

PyDev Django Debugging

2010-12-17 Thread MLG
Hi, I am new to Django trying to port a web site from PHP to Django. I use Apache web server and I have a problem with the debugging. I use Aptana PyDev as IDE and i want to use the debugger in the toolbar. I define the workspace in the the debug configuration as well as the main module (manage.py

wikileaks cables on a django site

2010-12-17 Thread ahppub
Check this out, WikiLeaks cables hosted on a Django site :) http://www.dazzlepod.com/cable/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send

tinymce

2010-12-17 Thread alecx
Hi, I integrated django-tinymce into my application. Now I can edit the text in the former textarea field. But when I submit the form, the field is empty. I am not able to figure out why the text I wrote in the editor field is not submitted. Has someone a tip for me? Thanks in advance. -- You re

Re: [OFF-Topic] Cache django and get server datetime with a lighter approach

2010-12-17 Thread Javier Guerra Giraldez
On Fri, Dec 17, 2010 at 5:57 AM, Michel Thadeu Sabchuk wrote: > What do you suggest me? Is django too expensive to serve this datetime > or may I use another scripting language directly from nginx, Maybe PHP > or Perl? PHP/Perl are at least on the same order of magnitude as Python/Django. If you

Re: Django as huge image host

2010-12-17 Thread Shamail Tayyab
> Google for X-SendFile > Hey! This one looks like exactly what I want... I'll give it a shot. Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this

Re: Django as huge image host

2010-12-17 Thread Shamail Tayyab
> Does your CDN offers statistics? I use rackspace cloud files and I > know there is log files I can rely on. I didn't used it yet but maybe > it's a choice... Hi, No, we don't yet have a CDN, its a prospect, a costly prospect. Thanks -- You received this message because you are subscribed t

Re: Django as huge image host

2010-12-17 Thread Shamail Tayyab
> I'm not sure this is even a task for Django. If your primary concern is > performance, try doing this directly in Apache or another web server via > rewrite rules and use the access logs to do the accounting. Apache is good at > access statistics. > > If your primary concern is statistics, th

[OFF-Topic] Cache django and get server datetime with a lighter approach

2010-12-17 Thread Michel Thadeu Sabchuk
Hi guys, I'm working on a group buying website like groupon. This page have a regressive counter that tells the user how many time is available before the end of the deal publishing. I want to cache this site: I want to put nginx to serve memcached directly and only when the page is not found in

Re: Django as huge image host

2010-12-17 Thread Tom Evans
On Fri, Dec 17, 2010 at 9:28 AM, Shamail Tayyab wrote: > Hi, > >    I have this situation.. > > - We need to serve static files(images), lots of them, probably 100s > of them per second. > Google for X-SendFile Cheers Tom -- You received this message because you are subscribed to the Google

Re: Django as huge image host

2010-12-17 Thread Michel Thadeu Sabchuk
Hi, > I'm not sure this is even a task for Django. If your primary concern is > performance, try doing this directly in Apache or another web server via > rewrite rules and use the access logs to do the accounting. Apache is good at > access statistics. Does your CDN offers statistics? I use r

Re: Django as huge image host

2010-12-17 Thread Erik Cederstrand
Den 17/12/2010 kl. 10.28 skrev Shamail Tayyab: >I have this situation.. > > - We need to serve static files(images), lots of them, probably 100s > of them per second. > > Our website is in Django and we need to support something like this: > > 1. a URL like /xyz.jpg should open an image. >

Django as huge image host

2010-12-17 Thread Shamail Tayyab
Hi, I have this situation.. - We need to serve static files(images), lots of them, probably 100s of them per second. Our website is in Django and we need to support something like this: 1. a URL like /xyz.jpg should open an image. 2. image should be accesibe via this path only because we as