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
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')
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
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
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
#
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
> ... 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
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
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
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)
>
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
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:
>
>
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
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
> 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,
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?
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
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/"
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
>
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 =
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
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
>
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,
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
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
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
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
> 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
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
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
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)
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
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
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:
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:
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 <
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
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,
38 matches
Mail list logo