Re: Problem loading integer data into database using fixture

2012-02-16 Thread Gchorn
Unfortunately, that doesn't seem to be the case. I have the database user and password in my settings.py file, but I still have to do a "sudo su postgres" to switch to postgres in the terminal before I can access my PostgreSQL database through the Django database API. Otherwise when I try to acces

Re: "DatabaseError: can't adapt type 'NavigableString'" when using psycopg2 and Django 1.3

2012-02-16 Thread kenneth gonsalves
On Thu, 2012-02-16 at 20:08 -0800, Matt Cotterell wrote: > project the 'production' server running on mod_python no longer works. mod_python is deprecated - use mod_wsgi -- regards Kenneth Gonsalves -- You received this message because you are subscribed to the Google Groups "Django users" gro

"DatabaseError: can't adapt type 'NavigableString'" when using psycopg2 and Django 1.3

2012-02-16 Thread Matt Cotterell
Hi guys! New poster here and django newbie, though I'm starting to get a handle on it now. One issue though which is preventing release of my project is a truely bizarre bug pertaining *purely* to postgres. I'm running Django (1.3.1) with psycopg2 (2.2.1) and despite everything working on the deve

Re: CSS reference to Media folder

2012-02-16 Thread Kolbe
Thanks guys for the valuable recommendations. I tried this one before > background-image: url(/media/images/base/ gradient2.png) Didn't work then, will give it a try later. *am loving django. Cheers! Max On Feb 16, 5:54 pm, MikeKJ wrote: > background-image: url(/media/images/base/gradient2.pn

Access denied - hostname is percent character ('%')?

2012-02-16 Thread Ishmael
I'm trying to follow the intro tutorial. I am able to log in to my database from the command line (and via MySQL Workbench) sans problem: However, after changing my settings file to the correct values, I get: _mysql_exceptions.OperationalError: (1044, "Access denied for user 'myuser'@'%' to databa

Re: Creating a hospital erp (hospital management) in Django

2012-02-16 Thread Alec Taylor
ModelForm On Thu, Feb 16, 2012 at 10:18 PM, Saadat wrote: > Hi all, I created a view today and I could access the database > contents using Templates. Now I wish to create a listbox that would > have the names of doctors. When an item from the list is selected, an > sql query should be sent which

serving files on shared server cause extra proccesses

2012-02-16 Thread Itai
Hi all! I have a big problem, and after reading tons of web pages I'm still stuck. IN SHORT: I'm on a shared server hosting with fastCGI (=no apache access) with no mod_xsendfile. I need to serve mp3 files of 2-3 minutes length after authentication. That view generates extra proccesses that neve

Re: import problem

2012-02-16 Thread Scott Macri
WEIRD. There must have been something messed up in my environment. I closed IDLE, deleted the dosomething.pyc file and reran the code. It seems to be working now. I didn't make any code changes so maybe something was in memory, who knows. I tried deleting the pyc file before and it didn't do a

Re: Problem loading integer data into database using fixture

2012-02-16 Thread Bill Freeman
The database user and *nix user are (typically) unrelated. The database user is specified in settings.py and there is also a password if necessary. Since one usually communicates with database servers using network connections (even on the same box), it doesn't really know what user a connection

Re: Problem loading integer data into database using fixture

2012-02-16 Thread Gchorn
Thanks very much for the reply. I went ahead and created a model instance using the API, and then tried to get a yaml dump of this. However, I'm running into another (newb) problem. The database I'm using is under a different username (I'm doing all of this in Ubuntu Linux 11.10), which I underst

Re: import problem

2012-02-16 Thread Furbee
He said he would do that later tonight. Furbee On Thu, Feb 16, 2012 at 2:04 PM, Dennis Lee Bieber wrote: > On Thu, 16 Feb 2012 13:41:32 -0500, Scott Macri > wrote: > > >I don't believe I have any circular imports in my code. I have a > >simple file dosomething.py, with a simple class containin

Re: import problem

2012-02-16 Thread Scott Macri
I don't believe I have any circular imports in my code. I have a simple file dosomething.py, with a simple class containing a simple function. dosomething.py def somefunction(some_date) At the tope of dosomething I have: import datetime in the somefunction def I have: start_date = datetime.date

Re: Django 1.4 beta 1 released

2012-02-16 Thread victoria
I just wanted to let you know that we have also released a new version of BitNami DjangoStack 1.4b1 which bundles Django 1.4b1. I hope that will make easier to test this new version without conflicting with your current stable environment. http://bitnami.org/stack/djangostack On Thu, Feb 16, 201

multiple valuesfor keyword arguement 'prefix'

2012-02-16 Thread Phil
Hi, I have a basic django blog built and am now trying to use generic views in it but am getting the following error, I'm not sure where I am going wrong: Environment: Request Method: GET Request URL: http://127.0.0.1:8080/blog/ Django Version: 1.3.1 Python Ve

Re: Help on forms.py

2012-02-16 Thread Stanwin Siow
Awesome! Thank you and have a great Weekend! :D Best Regards, Stanwin Siow On Feb 17, 2012, at 1:50 AM, Alasdair Nicol wrote: > Hi Stanwin, > > On 16/02/12 17:43, Stanwin Siow wrote: >> Hello, >> >> I'm trying to modify the default registration forms.py by adding in more >> fields. >> >>

Re: Help on forms.py

2012-02-16 Thread Alasdair Nicol
Hi Stanwin, On 16/02/12 17:43, Stanwin Siow wrote: Hello, I'm trying to modify the default registration forms.py by adding in more fields. Currently it's like that: = *keyword_info = {* *"queryset" : Keyword.objects.all(),* *}* class Regi

Help on forms.py

2012-02-16 Thread Stanwin Siow
Hello, I'm trying to modify the default registration forms.py by adding in more fields. Currently it's like that: = keyword_info = { "queryset" : Keyword.objects.all(), } class RegistrationForm(forms.Form): username = forms.RegexField(

Re: Sharing users db

2012-02-16 Thread Evgenii Belykh
it rocks Tom!! On Feb 16, 7:30 pm, Tom Evans wrote: > On Thu, Feb 16, 2012 at 4:00 PM, Evgenii Belykh wrote: > > Hi folks! > > > I've trying to use sharing db via technique proposed by Dustin at > > […] > >    def process_view(self, request, view_func, args, kwargs): > >        if request.path.

Re: Problem loading integer data into database using fixture

2012-02-16 Thread Bill Freeman
Well, I don't know yaml, but if you are in a place where you don't have to quote: Arron then I'd expect everything to be strings. Is there a yaml.dump that you can apply to a model with strings and integers to see how it thinks they are distinguished? On 2/16/12, Gchorn wrote: > Hello All,

Re: best example/tutorial for AJAX + Django

2012-02-16 Thread H.T. Wei
Thank you. On Thu, Feb 16, 2012 at 7:45 AM, Sushirod wrote: > Take a look into Pyjamas as well. > http://pyjs.org/ > > On Feb 15, 5:32 pm, "H.T. Wei" wrote: > > Hi, > > > > I am new to Django and searched around for a good example/tutorial about > > AJAX + Django but most of them were not consi

Re: import problem

2012-02-16 Thread DrBloodmoney
On Thu, Feb 16, 2012 at 9:20 AM, Scott Macri wrote: > DrBloodmoney I not sure what you mean by circular imports.  datetime > is the only import I have in this file. Here are examples of circular import problems [1][2] I am forever getting bitten by them, so it's become one of the first things th

Re: Sharing users db

2012-02-16 Thread Tom Evans
On Thu, Feb 16, 2012 at 4:00 PM, Evgenii Belykh wrote: > Hi folks! > > I've trying to use sharing db via technique proposed by Dustin at > […] >    def process_view(self, request, view_func, args, kwargs): >        if request.path.startswith('/admin'): >            request_cfg.admin = True > >    

Re: Logging from multiple processes

2012-02-16 Thread Alexey Luchko
Hi! We are using TimedRotatingFileHandler with overridden stream with a class that opens log file for append on every write. -- Regards, Alex. -- 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@go

Sharing users db

2012-02-16 Thread Evgenii Belykh
Hi folks! I've trying to use sharing db via technique proposed by Dustin at http://dfcode.com/ (available at http://webcache.googleusercontent.com/search?q=cache:ukYEYwoaJtYJ:dfcode.com/blog/2011/5/sharing-django-users-and-sessions-across-projects/+sharing+users+django&cd=1&hl=ru&ct=clnk&gl=ru&cli

Re: best example/tutorial for AJAX + Django

2012-02-16 Thread Sushirod
Take a look into Pyjamas as well. http://pyjs.org/ On Feb 15, 5:32 pm, "H.T. Wei" wrote: > Hi, > > I am new to Django and searched around for a good example/tutorial about > AJAX + Django but most of them were not considered as complete. > Can anyone suggest if there is a good (complete) example

Re: import problem

2012-02-16 Thread scott macri
DrBloodmoney I not sure what you mean by circular imports. datetime is the only import I have in this file. Yes Furbeenator it is a 'datetime' is not defined error. I'll post the entire error message tonight when I get home. My website directory is mn and my app directory is hcp. I'm trying to

Re: import problem

2012-02-16 Thread Scott Macri
Oh, the other thing is that if I run the exact same code in my idle shell within the hcp app all the imports work fine. On Thu, Feb 16, 2012 at 9:20 AM, Scott Macri wrote: > DrBloodmoney I not sure what you mean by circular imports.  datetime > is the only import I have in this file. > > Yes Furb

Re: import problem

2012-02-16 Thread Scott Macri
DrBloodmoney I not sure what you mean by circular imports. datetime is the only import I have in this file. Yes Furbeenator it is a 'datetime' is not defined error. I'll post the entire error message tonight when I get home. My website directory is mn and my app directory is hcp. I'm trying to

Re: Django Location- Does anyone know about this?

2012-02-16 Thread Addy Yeow
Not exactly a Django package but it's implemented in Django and uses MaxMind geoip database: http://dazzlepod.com/ip/ You could use the API for free, e.g. http://dazzlepod.com/ip/8.8.8.8.json On Thu, Feb 16, 2012 at 10:03 PM, Derek wrote: > http://geodjango.org/ ? > > On Feb 15, 6:18 pm, coded k

Re: Django Location- Does anyone know about this?

2012-02-16 Thread Derek
http://geodjango.org/ ? On Feb 15, 6:18 pm, coded kid wrote: > Hi Guys, Does anyone knows about any good django package for maps? or > for locating of areas, states, streets? Please kindly answer if you > do. Thanks. > > BTW: I've tried using Django easy_maps but it's not working. If you've > use

Re: Model.delete() was not called.

2012-02-16 Thread SomeoneToIgnore
> > >The delete select action uses the queryset's delete method [1], which > >means the model's delete method is not called. > > >It's not a bug, the behaviour is documented on the admin actions page. [2] > > >Cheers, > >Alasdair > > >[1]: > >https://docs.djangoproject.com/en/dev/topics/db/queri

Re: Model.delete() was not called.

2012-02-16 Thread Alasdair Nicol
Hi, On 16/02/12 10:53, SomeoneToIgnore wrote: Hello. I'm using Django 1.3.1. I've got some strange behaviour while deleting an object in admin panel. Here's the code from models.py: class Poll(models.Model): question = models.CharField(max_length=200) pub_date = models.DateTimeField

Re: connection.cursor()

2012-02-16 Thread MikeKJ
Actually Bruno thats great, it put me on the right track and I have now solved the error, my bad really I forgot how to properly construct a join sql statment... Cheers -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Logging from multiple processes

2012-02-16 Thread JC
On Feb 15, 7:57 am, bruno desthuilliers wrote: > On Feb 14, 6:23 pm, JC wrote: > > > Hey guys, > > > Does Django 1.3.1 handle logging from multiple processes or I have to > > have some special consideration? > > Not really a django-specific problem - the problem exists as soon as > you have con

Model.delete() was not called.

2012-02-16 Thread SomeoneToIgnore
Hello. I'm using Django 1.3.1. I've got some strange behaviour while deleting an object in admin panel. Here's the code from models.py: class Poll(models.Model): question = models.CharField(max_length=200) pub_date = models.DateTimeField('date published') def was_published_today(sel

Re: [ANN]: FeinCMS v1.5.0.rc1

2012-02-16 Thread Mark Renton
Great news! Happy to see the new version comes out ASAP. However, with the deprecate of old style patch of 3rd app URL reverse, is that means I must rewrite views and template codes of my app to fit this upgrade? And should I to do so if I wanna use others' app? -- You received this message be

Re: load settings on database

2012-02-16 Thread bruno desthuilliers
On Feb 16, 4:55 am, Anderson Borges wrote: > Hey guys > I am learning django and I have a question > I have a table in my database call SettingsUser so how can I load this table > to all views on my application? I just don't understand what "loading a table" is supposed to mean. If you want to

Re: connection.cursor()

2012-02-16 Thread bruno desthuilliers
On Feb 16, 10:29 am, MikeKJ wrote: > I got these imported tables from an external source so I need to > access the data using connection. Not necessarily - if there's no compound primary key, you can build django models from the tables using manage.py inspectdb (be sure to add the managed=False a

Problem loading integer data into database using fixture

2012-02-16 Thread Gchorn
Hello All, I'm attempting to provide initial data for my database using a fixture file (like this: https://docs.djangoproject.com/en/1.3/howto/initial-data/#providing-initial-data-with-fixtures), but I'm running into the following error: Problem installing fixture '/home/guillaume/NBA/players/fi

Re: Creating a hospital erp (hospital management) in Django

2012-02-16 Thread Saadat
Hi all, I created a view today and I could access the database contents using Templates. Now I wish to create a listbox that would have the names of doctors. When an item from the list is selected, an sql query should be sent which will return all the details of that doctor, where doc_id is the pri

Re: Creating a hospital erp (hospital management) in Django

2012-02-16 Thread Saadat
Hello All I created a view today and I could access the database values usi On Feb 14, 8:07 am, Python_Junkie wrote: > Now that you have your file >>models.py   place this file in the > app folder after creating your app > > 1.  python manage.py start app  My_Erp (for example) > 2.  a blank m

Re: [ANN]: FeinCMS v1.5.0.rc1

2012-02-16 Thread Martin J. Laubach
Well for now you don't NEED to change anything. You'll get those pesky deprecation warnings, but everything should continue to work fine for now, so there's no need to rush things, you can change your code as you go along. mjl -- You received this message because you are subscribed to the Goog

Re: [ANN]: FeinCMS v1.5.0.rc1

2012-02-16 Thread Matthias Kestenholz
On Thu, Feb 16, 2012 at 07:52, Mark Renton wrote: > Great news! Happy to see the new version comes out ASAP. However, with the > deprecate of old style patch of 3rd app URL reverse, is that means I must > rewrite views and template codes of my app to fit this upgrade? And should I > to do so if I

Re: CSS reference to Media folder

2012-02-16 Thread MikeKJ
background-image: url(/media/images/base/gradient2.png) eg On Feb 15, 12:37 pm, Kolbe wrote: > Hi all, > > I have a .css file in the /static/ folder where I keep all my styles. > > Now when I want to refer to images that I use in my CSS that are > stored in the /media/ folder, how do I reference

connection.cursor()

2012-02-16 Thread MikeKJ
I got these imported tables from an external source so I need to access the data using connection. The problem I have is getting at the data in more than 1 table with one dict the pure sql call would be something like select * from yw_basics ywb left join yw_next ywn on ywb.id = ywn.id where ywn.

G+ API library

2012-02-16 Thread Timothy Makobu
Hi all, Is there a completely bare bones script out there for G+? Something that takes the client_id and client_secret and returns a handle to G+; something like python-twitter? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gr

Re: CSS reference to Media folder

2012-02-16 Thread Leonardo Giordani
I think it is better for you to keep CSS images in /static folder too. /media is better suited as a folder to host user-loaded content. If you keep CSS and images in /static you can just refer to them with a relative path. I think that probably (but I'm not sure) CSS can only address relative pat