Re: Beginner's question about urls.py

2012-02-22 Thread shartha
Thanks for everyone for their help/time =) On Feb 22, 10:19 pm, shartha wrote: > Jonathan, how did you conclude that? > > On Feb 22, 10:00 pm, Jonathan Paugh wrote: > > > > > > > > > What puzzles me is thathttp://chekonam.info/claimsthat uWSGI doesn't > > know about the project--presumably the o

Re: Beginner's question about urls.py

2012-02-22 Thread shartha
PROBLEM SOLVED! This was a host specific problem and the customer service helped me solve it. I just needed to restart the application! On Feb 22, 10:19 pm, shartha wrote: > Jonathan, how did you conclude that? > > On Feb 22, 10:00 pm, Jonathan Paugh wrote: > > > > > > > > > What puzzles me is t

Re: import selenium

2012-02-22 Thread dizzydoc
@xina towner Hi, I have been working with selenium from quite a lot time. There are three things you need to build and run functional test cases using selenium. Since selenium is a browser based testing environment you need a server that serves it. So you need: 1. selenium-server-standalone-2.18

Re: Beginner's question about urls.py

2012-02-22 Thread shartha
Jonathan, how did you conclude that? On Feb 22, 10:00 pm, Jonathan Paugh wrote: > What puzzles me is thathttp://chekonam.info/claims that uWSGI doesn't > know about the project--presumably the one under /admin. > > Is this relevant? > > On 02/22/2012 10:45 PM, shartha wrote: > > > > > > > > > The

Re: Beginner's question about urls.py

2012-02-22 Thread Jonathan Paugh
What puzzles me is that http://chekonam.info/ claims that uWSGI doesn't know about the project--presumably the one under /admin. Is this relevant? On 02/22/2012 10:45 PM, shartha wrote: > The file I posted above is the actual file on my server. I don't think > I have any conflicts in the urls.py.

Re: Beginner's question about urls.py

2012-02-22 Thread shartha
The file I posted above is the actual file on my server. I don't think I have any conflicts in the urls.py. What are the databases that are created when you add 'django.contrib.admin' to your INSTALLED_APP and sync your database? On Feb 22, 9:27 pm, Stanwin Siow wrote: > Check your urls.py there

Re: psycopg2, postgres9.1, Mac OS - problem with psycopg2

2012-02-22 Thread Will Tuladhar-Douglas
And to whomever wrote and applied those very patches, _thank you_. I discovered them after shifting to 1.4a and suddenly lots of things just work. -WBTD. On 23 Feb 2012, at 01:26, Jeff Heard wrote: > Just as a followup to this, there are a few problems that have been patched > on Django with r

Re: Beginner's question about urls.py

2012-02-22 Thread Stanwin Siow
Check your urls.py there could be conflicting statements: http://stackoverflow.com/questions/4174610/django-admin-page-not-found-at-admin Check out the stackoverflow question Best Regards, Stanwin Siow On Feb 23, 2012, at 11:20 AM, shartha wrote: > I have "django.contrib.admin" added to

Re: Beginner's question about urls.py

2012-02-22 Thread shartha
I have "django.contrib.admin" added to my INSTALLED_APP and database is also sync'ed! On Feb 22, 9:04 pm, Stanwin Siow wrote: > check your settings.py file to ensure that you have the admin line > uncommented in installed apps. > > Best Regards, > > Stanwin Siow > > On Feb 23, 2012, at 10:58 AM,

Re: Beginner's question about urls.py

2012-02-22 Thread Stanwin Siow
check your settings.py file to ensure that you have the admin line uncommented in installed apps. Best Regards, Stanwin Siow On Feb 23, 2012, at 10:58 AM, shartha wrote: > Hello, > > I am trying to deploy a simple django site. The host I have chosen > installed django for me. But the prob

Beginner's question about urls.py

2012-02-22 Thread shartha
Hello, I am trying to deploy a simple django site. The host I have chosen installed django for me. But the problem is they have modified the files a little bit and it sometimes gets confusing for a novice person like me. Here is my question: This is the urls.py on the server:

Requesting suggestions on layout for simple "name" catalogs

2012-02-22 Thread Jair Trejo
I've got a system with three main tables, say "offices", "commercial spaces" and "industrial properties". Many of their features, like the type of glass of their windows, need to come from a catalog, so I have a base class like: class SimpleNameCatalog(models.Model): name = models.CharField()

Re: Converting a string representation of query to Django object (Q).

2012-02-22 Thread gowthaman ramasamy
True. But, Michael, your answer actually taught me another cool way i did not know before. So, thanks a bunch for that. -- 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/dj

Re: Converting a string representation of query to Django object (Q).

2012-02-22 Thread Michael Elkins
On Wed, Feb 22, 2012 at 02:04:37PM -0800, Matt Schinckel wrote: The other option, which should work in your case: expcodes = ['...', '...'] Result.objects.filter(analysis__experiment__experiment_code__in=expcodes) Q objects are great, but not always needed. I agree that this is the better

Re: Converting a string representation of query to Django object (Q).

2012-02-22 Thread gowthaman ramasamy
Wonderful! Both of them worked. Very importantly, both answers taught me new things. Thanks Matt. Thanks Michael. -- 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-u

Re: About managing dependencies in a collaborative development team and good practices.

2012-02-22 Thread Matt Schinckel
Not sure if it was mentioned earlier in this thread (couldn't find it), but what some people miss is that virtualenv is not just for development. You can, and should, deploy to a virtualenv on your server too. Matt. -- You received this message because you are subscribed to the Google Groups

Re: Converting a string representation of query to Django object (Q).

2012-02-22 Thread Matt Schinckel
The other option, which should work in your case: expcodes = ['...', '...'] Result.objects.filter(analysis__experiment__experiment_code__in=expcodes) Q objects are great, but not always needed. Matt. -- You received this message because you are subscribed to the Google Groups "Django

Re: Converting a string representation of query to Django object (Q).

2012-02-22 Thread Michael Elkins
On Wed, Feb 22, 2012 at 01:15:04PM -0800, gowthaman ramasamy wrote: I am trying to construct the following query at the end. Result.objects.filter(Q(analysis__experiment__experiment_code="PyLS24") |Q(analysis__experiment__experiment_code="PyLS40")) How I do now: The values are passed from a from

Login failing

2012-02-22 Thread Aryeh Leib Taurog
I'm seeing a very strange intermittent problem with logging in. The login appears to be successful, because the response to the login POST is a 302 redirect. However sometimes the user doesn't seem to be stored in the session. Here's a snippet from my http access log where my testing app was red

Converting a string representation of query to Django object (Q).

2012-02-22 Thread gowthaman ramasamy
Hi List, I am just starting to build an application using Django. And my first attempt outside of procedural PHP and Perl-CGI. I am already loving it so much (and ditched other two already). I am trying to construct the following query at the end. Result.objects.filter(Q(analysis__experiment__ex

Re: psycopg2, postgres9.1, Mac OS - problem with psycopg2

2012-02-22 Thread Jeff Heard
Just as a followup to this, there are a few problems that have been patched on Django with regards to Postgres 9.1. They're not in the stable release, but if you're using custom binary fields, such as PostGIS geometry, you will need to search for the patch and apply it. You may see '\x00' is not

Re: psycopg2, postgres9.1, Mac OS - problem with psycopg2

2012-02-22 Thread Shawn Milochik
You can either add the proper path of pg_config to your PATH, or just extract the psycopg2 and add the full path to pg_config into the config file it contains then run 'python setup.py install' on the setup.py in the package. -- You received this message because you are subscribed to the Googl

Re: Need help on a (maybe complex) query with aggregate/annotate

2012-02-22 Thread Enrico
Works like a charm. Thanks! Ciao Enrico On Feb 21, 11:06 pm, Michael Elkins wrote: > On Tue, Feb 21, 2012 at 01:10:28PM -0800, Enrico wrote: > >But your query counts all the books, even the bad ones. I only need to > >count the good ones... > > >For example, if my books are: > > >1. name: LOTR,

psycopg2, postgres9.1, Mac OS - problem with psycopg2

2012-02-22 Thread Anna
Hello, I'm trying to install psycopg2 with PostgresSQL 9.1 using Python 2.6 on a Mac OS X 10.6.8 with Django. I placed the psycopg2 folder under Python 2.6 and added the following lines to setup.cfg include_dirs=/Library/PostgreSQL/9.1/include library_dirs=/Library/PostgreSQL/9.1/lib pg_config=/Li

How to soft delete many to many relation with Django

2012-02-22 Thread trudoe
A couple of days ago, I asked a question on StackOverflow about many- to-many relation and soft deletion (see http://stackoverflow.com/q/9374962/42024). I got a single answer telling me that I most likely bumped into a bug and filed one (see https://code.djangoproject.com/ticket/17746). It was lat

Re: django 1.1: nonexistent URLs display 500.html instead of 404.html

2012-02-22 Thread Ian Clelland
On Tue, Feb 21, 2012 at 5:33 PM, rabousha wrote: > Yes, only for TEMPLATE_CONTEXT_PROCESSORS, the commas aren't added by > default after the strings. I suspect it's an old bug. > > TEMPLATE_CONTEXT_PROCESSORS = ( >'django.core.context_processors.auth' >'django.core.context_processors.debu

Re: About managing dependencies in a collaborative development team and good practices.

2012-02-22 Thread Javier Guerra Giraldez
On Wed, Feb 22, 2012 at 9:17 AM, Santiago Basulto wrote: > I'm unsing virtualenvs and Pip. Seems great, is really easy that way. > > What about deployment? Will it be simple? Or should i care about the > specific webserver? on deployment there should be a 'real' webserver (as opposed to the devel

Re: Django and social network

2012-02-22 Thread Alec Taylor
k If you have issues, read the docs. If you still have issues, ask on pinax-users mailing-list not django-users. On Thu, Feb 23, 2012 at 3:57 AM, Lewis Satini wrote: > and I can only install basic, I had problem getting the advance install > > > On Wed, Feb 22, 2012 at 11:57 AM, Lewis Satini wr

Re: social networks

2012-02-22 Thread yati sagade
I have always used the FB API using core Python urllib and other helpers(after reading the FB API docs, of course), but you may find this this and thishelpful. On Wed, Feb 22, 2012 at 1

Re: Calling "manage.py shell" from the Python Shell in Tutorial Part 1

2012-02-22 Thread Bill Freeman
1. There is more information in that traceback (that you didn't include) that could help you find your indentation error. 2. It is quite useful, presuming that you are also a python beginner, to do the tutorial at: http://docs.python.org/tutorial/index.html Bill On Tue, Feb 21, 2012 at 6:4

Re: Django and social network

2012-02-22 Thread Lewis Satini
and I can only install basic, I had problem getting the advance install On Wed, Feb 22, 2012 at 11:57 AM, Lewis Satini wrote: > How much experience do you have on pinax. Did you implemented before? do > you have the sample site, that I might able to look at? it is difficult to > install, because

Re: Django and social network

2012-02-22 Thread Lewis Satini
How much experience do you have on pinax. Did you implemented before? do you have the sample site, that I might able to look at? it is difficult to install, because it have some requirement before you install it. On Wed, Feb 22, 2012 at 11:04 AM, Alec Taylor wrote: > Pinax > > http://pinaxproject

social networks

2012-02-22 Thread dummyman dummyman
hi, How to access facebook apis inside python script ? I am using django framework -- 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 t

Re: Django and social network

2012-02-22 Thread Alec Taylor
Pinax http://pinaxproject.com/ On Thu, Feb 23, 2012 at 1:50 AM, Lewis wrote: > I am new in Django. I know it is a good platform. > I want to know if there's any plug-ins or script that do social > networking. I research on Pinax, but it seem very difficult to set it > up. These are the feature t

Re: Django TypeError

2012-02-22 Thread Tom Evans
On Wed, Feb 22, 2012 at 2:28 PM, coded kid wrote: > I've changed it! > def get_absolute_url(self): >        #return u"%s" % (self.user) >        return u"/%i/%i/%i/%s/" % (self.date.year, self.date.month, > self.date.day, self.id) > but I'm getting page not found, This URL must match a URL in you

Re: Django TypeError

2012-02-22 Thread coded kid
(r'^comments/posted/$', 'myweb.meekapp.views.comment_posted' ), On Feb 22, 3:37 pm, Ejah wrote: > How does your urls.py look? > > On 22 feb, 15:28, coded kid wrote: > > > > > > > > > I've changed it! > > def get_absolute_url(self): > >         #return u"%s" % (self.user) > >         return u"/%

Django and social network

2012-02-22 Thread Lewis
I am new in Django. I know it is a good platform. I want to know if there's any plug-ins or script that do social networking. I research on Pinax, but it seem very difficult to set it up. These are the feature that I want to implement: 1. Profile system that link to their facebook or google profile

Re: Django TypeError

2012-02-22 Thread Ejah
How does your urls.py look? On 22 feb, 15:28, coded kid wrote: > I've changed it! > def get_absolute_url(self): >         #return u"%s" % (self.user) >         return u"/%i/%i/%i/%s/" % (self.date.year, self.date.month, > self.date.day, self.id) > but I'm getting page not found, > > Page not foun

Re: Django TypeError

2012-02-22 Thread coded kid
I've changed it! def get_absolute_url(self): #return u"%s" % (self.user) return u"/%i/%i/%i/%s/" % (self.date.year, self.date.month, self.date.day, self.id) but I'm getting page not found, Page not found (404) Request Method: GET Request URL:http://127.0.0.1:8000/2012/2

Re: Django TypeError

2012-02-22 Thread coded kid
Thanks for the reply! But it's still not working. Should I put 5 !=4 below the return in models.py? On Feb 22, 3:15 pm, Thomas Rega wrote: > Am 22.02.12 15:11, schrieb coded kid: > > >   return u"/%i/%i/%i/sol/%i/%s/" % (self.date.year, > > self.date.month, self.date.day, self.id) > > 5 != 4 > >

Re: About managing dependencies in a collaborative development team and good practices.

2012-02-22 Thread Santiago Basulto
Thank you guys. I'm unsing virtualenvs and Pip. Seems great, is really easy that way. What about deployment? Will it be simple? Or should i care about the specific webserver? Thanks! On Feb 21, 1:21 pm, Tom Evans wrote: > On Tue, Feb 21, 2012 at 3:54 PM, Shawn Milochik wrote: > > On 02/21/201

Re: Django TypeError

2012-02-22 Thread Thomas Rega
Am 22.02.12 15:11, schrieb coded kid: return u"/%i/%i/%i/sol/%i/%s/" % (self.date.year, self.date.month, self.date.day, self.id) 5 != 4 cheers ... -- http://thoreg.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gr

Django TypeError

2012-02-22 Thread coded kid
Hi Guys, I’m trying to override django comments by not redirecting users to “Thanks For The Comment” page. After inserting the codes, I’m getting an Error: TypeError at /comments/posted/ not enough arguments for format string Request Method: GET Request URL: http://127.0.0.1:8000/comments/posted/?

Update primary key and update child tables

2012-02-22 Thread Thomas Guettler
I wrote a small snippet to update a primary key and update all child tables, which have a foreign-key to this table: http://djangosnippets.org/snippets/2691/ Usage: manage.py update_primary_key table_name column_name value_old value_new It uses the django db introspection (not the ORM ). Th

TemplateResponse way of handling RequestContext

2012-02-22 Thread dizzydoc
Hi, I was working around with middleware to use process_template_response which is triggered when a view returns a TemplateReponse obj. I simply tried using TemplateReponse to replace render_to_response so that i get a handle of my view data in the middleware definition process_template_response w

Re: import selenium

2012-02-22 Thread Sébastien Billion
Sorry for that 2012/2/22 Tom Evans > On Wed, Feb 22, 2012 at 11:49 AM, Sébastien Billion > wrote: > > Hi, > > > > Maybe you missed to add selenium in INSTALLED_APP in settings.py ... > > > > selenium is not a django app, it is a python library: > > http://pypi.python.org/pypi/selenium > > Only

Re: import selenium

2012-02-22 Thread Tom Evans
On Wed, Feb 22, 2012 at 11:49 AM, Sébastien Billion wrote: > Hi, > > Maybe you missed to add selenium in INSTALLED_APP in settings.py ... > selenium is not a django app, it is a python library: http://pypi.python.org/pypi/selenium Only django apps need to go in INSTALLED_APPS. Please don't blin

Re: import selenium

2012-02-22 Thread Sébastien Billion
Hi, Maybe you missed to add selenium in INSTALLED_APP in settings.py ... 2012/2/22 xina towner > Hello, I've problems importing selenium module, I try this: > > from selenium import webdriver > > and it says it can resolve. I've installed selenium using pip install > selenium. > > What am I mis

import selenium

2012-02-22 Thread xina towner
Hello, I've problems importing selenium module, I try this: from selenium import webdriver and it says it can resolve. I've installed selenium using pip install selenium. What am I missing? -- Thanks, Rubén -- You received this message because you are subscribed to the Google Groups "Djang

Re: Validation For all form fields in Django templates

2012-02-22 Thread Sébastien Billion
Hi, You can generate a form easily with django ModelForm and add jquery ajax validation over. 2012/2/22 shaini sasidhar > How can I do the automatic client side form validation in django? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. >

Re: import error

2012-02-22 Thread Sébastien Billion
Hi, I didn't know this tip! Shame on me. Thanks for this 2012/2/22 dummyman dummyman > Hi i fixed the error . I didnt add the parent directory of project to > sys.path.append in the standalone script thanks > > > On Wed, Feb 22, 2012 at 10:35 AM, kalyani ram wrote: > >> every time you import so