simplest for example, Error object has no attribute 'cleaned_data'

2011-01-30 Thread gintare
Is it possible by making small change to resolve the error below: (I did not yet finished reading all manual, maybe the error disappears if i make custom code for every line in the model, but my model has over 30 fields thus i would like to have automated save and post of all these fields) Django

pyodbc: Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnectW)')

2011-01-30 Thread Orgil
Hello, I have pyodbc-2.1.8 and python-2.6 on ubuntu-10.4. I tried to connect to MSSQL2008 database server which is on windows7. My code is below: --- import pyodbc conn = pyodbc.connect('DRIVER={SQL Server};SERVER=testserver \mssql2008;DATABASE=eoffice;UID=erp;PWD=123')

Re: pyodbc: Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnectW)')

2011-01-30 Thread Adrian Bool
On 30 Jan 2011, at 09:31, Orgil wrote: > My code is below: > --- > import pyodbc > conn = pyodbc.connect('DRIVER={SQL Server};SERVER=testserver > \mssql2008;DATABASE=eoffice;UID=erp;PWD=123') > --- I'd try replacing 'testserver\mssql2008' with a domain

Re: weird behavior in select_related

2011-01-30 Thread Miguel Araujo
I didn't know that, that's why it was happening. I didn't post my models, as I wasn't sure that would help. Thanks for your help Daniel, Miguel Araujo @maraujop 2011/1/28 Daniel Roseman > On Saturday, January 22, 2011 1:38:22 PM UTC, maraujop wrote: >> >> Hi

example do not work, TypeError

2011-01-30 Thread gintare
simple question related to another example. Django Version: 1.2.4 Exception Type: TypeError Exception Value: 'WordFormFormSet' object is not iterable Exception Location: c:\Python27\Scripts\Finnish2\..\Finnish2\Fin \views.py in first, line 2492 #

Re: weird behavior in select_related

2011-01-30 Thread Ramiro Morales
On Sun, Jan 30, 2011 at 7:27 AM, Miguel Araujo wrote: > I didn't know that, that's why it was happening. I didn't post my models, as > I wasn't sure that would help. Btw, it's documented behavior: http://docs.djangoproject.com/en/1.2/ref/models/querysets/#select-related

Re: example do not work, TypeError

2011-01-30 Thread Jonas Geiregat
> ... print form.as_table() # ERROR 'WordFormFormSet' object is > not iterable Sounds like pretty obvious error to me. You can't iterate over the WordFormFormSet object. just write formsetw.as_table(). -- You received this message because you are subscribed to the Google Groups

Re: simplest for example, Error object has no attribute 'cleaned_data'

2011-01-30 Thread Daniel Roseman
On Sunday, January 30, 2011 8:02:08 AM UTC, gintare wrote: > Is it possible by making small change to resolve the error below: > (I did not yet finished reading all manual, maybe the error disappears > if i make custom code for every line in the model, but my model has > over 30 fields thus i

working django with existing database

2011-01-30 Thread arief nur andono
is there anybody could save my time to make django work with existing database so i need only create the sql in model (not have to define table and field in models.py) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: working django with existing database

2011-01-30 Thread Jirka Vejrazka
Search documentation for "inspectdb" HTH Jirka On 30/01/2011, arief nur andono wrote: > is there anybody could save my time to make django work with existing > database so i need only create the sql in model (not have to define > table and field in models.py) >

Re: working django with existing database

2011-01-30 Thread Shawn Milochik
Try inspectdb: http://docs.djangoproject.com/en/dev/ref/django-admin/#inspectdb Shawn -- 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

Re: working django with existing database

2011-01-30 Thread arief nur andono
i've tried inspect-db but i still have no vitctory it's get error while i recompile back it to oracle by syncdb errr...and something i don't know, if i syncdb, what's will happen to the data? will i lost it?? 2011/1/30 Shawn Milochik > Try inspectdb: > >

Re: pyodbc: Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnectW)')

2011-01-30 Thread David
As far as I know, the only way to connect to MSSql using pyodbc on Linux is to use FreeTDS. conn = pyodbc.connect(r"DRIVER={FreeTDS};SERVER=testserver \mssql2008;DATABASE=eoffice;UID=erp;PWD=123") The "SQL Server" driver is a Windows driver and the above connection string might work on the same

Opinions Sought on When To/Not To Use Django Static File Settings

2011-01-30 Thread octopusgrabbus
I have written a web application in Django. At most, there will never be more than five users logged in, if that. I chose this particular application for Django implementation deliberately due to low use and because it was a first-time application. The application sits behind a firewall, and

Re: working django with existing database

2011-01-30 Thread Jirka Vejrazka
> i've tried inspect-db but i still have no vitctory Err, what exactly does that mean? Did you get an error message? > it's get error while i recompile back it to oracle by syncdb Again - difficult to help you if you don't say *what* error. > errr...and something i don't know, if i syncdb,

Weird Django Artifact Error

2011-01-30 Thread Samuel Baldwin
I was writing a view in Django and I accidentally tried to import from a module 'djang.form.formsets'. Naturally this didn't work so I fixed it, but I still continue to get an error like it's there. I've tried removing all pyc files, removing the import line and all the subsequently affected

How to display empty custom or model based formset? form?

2011-01-30 Thread gintare
How to display empty custom or model based formset? form? I am able to display only formset filled with data. from django.forms.models import modelformset_factory wFormSet=modelformset_factory(Word, max_num=4, extra=2, fields=('Wordword', 'WordTranslEn') #uncomment one of formsets. THIS

svn django and staticfiles app : python manage.py findstatic logo.png and devserver does not find file

2011-01-30 Thread hari jayaram
Hi I am a little confused about using the staticfiles app. I am running the devserver since I am learning django and building a site. I have my logo and css files at /Users/harijay/learn_css/logo.png /Users/harijay/learn_css/my_master.css STATIC_ROOT="/Users/harijay/learn_css/"

Re: working django with existing database

2011-01-30 Thread Dilan Nery
arief, try see this howto: http://docs.djangoproject.com/en/1.2/howto/legacy-databases/ On Sun, Jan 30, 2011 at 12:50 PM, arief nur andono wrote: > i've tried inspect-db but i still have no vitctory > > it's get error while i recompile back it to oracle by syncdb >

Dynamic ModelForm fields

2011-01-30 Thread a.esmail
Hello, I tried my best with no luck. Here are the relevant code snippets: ## Item model: class Item(models.Model): category = models.ForeignKey(Category, related_name='items') activation_code = models.CharField(max_length=64) is_active =

Re: Facebook session problems.

2011-01-30 Thread Aljoša Mohorović
On Sun, Jan 30, 2011 at 6:30 AM, CrabbyPete wrote: > I log in and all is good except I loose the session if I go to another > web site and come back. if this is facebook canvas app it wont work properly in safari and explorer because of some iframe restrictions. is this

Re: svn django and staticfiles app : python manage.py findstatic logo.png and devserver does not find file

2011-01-30 Thread Jannis Leidel
On 30.01.2011, at 20:58, hari jayaram wrote: > Hi I am a little confused about using the staticfiles app. I am running the > devserver since I am learning django and building a site. > > I have my logo and css files at > > /Users/harijay/learn_css/logo.png >

Re: Dynamic ModelForm fields

2011-01-30 Thread Daniel Roseman
On Sunday, January 30, 2011 6:01:00 PM UTC, a.esmail wrote: > > Hello, > I tried my best with no luck. > Here are the relevant code snippets: > > > > # > Item form: > class ItemForm(forms.ModelForm): > def __init__(self, fields_list,

Re: svn django and staticfiles app : python manage.py findstatic logo.png and devserver does not find file

2011-01-30 Thread hari jayaram
Thanks for your reply Janice..I am hopefully edging towards understading the docs I added the directory to the STATICFILES_DIRS. But the devserver still gives a 404 on the files which are only in the "/Users/harijay/learn_css" directory Also "python manage.py findstatic logo.png " for example

Re: svn django and staticfiles app : python manage.py findstatic logo.png and devserver does not find file

2011-01-30 Thread hari jayaram
This may be related to the problem I am facing. The docs mention a special command to start the devserver to serve static files. django-admin.py staticfiles-runserver " i$ /Users/harijay/djtrunk/django/bin/django-admin.py staticfiles-runserver Unknown command: 'staticfiles-runserver' Type

Re: Facebook session problems.

2011-01-30 Thread CrabbyPete
Thanks, but no. I'm running it on Firefox now. On Jan 30, 3:43 pm, Aljoša Mohorović wrote: > On Sun, Jan 30, 2011 at 6:30 AM, CrabbyPete wrote: > > I log in and all is good except I loose the session if I go to another > > web site and come

Re: Opinions Sought on When To/Not To Use Django Static File Settings

2011-01-30 Thread Russell Keith-Magee
On Mon, Jan 31, 2011 at 12:59 AM, octopusgrabbus wrote: > I have written a web application in Django. At most, there will never > be more than five users logged in, if that. I chose this particular > application for Django implementation deliberately due to low use and

Re: pyodbc: Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnectW)')

2011-01-30 Thread Orgil
> conn = pyodbc.connect(r"DRIVER={FreeTDS};SERVER=testserver > \mssql2008;DATABASE=eoffice;UID=erp;PWD=123") Thanks for your reply, David! You gave me great advice! As you suggest, now I my connection is fine! But there is one another problem occurred! When I run the Select query, result is non

Re: svn django and staticfiles app : python manage.py findstatic logo.png and devserver does not find file

2011-01-30 Thread hari jayaram
I Solved the problem with help from jezdez on irc and Jannice L on this newsgroup. I learned that STATIC_ROOT is the directory where all the static files will live in when the site is hosted via nginx , apache or a production webserver. Following development , the static files are gathered from

Some beginners question

2011-01-30 Thread vishy
1) I want to read files. Where should I put these files? I am not using a model to link to the files. And how to discover the path to files? I am working on windows, and in development environment I am using the full path to the file. 2) I created my own custom classes, but when I import into

Re: working django with existing database

2011-01-30 Thread arief nur andono
sorry for undetail, i use oracle this is output example from my inspectdb, this is one of 300 table i have from django.db import models class TempJmlGangguanPyl(models.Model): singkatpyl = models.CharField(max_length=4, blank=True) singkatgrd = models.CharField(max_length=4, blank=True)

Re: working django with existing database

2011-01-30 Thread arief nur andono
this is an instruction that i forgot # This is an auto-generated Django model module. # You'll have to do the following manually to clean this up: # * Rearrange models' order # * Make sure each model has one field with primary_key=True # Feel free to rename the models, but don't rename

Re: working django with existing database

2011-01-30 Thread Jani Tiainen
You didn't specify more details about Oracle version that you're using but from my experience with inspectdb and Oracle are not good ones, even though it works or at least with databases I've tried it with. I've decided - specially for Oracle to do it always by hand. That way, even it seems a

RE: Django Template CSS Load Path

2011-01-30 Thread Chris Matthews
change href='{{ MEDIA_URL }}/static/PageStyle.css' /> to href='{{ MEDIA_URL }}static/PageStyle.css' /> -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of octopusgrabbus Sent: 29 January 2011 21:17 To: Django users Subject: Re:

flatpages templatetags missing

2011-01-30 Thread Adi
Hi: I am trying to use flatpages in my app, and i set up the settings.py correct, and I am able to create the flatpages using the admin site. However, when in my app I try to load the template tags for flatpages using: {% load flatpages %} I get a TemplateSyntaxError Exception Value:

Re: ANN: Server upgrade on djangoproject.com

2011-01-30 Thread creecode
Hello Russ, On Jan 29, 8:53 pm, Russell Keith-Magee wrote: > What exactly do you mean by "visually cut off code"? Can you give a > specific URL that demonstrates the problem you're talking about? Sorry. My intent was to include an example link <

Re: working django with existing database

2011-01-30 Thread arief nur andono
in my computer i use oracle XE and oracle XE in production actually i write an web application to replace desktop application with Visual Basic that has existing oracle table i thinking of django because it's for perfectionist with deadlines some people ask me to take a look to codeigniter since

Re: working django with existing database

2011-01-30 Thread Simone Dalla
2011/1/31 arief nur andono > sorry for undetail, i use oracle > > this is output example from my inspectdb, this is one of 300 table i have > > from django.db import models > > class TempJmlGangguanPyl(models.Model): > singkatpyl = models.CharField(max_length=4,