Re: HttpResponseRedirect adds hostname?

2011-08-23 Thread Jacob Kaplan-Moss
On Tue, Aug 23, 2011 at 3:50 PM, Roy Smith wrote: > Why does it do this?  It seems like it should just take the string I passed > it and stick that into the header, no? No - that might seem intuitive, but it's incorrect. The HTTP standard specifies that the Location header

Re: HttpResponseRedirect adds hostname?

2011-08-23 Thread Jacob Kaplan-Moss
On Tue, Aug 23, 2011 at 4:01 PM, Jacob Kaplan-Moss wrote: > However, I believe it's not actually Django doing the rewriting. Scratch that: I'm wrong. Actually, Django *is* doing the re-writing: see https://code.djangoproject.com/browser/django/trunk/django/http/utils.py#L11.

Re: HttpResponseRedirect adds hostname?

2011-08-23 Thread Roy Smith
Thanks for the explanation. We ended up re-arranging which pieces were listening on which ports so the nginx front end is on port 80. Reading the nginx docs, it seems like we might have been able to make our current set up do what we wanted, but shuffling the ports was easier :-) Regarding:

Re: Problem updating data

2011-08-23 Thread Karen McNeil
No, that's not the problem. Even if I redo the query now, I still get the same count (see below). And, like I said, the change does not show up in the admin either -- THE VALUE HAS NOT BEEN CHANGED. This behavior is so unexpected I'm not sure how to even begin trouble- shooting it. ~Karen PS --

pydra

2011-08-23 Thread hinnack
hi all, Anyone ever used pydra? http://code.osuosl.org/projects/pydra/wiki could not find a thread on the list... Regards Henrik -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Problems on using multiple databases

2011-08-23 Thread Jim
Still stuck on this problem. Can anybody help me out, please? It would be much appreciated. -- 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/-/K9twgNZcE4IJ.

saving several models with one save() call

2011-08-23 Thread ernando
Hi all, maybe it's newbie question but I wasn't able to find clear answer/ solution on it. For example, we have the following models: class A(models.Model): id = models.AutoField(primary_key=True) title = models.CharField(max_length=30) class B(models.Model): id =

Re: Could not connect postgresql database

2011-08-23 Thread SSozuer
I solved the problem. I just added, LD_LIBRARY_PATH=/usr/local/pgsql/lib PATH=/usr/local/pgsql/bin:$PATH lines to my .bashrc startup shell. After that there is no error. Selcuk On Aug 23, 10:50 pm, Landy Chapman wrote: > I reinstalled postgresql after deleting

Re: saving several models with one save() call

2011-08-23 Thread SSozuer
Exactly i dont know OneToOneField() field's data type. But you can try that, b=B(title='333', altems = a.id) b.save() On Aug 24, 1:28 am, ernando wrote: > Hi all, > > maybe it's newbie question but I wasn't able to find clear answer/ > solution on it. > > For example,

Re: saving several models with one save() call

2011-08-23 Thread SSozuer
sorry, i forgot to mentioned that you first save the A object. On Aug 24, 1:28 am, ernando wrote: > Hi all, > > maybe it's newbie question but I wasn't able to find clear answer/ > solution on it. > > For example, we have the following models: > > class A(models.Model):

Re: Django testing with existing data

2011-08-23 Thread Russell Keith-Magee
On Tue, Aug 23, 2011 at 9:15 PM, Carlos Brum wrote: > Hello guys, > > I'm new in Django testing whith django test facilities. > > I've read "https://docs.djangoproject.com/en/1.3/topics/testing/; but > couldn't find what i'm looking for. > > I'm trying to begin TDD

Re: can django be used in destop application?

2011-08-23 Thread Sam Walters
Seriously why bother? http://www.wxpython.org/ The whole front end of django is too web-centric. So the only thing that might be of use is if you have an existing web application which heavily uses the django ORM and you want back end consistency with a desktop GUI application that shares thee

Re: Django Development environment

2011-08-23 Thread Matt Schinckel
OS: - Mac OS X (Lion / Snow Leopard, depending on machine). Editor: - Formerly TextMate, now BBEdit Database: - Postgres installed locally General (python/os) tools: - virtualenv, pip, fabric, mercurial, git (for -e installation of dev versions on github) Server tools: - memcached, Werkzeug

Re: why can't I access a dictionary with an initial form field value from my django template?

2011-08-23 Thread Tony Schmidt
Thanks, Reinout. I wound up creating a custom "getter" filter so I could do {{ MYDICT| get:myform.somefiled.value }} - which I'm surprised isn't a built-in, actually. But I think your suggestion is a good alternative. Tony On Aug 23, 1:40 pm, Reinout van Rees wrote: > On

Re: can django be used in destop application?

2011-08-23 Thread Andre Terra
Better yet, http://www.riverbankcomputing.co.uk/software/pyqt/download Cheers, AT On Tue, Aug 23, 2011 at 8:59 PM, Sam Walters wrote: > Seriously why bother? > > http://www.wxpython.org/ > > The whole front end of django is too web-centric. So the only thing > that might

Re: Could not connect postgresql database

2011-08-23 Thread Landy Chapman
Great job. You could've told everyone that you had a working install and decided to break it & install from source code. but oh well. OSS truly is the ultimate, when you break it you get to keep both pieces :-; For the record: why did you install from source instead of using Ubuntu

Re: django.contrib.markup question

2011-08-23 Thread Rodney Topor
OK. I found the answer to my own question. Page 128 of Practical Django Projects, 2nd Edition, by James Bennett gives the solution. Write the following: {{ input_text|markdown:"safe" }} Note there must be no space between the colon and the quote, despite what is in the book. Note also that

Re: TabularInline save_model()?

2011-08-23 Thread Lee
Jeez what an easy solution, but I sure with InlineModelAdmin would just do it for us and save us the code. In models.py (genericized and not tested, sorry for any syntax errors): class MyJoinTable(model.Model): parent_table = models.ForeignKey(ParentTable) ... def

How to make an app independent on a specific site?

2011-08-23 Thread Jim
Greetings, everyone. I am new to Django, and much of my knowledge comes from the Django book version 2 . In the book, a site, mysite, is created for demo purposes. And an app, books, is also created for demo purposes. In the file, mysite/books/admin.py, there

Re: How to make an app independent on a specific site?

2011-08-23 Thread Jim
BTW, the way I posted above isn't so elegant. Is there a better way to do this? Any thoughts? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit

Re: How to make an app independent on a specific site?

2011-08-23 Thread Mike Dewhirst
On 24/08/2011 2:09pm, Jim wrote: Greetings, everyone. I am new to Django, and much of my knowledge comes from the Django book version 2 . In the book, a site, mysite, is created for demo purposes. And an app, books, is also created for demo purposes. In the

Need help on admin page

2011-08-23 Thread Temulen Odbayar
I don't understand about admin page site thing. What should i do with this thing??? Sorry my bad english. Any help ^__^ -- 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

Re: Need help on admin page

2011-08-23 Thread Kejun He
Visit the django official document about admin https://docs.djangoproject.com/en/1.3//ref/contrib/admin/ On Tue, Aug 23, 2011 at 2:01 PM, Temulen Odbayar wrote: > I don't understand about admin page site thing. What should i do with > this thing??? Sorry my bad english. Any

Re: Quick question on importing

2011-08-23 Thread raj
Ya, well i got it to work by adding the project in front of it. Thank you for the help! On Aug 23, 1:55 am, Mike Dewhirst wrote: > On 23/08/2011 3:29pm, raj wrote:> I am editing my user model, and I want to > place a foreign key to a > > class in another model, that is in

Weird Model question django

2011-08-23 Thread raj
This may be difficult to explain. I'm a little new to django and the whole idea of models. Let's say I'm making an article app, where each article has a creator, but other users can edit the article at will. I'm having a little difficult on how to create the models for this. Firstly, I extend

Re: Weird Model question django

2011-08-23 Thread raj
nvm, I think i'm starting to figure it out. Need to read up on many-to- many fields. On Aug 23, 2:21 am, raj wrote: > This may be difficult to explain. I'm a little new to django and the > whole idea of models. > > Let's say I'm making an article app, where each article has

Re: What I am missing is this Django "logout"?

2011-08-23 Thread Andre Lopes
Hi, thanks your your reply. And what should be the right way of doing this? Best Regards, On Sun, Aug 21, 2011 at 5:00 AM, Subhranath Chunder wrote: > No, it's working is not a mistake by itself. Because now, the regular > expression is extracting an absolute path, and

2 url template tag questions

2011-08-23 Thread Yaşar Arabacı
Hi, If a use url template tag on a generic view, does urls.py supply required arguments? For example: urlpatterns = patterns('django.views.generic.date_based', (r'^arsiv/(?P\d{4})/$','archive_year',{ 'template_name' : 'blog/yillar.html', 'date_field' : 'pub_date',

Re: Weird Model question django

2011-08-23 Thread robin nanola
what is the use of the article foreignkey in the UserProfile model? On Tue, Aug 23, 2011 at 2:34 PM, raj wrote: > nvm, I think i'm starting to figure it out. Need to read up on many-to- > many fields. > > On Aug 23, 2:21 am, raj wrote: > > This may

Bumper DjangoCon this year

2011-08-23 Thread Steve Holden
Early signs were that we would comfortably break the 255 limit we had to place on last year. This year, with the change of venue, we can accommodate more delegates. Just as well, because today the attendance went past the 300 mark with two weeks still to go! Thanks to everyone who is supporting

Re: Newbe DateTimeField Question

2011-08-23 Thread Torsten
Thanks for that, but I still get the error message: Exception Type: IntegrityError Exception Value:invoice_invoice.payed_at may not be NULL here my models.py: from django.db import models class Customer(models.Model): company = models.CharField(max_length=255) branch =

Re: message mark_safe and redirect results in message still showiing with encoded tags

2011-08-23 Thread Leon van der Ree
Thanks Andy that explains why I experience this issue. However doesn't it suppose to work like this; Why should a safe string become unsafe again after deserialisation? I understand this is a current limitation of the serialisation process, but this is not exactly what you would expect, is it. So

Debud setting behaves weird

2011-08-23 Thread Yaşar Arabacı
Hi, When I set debug=True in my settings module, my static files work. When I set it to False, I get 404 on my static files. Anyone has an ide what is going on here? -- http://yasar.serveblog.net/ -- You received this message because you are subscribed to the Google Groups "Django users"

django.contrib.markup question

2011-08-23 Thread Rodney Topor
Um, Markdown is supposed to allow users to enter marked-up text safely, isn't it? But the output of the markdown filter is assumed to be safe. Writing {{ input_text|escape|markdown }} in a template doesn't appear to escape raw HTML in the input text before the markdown filter is applied. So how

Re: Debud setting behaves weird

2011-08-23 Thread Kejun He
Hi Which platform did your project run? On the development platform or the publishing platform ? 2011/8/23 Yaşar Arabacı > Hi, > > When I set debug=True in my settings module, my static files work. When I > set it to False, I get 404 on my static files. Anyone has an ide

Re: Debud setting behaves weird

2011-08-23 Thread Yaşar Arabacı
I normally use my linux platform, but I am on my brothers computer which is a win xp. I am on development server. And I just found out that I get 404 because I didn't had 500 template. Now I am getting my 500 template. So here is sum of what is happening: go to a static file while django dev

Re: Debud setting behaves weird

2011-08-23 Thread Martin J. Laubach
You might want to read the documentation at https://docs.djangoproject.com/en/1.3/ref/contrib/staticfiles/ -- especially the big boxes labelled "Warning". mjl -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on

Re: Debud setting behaves weird

2011-08-23 Thread Yaşar Arabacı
This makes sense :) Warning This view will only work if DEBUG is True. That's because this view is *grossly inefficient* and probably *insecure*. This is only intended for local development, and should *never be used in

Python requests library

2011-08-23 Thread Cal Leeming [Simplicity Media Ltd]
Nice looking library here: https://github.com/kennethreitz/requests Well over due, the amount of times I've had to monkey patch urllib2 to make it do the most simplest of things is unreal :X -- You received this message because you are subscribed to the Google Groups "Django users" group. To

syntax highlighting for template files and file suffix

2011-08-23 Thread Gelonida N
Hi, I'm rather new to Django and just start working with a little more with templates. I wondered how to make a distinction between html files and html templates. Shall I used different suffixes or is the directory location enough. If I don't have different file suffixes, how do you teach your

can django be used in destop application?

2011-08-23 Thread smith jack
i mean not use django for web site development, but for desktop application, it seems its orm can be used in destop application, isn't it? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Admin staticfiles stubbornly hiding behind 404s

2011-08-23 Thread Caomhin
I confess, I'm lost! I've just tried starting my first new site since upgrading to Django 1.3 and the new staticfiles settings seem to be taunting me. I've tried a number of variations but every setting I have returns a 404 for the admin interface css. Here's what I have just now: MEDIA_URL =

Re: syntax highlighting for template files and file suffix

2011-08-23 Thread Herman Schistad
On Tue, Aug 23, 2011 at 13:09, Gelonida N wrote: > I'm rather new to Django and just start working with a little more with > templates. > > I wondered how to make a distinction between html files and html templates. > > Shall I used different suffixes or is the directory

rich text field editor in admin panel with inlines?

2011-08-23 Thread EricSI
Hello all, First a little background on what is installed: django django-cms django-filer cmsplugins-filer I'm working on a project where the admin panel for a 'Product' needs to have a rich text editor for several textfields. I have found several examples of how to incorporate this but none

Re: Django Development environment

2011-08-23 Thread Raul Alejandro Ascencio Trejo
Emacs (https://code.djangoproject.com/wiki/Emacs), Postgre... :| 2011/8/22 Mario Gudelj > Mac, sqlite, Eclipse with Pydev or AquaMacs, apache > > > On 23 August 2011 13:06, Jani Tiainen wrote: > >> Ubuntu or windows, eclipse with pydev, apache, nginx,

What is Django?

2011-08-23 Thread Julian
Is there any document available that describes WHAT Django is? I am not looking for an installation guide, neither for tutorial, nor for "Django is a high-level Python Web framework". But: What does this framework include? What is it used for? How does it increase productivity? Why shouldn't I use

Re: What is Django?

2011-08-23 Thread Karen Tracey
On Tue, Aug 23, 2011 at 8:01 AM, Julian wrote: > Is there any document available that describes WHAT Django is? I am > not looking for an installation guide, neither for tutorial, nor for > [snipped] Perhaps the overview:

Re: syntax highlighting for template files and file suffix

2011-08-23 Thread Paul Schewietzek
With vim, you can ':setfiletype htmldjango' for django templates (on Debian 6 at least). Hope that helps. 2011/8/23 Herman Schistad > On Tue, Aug 23, 2011 at 13:09, Gelonida N wrote: > > I'm rather new to Django and just start working with a

Re: Django Development environment

2011-08-23 Thread Andre Terra
Aptana (aka Eclipse/Pydev) for no reason other than hyperlinks in the code Vim/Notepad++ on occasion virtualenv, git, pip, ack (grep on steroids) nginx (proudly compiled from source with custom modules!) ubuntu 10.04 (will only upgrade to LTS releases) or windows xp. All of these tools are

Re: Django Development environment

2011-08-23 Thread Yaşar Arabacı
Development setup (when on my own comp.): arch linux, vim or leafpad, sqlite, django development server Development setup (when on my brothers comp): cygwin, notepad++, sqlite, django development server (both inside and outside of cygwin to make sure everything is same.) Deployment: ubuntu

Could not connect postgresql database

2011-08-23 Thread SSozuer
Hi guys, When i was checking the database connection,i am taking that error: File "", line 1, in File "/usr/local/lib/python2.7/dist-packages/django/db/backends/ __init__.py", line 250, in cursor cursor = self.make_debug_cursor(self._cursor()) File

Re: Django Development environment

2011-08-23 Thread Thorsten Sanders
IDE: PyCharm (its for python with django support,not free but love it and not to expensive) Database: mysql/postgresql Standard apps: south (really a must have to apply database changes easy) debug_toolbar Am 23.08.2011 14:47, schrieb Yas,ar Arabac?: Development setup (when on my own

Re: Could not connect postgresql database

2011-08-23 Thread SSozuer
In addition i can connect database with pgAdmin III without any error... On Aug 23, 4:05 pm, SSozuer wrote: > Hi guys, > When i was checking the database connection,i am taking that error: > >  File "", line 1, in >   File

Re: Django Development environment

2011-08-23 Thread Pavlo Kapyshin
Xmonad, emacs, vim, git, darcs, nginx, supervisord, misultin, mochiweb, haskell, bash, zsh, httperf, rabbitmq, zeromq. Things I use for Django-specific development: ipdb, rdb, ipython, private forks of third-party Django apps, virtualenv and pip. I don’t use automatic database migration tools,

Django testing with existing data

2011-08-23 Thread Carlos Brum
Hello guys, I'm new in Django testing whith django test facilities. I've read "https://docs.djangoproject.com/en/1.3/topics/testing/; but couldn't find what i'm looking for. I'm trying to begin TDD development but wanna use my old data. I don't wanna have to build up all my database again. I

Custom attributes of Form Fields

2011-08-23 Thread vpetkov
Hi, I have run into a problem that doesn't seem to have a trivial solution in Django: I would like to have a form field that contains parts of the html output so that it is not rendered directly by Widget.render(), but in the template itself. On a more concrete basis, let there be a

Re: 2 url template tag questions

2011-08-23 Thread Tom Evans
2011/8/23 Yaşar Arabacı : > Hi, > If a use url template tag on a generic view, does urls.py supply required > arguments? For example: > urlpatterns = patterns('django.views.generic.date_based', >     (r'^arsiv/(?P\d{4})/$','archive_year',{ >             'template_name' :

Re: Model caching per python session

2011-08-23 Thread Julian Hodgson
FYI: this does the trick: from django.db import connection connection.close() On Tue, Aug 23, 2011 at 12:29 AM, Julian Hodgson < julian.of.lon...@googlemail.com> wrote: > Ok, that makes sense. > > The thing is, we've written some python plugins for Softimage to read and > write to the db that

Re: Problem updating data

2011-08-23 Thread Shawn Milochik
The main issue is that your queryset entries wasn't refreshed from the database. Do your queryset again and you'll see one fewer. Also, instead of zero you should use False when querying a boolean field. Shawn -- You received this message because you are subscribed to the Google Groups

Re: message mark_safe and redirect results in message still showiing with encoded tags

2011-08-23 Thread Andy McKay
On 2011-08-23, at 1:08 AM, Leon van der Ree wrote: > that explains why I experience this issue. However doesn't it suppose > to work like this; Why should a safe string become unsafe again after > deserialisation? I understand this is a current limitation of the > serialisation process, but this

Re: can django be used in destop application?

2011-08-23 Thread Andy McKay
On 2011-08-23, at 4:17 AM, smith jack wrote: > i mean not use django for web site development, but for desktop application, > it seems its orm can be used in destop application, isn't it? Yes. -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you

Re: can django be used in destop application?

2011-08-23 Thread Yaşar Arabacı
I had written something about this earlier, Although the article is in Turkish, you can still understand the django part I guess. It demonstrates how to use django component with other applications, by creating a dummy package manager.

Re: syntax highlighting for template files and file suffix

2011-08-23 Thread Tom Evans
On Tue, Aug 23, 2011 at 12:09 PM, Gelonida N wrote: > Hi, > > I'm rather new to Django and just start working with a little more with > templates. > > I wondered how to make a distinction between html files and html templates. > > Shall I used different suffixes or is the

Re: Could not connect postgresql database

2011-08-23 Thread Simon Riggs
On Tue, Aug 23, 2011 at 2:05 PM, SSozuer wrote: >        Is the server running locally and accepting >        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL. > 5432"? Try connecting on the local system. I would guess you can't. It looks like you have a

Re: Model caching per python session

2011-08-23 Thread Tom Evans
On Tue, Aug 23, 2011 at 3:15 PM, Julian Hodgson wrote: > FYI: this does the trick: > > from django.db import connection > connection.close() > This should work better: from django.db import transaction transaction.enter_transaction_management()

Re: Could not connect postgresql database

2011-08-23 Thread SSozuer
l checked the /var/run/postgresql/... directory. But there is no directory called that. I'll reinstall postgresql from package, the current was installed from source code thanks for advice Selcuk On Aug 23, 6:06 pm, Simon Riggs wrote: > On Tue, Aug 23, 2011 at 2:05 PM,

Re: extending the User profile - which way to go?

2011-08-23 Thread Tom Evans
On Sun, Aug 21, 2011 at 2:52 PM, Matt Schinckel wrote: > You haven't really provided a reason why to 'do it the django way', rather > than inheriting from User. Here is the top one: Extending the user object will make your project incompatible with 3rd party pluggable apps,

Re: Could not connect postgresql database

2011-08-23 Thread Landy Chapman
> > On Tue, Aug 23, 2011 at 2:05 PM, SSozuer wrote: > > >        Is the server running locally and accepting > > >        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL. > > > 5432"? > > > Try connecting on the local system. I would guess you can't. It

Re: can django be used in destop application?

2011-08-23 Thread Subhranath Chunder
If ORM is what you are looking for, then you could try SQLAlchemy. On Tue, Aug 23, 2011 at 4:47 PM, smith jack wrote: > i mean not use django for web site development, but for desktop > application, > it seems its orm can be used in destop application, isn't it? > > -- >

Re: Could not connect postgresql database

2011-08-23 Thread Landy Chapman
Also did the the server actually start? On debian, /etc/init.d/postgresql start > > > Try connecting on the local system. I would guess you can't. It looks > > > like you have a problem with the socket directory. Permissions? > > remember to edit postgresql.conf -- make sure to change >  

Re: Could not connect postgresql database

2011-08-23 Thread SSozuer
Settings in postgresql.conf are ok. And also postgresql is running without no problem. As i said, i can connect database with pgAdmin with no error. Selcuk On Aug 23, 8:03 pm, Landy Chapman wrote: > Also did the the server actually start?  On debian, >  

Re: Could not connect postgresql database

2011-08-23 Thread Subhranath Chunder
You may try to test the connection using the command line interface 'psql'. On Tue, Aug 23, 2011 at 10:39 PM, SSozuer wrote: > Settings in postgresql.conf are ok. And also postgresql is running > without no problem. As i said, i can connect database with pgAdmin > with

Re: dynamic field display

2011-08-23 Thread Subhranath Chunder
Manipulating the form instance attributes at runtime in your view might be possible by modifying some internal fields, but that leads to dirty code and not-so-clean views. You can rather use different django forms with different field definitions in your view. This might be the cleanest. You can

Custom Validation on Inline Generic Foreign Key

2011-08-23 Thread John
Hi there, I am writing an app with Django where I have a model with a generic foreign key. I am looking to do some validation on this model based on the content_type of the generic foreign key. When I am modifying this model on its admin page, I am able to easily determine the content_type

Re: can django be used in destop application?

2011-08-23 Thread Cal Leeming [Simplicity Media Ltd]
Curious concept, using Django for a desktop application. Can't think of any reason why you couldn't at least try it :) Cal On Tue, Aug 23, 2011 at 3:49 PM, Andy McKay wrote: > > On 2011-08-23, at 4:17 AM, smith jack wrote: > > > i mean not use django for web site

Re: Could not connect postgresql database

2011-08-23 Thread SSozuer
i am taking error below: psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL. 5432"? but there is no such a .s.PGSQL.5432 file. I really dont understand what is

Re: Django Development environment

2011-08-23 Thread Mike Seidle
On Monday, August 22, 2011 06:07:24 PM Stephen Jackson wrote: > I am new to the world of Django. I would like to hear from other django > developers describe their dev environment (tools, os, editors, etc.). Dev: Kubuntu (Natty), Emacs (sometimes Aptana), git, Cherokee (web server), MySQL

Re: Could not connect postgresql database

2011-08-23 Thread Subhranath Chunder
Seems to me like it has something to do with pg_hba.conf settings. Maybe you can try out by commenting out the existing entries in it, and inserting one specific to your requirement. You should probably try it out. And don't forget to restart the db server everytime you make a change. On Tue,

Re: Could not connect postgresql database

2011-08-23 Thread Landy Chapman
I apologize.. What user are you running psql as? Try this: cd /tmp su postgres createdb conntest psql -d conntest That should since you can connect from pgadmin. If it doesn't. run (as root) /etc/init.d/postgresql force-restart and try the above again. On the django side, I would

Re: Could not connect postgresql database

2011-08-23 Thread SSozuer
nothing changed... there are lots of questions about this problem on net , but there is no point solution On Aug 23, 9:09 pm, Subhranath Chunder wrote: > Seems to me like it has something to do with pg_hba.conf settings. > > Maybe you can try out by commenting out the

Re: Could not connect postgresql database

2011-08-23 Thread SSozuer
Guys, When i command ; postgres@laptop:~$ /usr/local/pgsql/bin/createdb test2db there is no problem and ".s.PGSQL.5432" file appeared in tmp directory which is ok according my postgresql.conf settings.But when i command; postgres@laptop:~$ psql test2db psql: could not connect to server: No such

Re: Could not connect postgresql database

2011-08-23 Thread bikkit
I might be completely stating the obvious, or something mentioned already, but ok, you create the database, but is the deamon running..? Sent from my BlackBerry® from Vodafone -Original Message- From: SSozuer Sender: django-users@googlegroups.com Date: Tue, 23

Re: Could not connect postgresql database

2011-08-23 Thread bikkit
Also, might be worth looking at the steps of this: Installing PostgreSQL on Ubuntu 11.04 using PPA: http://bit.ly/mTZcp4 Maybe you'll see something in the steps that will help you? Sent from my BlackBerry® from Vodafone -Original Message- From: SSozuer

Re: Could not connect postgresql database

2011-08-23 Thread Landy Chapman
> there are lots of questions about this problem on net , but there is > no point solution There's no FixItNow(tm) text that works for all use cases. Sometimes over-familiarity will cause maddening (though simple-to-fix) problems. My basic point is, since nothing you did solved the problem,

why can't I access a dictionary with an initial form field value from my django template?

2011-08-23 Thread Tony Schmidt
I thought this should be the proper syntax in my template: {{ MYDICT.myform.somefield.value }} But I get a "can't parse remainder error." Just putting {{ myform.somefield.value }} gives me "3" and {{ MYDICT. 3 }} gives me the dictionary value I want. Am I missing something? -- You received

Re: Could not connect postgresql database

2011-08-23 Thread Landy Chapman
Ignore my long-winded rant/reply above. the command should be psql -d test2db Cheers -- 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

Uniform database interaction API using django ORM

2011-08-23 Thread venky
Hi, I have a requirement to constantly update data in my database tables (after the final schema has been designed) based on some external data source. I have written scripts to auto populate them (create/modify/ delete entries). I have been using a crude method for database interactions and I am

Re: Could not connect postgresql database

2011-08-23 Thread SSozuer
You're so right, sorry about that. OS: ubuntu 11.04 Database: postgresql 8.4.8 Django Version: 1.3 All of them are running on same machine. I install the current postgresql database version from source code. I think i missed something related to enviroment variables. I think, i just need to

Re: Could not connect postgresql database

2011-08-23 Thread Landy Chapman
I reinstalled postgresql after deleting config files. in postgresql.conf I changed this line: # listen = "localhost" to read: listen = "*" Also make sure this line is uncommented: port = 5432 Then I restarted the server. /etc/init.d/postgresql restart One way to see if postgresql

Re: can django be used in destop application?

2011-08-23 Thread h3
Django is modular enough that most of its parts could probably be replaced with desktop oriented modules, like rendering QT templates instead of HTML templates.. which is great. If not you can probably use a embed browser engine (like webkit) and run your app like a website locally and get

Re: why can't I access a dictionary with an initial form field value from my django template?

2011-08-23 Thread Reinout van Rees
On 23-08-11 21:16, Tony Schmidt wrote: I thought this should be the proper syntax in my template: {{ MYDICT.myform.somefield.value }} But I get a "can't parse remainder error." Just putting {{ myform.somefield.value }} gives me "3" and {{ MYDICT. 3 }} gives me the dictionary value I want. Am

HttpResponseRedirect adds hostname?

2011-08-23 Thread Roy Smith
I've got a view which does returns HttpResponseRedirect('/'). When I look at the HTTP traffic in tcpdump, I can see that the location header has had the hostname added: Location: http://gilbert.lic.songza.com/ Why does it do this? It seems like it should just take the string I passed it and