Re: SQL Server Support - Does it Exist

2011-07-14 Thread Wei guangjing
2011/7/15 Python_Junkie : > I have tried django-mssql without any luck. > > Could you send me the link for django-pyodbc. Please use svn checkout the source code, and do setup.py install. svn checkout http://django-pyodbc.googlecode.com/svn/trunk/ django-pyodbc -- Wei guangjing -- You received

getting django working with apache and mod_wsgi on a brand new mac with xcode 4

2011-07-14 Thread Derick Felsman
Hi, I'm brand new to django and have been having trouble setting it up with apache and mod_wsgi on my new mac with xcode 4 installed. All the resources i've been able to find are either outdated or don't work with an xcode 4 installation. Does anyone know how to do this or know where i would be

Re: SQL Server Support - Does it Exist

2011-07-14 Thread Python_Junkie
I have tried django-mssql without any luck. Could you send me the link for django-pyodbc. I was only able to find 2 downloads that say they have been deprecated. By the way I have been using the (sql) pyodbc for my native (MySQL) sql connections to retrieve data. I would rather use sql rather t

Re: SQL Server Support - Does it Exist

2011-07-14 Thread Python_Junkie
I have installed django-mssql and still seem to be stuck. What are the correct attributes that need to be set in the settings.py file? I am getting an error This is how I have configured my settings.py file DATABASE S = { 'default': { 'NAME': 'notes', 'E

Re: something about django mysql database long connection

2011-07-14 Thread Kejun He
Hi, I will look the DBUtils imformation first. Thank you very much regards, he On Thu, Jul 14, 2011 at 11:58 AM, Jian Chang wrote: > Try DBUtils > http://www.webwareforpython.org/DBUtils/Docs/UsersGuide.html > > 2011/7/13 Kejun He > >> hi, >> I am sorry. My English is very bad. >> >> Yes, i w

Re: SQL Server Support - Does it Exist

2011-07-14 Thread Russell Keith-Magee
On Fri, Jul 15, 2011 at 6:03 AM, bruno desthuilliers wrote: > > > On 14 juil, 23:15, Python_Junkie > wrote: >> I have searched for the drivers to use the syncdb utility with MS SQL >> Server but have been unsuccessful. > > https://docs.djangoproject.com/en/1.3/ref/databases/ > > Django doesn't su

[solved] virtualenv with dev server

2011-07-14 Thread Mike Dewhirst
Thank you - all four of you were on the money. Taking your advice this is what I did to fix it ... C:\users\miked\py\ssds <-- root C:\users\miked\py\ssds\Lib <-- virtualenv python installation C:\users\miked\py\ssds\Scripts <-- virtualenv python scripts C:\users\miked\py\ssds\src <-- project sou

Re: SQL Server Support - Does it Exist

2011-07-14 Thread David Graves
https://docs.djangoproject.com/en/1.3/ref/databases/#using-a-3rd-party-database-backendmentions django-mssql http://stackoverflow.com/questions/842831/using-sql-server-with-django-in-production I personally have used django-pyodbc in conjunction with pyodbc. On Thu, Jul 14, 2011 at 5:03 PM, brun

Re: SQL Server Support - Does it Exist

2011-07-14 Thread bruno desthuilliers
On 14 juil, 23:15, Python_Junkie wrote: > I have searched for the drivers to use the syncdb utility with MS SQL > Server but have been unsuccessful. https://docs.djangoproject.com/en/1.3/ref/databases/ Django doesn't support MS SQL. -- You received this message because you are subscribed to

SQL Server Support - Does it Exist

2011-07-14 Thread Python_Junkie
I have searched for the drivers to use the syncdb utility with MS SQL Server but have been unsuccessful. Has anyone implemented SQL server. If you have could you point me to the links for driver downloads and the settings.py parameters. Thanks -- You received this message because you are subsc

Re: virtualenv with dev server

2011-07-14 Thread i...@webbricks.co.uk
theres two different versions of django listed there, you're not running the version in the virtualenv in one of those two listings. definitely activating the virtual env? then navigating into it to the folder manage.py is in? Matt On Jul 14, 8:54 am, Mike Dewhirst wrote: > Trying to get virtua

Re: virtualenv with dev server

2011-07-14 Thread Carles Barrobés
Try running > python Scripts\django-admin.py runserver On windows, the .py extension will be registered with your defaut installation of python and that's the one it's using if you call the script directly Carles On 14 Jul, 09:54, Mike Dewhirst wrote: > Trying to get virtualenv working for th

Re: django form radio input layout

2011-07-14 Thread Bill Freeman
Unless things have changed, the trouble is that the individual bound fields aren't all in existence at the same time, but are created and discarded one at a time as the outer widget iterates the choices. I once uploaded a snippet for a template tag that performed the iteration, allowing finer styl

Re: django form radio input layout

2011-07-14 Thread NateB
CrabbyPete wrote: > > I am trying to do the same thing. Did you ever get a response? > I accepted an answer to the one on the stack overflow question I linked to in my previous email - however, it wasn't what I was *really* hoping for (although it definitely works). Before asking, I spent a l

Re: Raise CommandError: One or more models did not validate

2011-07-14 Thread Petey
I am just starting to do adminmodel and now I've noticed that it can be done by this function and not models :) I'll work a bit more on that tomorrow :) Thanks for help I really appreciate it. -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Raise CommandError: One or more models did not validate

2011-07-14 Thread Tim Shaffer
On Thursday, July 14, 2011 2:32:26 PM UTC-4, Petey wrote: > > Is there a way around? > This isn't really something that can/should be solved in the model itself. You could try overwriting the formfield_for_foreignkey method in your ModelAdmin: https://docs.djangoproject.com/en/dev/ref/contrib/ad

Re: Raise CommandError: One or more models did not validate

2011-07-14 Thread Tim Shaffer
You should still probably remove the user_logged_in from your default value. It doesn't do what you think it does, and could cause other strange things to happen. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the w

Re: django form radio input layout

2011-07-14 Thread CrabbyPete
I am trying to do the same thing. Did you ever get a response? On Jun 16, 11:55 am, NateB wrote: > Hello all, > > I posted this to stackoverflow a couple weeks ago, but I have yet to get any > takers.  I was able to backburner this for a little bit, but I'd like to see > it wrapped up. > > In my

Re: Raise CommandError: One or more models did not validate

2011-07-14 Thread Petey
Sorry for multiple messages but I think that I've accidently fixed it: from django.db import models from django.contrib.auth.models import User from django.contrib.auth.signals import user_logged_in import datetime class News(models.Model): text = models.TextField() title = models.TextFie

Check out my about.me profile!

2011-07-14 Thread gungorbasa
Hi django-users, I set up my about.me splash page and want to share it with you: . If you don't have an about.me splash page, you can get one for free at . Names are going fast so you might want to get

Check out my about.me profile!

2011-07-14 Thread gungorbasa
Hi django-users, I set up my about.me splash page and want to share it with you: . If you don't have an about.me splash page, you can get one for free at . Names are going fast so you might want to get

Check out my about.me profile!

2011-07-14 Thread gungorbasa
Hi django-users, I set up my about.me splash page and want to share it with you: . If you don't have an about.me splash page, you can get one for free at . Names are going fast so you might want to get

Re: Raise CommandError: One or more models did not validate

2011-07-14 Thread Petey
Is there a way around? -- 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/-/ZcWJm3heIOgJ. To post to this group, send email to django-users@googlegroups.com. To

Re: Raise CommandError: One or more models did not validate

2011-07-14 Thread Petey
The target of this is to automatically fill fields without users having to chose "user". -- 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/-/nDHuq-HmLNcJ. To p

Re: Raise CommandError: One or more models did not validate

2011-07-14 Thread Tim Shaffer
I just noticed that you had the default value set to the "user_logged_in" signal method. That's not going to work at all. You probably want to remove that from the field definition. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this

Re: Raise CommandError: One or more models did not validate

2011-07-14 Thread Petey
I got an error even after removing my modifications to the source: *ValueError at /admin/news/news/add/* *invalid literal for int() with base 10: '' * -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit h

Re: 'RawQuerySet' object has no attribute 'get'

2011-07-14 Thread zdenulo
Thanks a lot for advice, it works. Regards, Zdenko On 14 čnc, 12:40, Tom Evans wrote: > On Thu, Jul 14, 2011 at 10:56 AM, zdenulo wrote: > > Greetings to everybody, > > I have a problem for which I didn't find solution on internet, > > therefore  I am posting context: > > > simplified models.p

Re: Managing objects spred among several tables/databases.

2011-07-14 Thread Andre Terra
> far better is to do what was suggested to you long ago: do the tutorial. > > before you finish it, you'll see why your questions are unanswerable, > and if you like Django or not. > > This cannot be stressed enough. And do read the wiki guide on posting to the mailing list, as most of your posts

Re: Raise CommandError: One or more models did not validate

2011-07-14 Thread Tim Shaffer
When you do this: created = models.ForeignKey(User, default=user_logged_in, editable=False ) It's going to create a method on the user instance called "news_set". Then when you then do this: edited = models.ForeignKey(User, default=user_logged_in, editable=False) It's going to try to c

Raise CommandError: One or more models did not validate

2011-07-14 Thread Petey
Hey I'am working on my models page and this is my code: http://pastebin.com/eAyzzZuY which returns an error: django.core.management.base.CommandError: One or more models did not validate: news.news: Accessor for field 'created' clashes with related field 'User.news_se t'. Add a related_name arg

Re: Managing objects spred among several tables/databases.

2011-07-14 Thread Javier Guerra Giraldez
On Thu, Jul 14, 2011 at 12:06 PM, Hummingbird wrote: > All right Tom. > Let me look into admin. > Then perhaps I would require the help from list. I (like everybody else here) don't want to sound rude; but i don't think you'll get anywhere with this approach. Django is a big framework, just read

Re: Managing objects spred among several tables/databases.

2011-07-14 Thread Hummingbird
All right Tom. Let me look into admin. Then perhaps I would require the help from list. Cheers. On Jul 14, 10:01 pm, Tom Evans wrote: > On Thu, Jul 14, 2011 at 5:34 PM, Hummingbird wrote: > > I am presently using web2py. > > Before getting the feet wet in django, I am trying to assess whether >

Re: Managing objects spred among several tables/databases.

2011-07-14 Thread Tom Evans
On Thu, Jul 14, 2011 at 5:34 PM, Hummingbird wrote: > I am presently using web2py. > Before getting the feet wet in django, I am trying to assess whether > the functionality I mentioned in earlier reply is already built-in in > django, by consulting the list-users. > If this is doable, I would hap

Re: Managing objects spred among several tables/databases.

2011-07-14 Thread Hummingbird
I am presently using web2py. Before getting the feet wet in django, I am trying to assess whether the functionality I mentioned in earlier reply is already built-in in django, by consulting the list-users. If this is doable, I would happily dive into django. That's why I did not go into actual codi

Re: Managing objects spred among several tables/databases.

2011-07-14 Thread Tom Evans
On Thu, Jul 14, 2011 at 5:11 PM, Hummingbird wrote: > What I want to accomplish from these tables is as given below. > > All the customer data can be maintained in a single table. > i.e. customer(custid, custname, groupid, address, tel, mobile, city) > > In the course of normalising the database,

Re: Managing objects spred among several tables/databases.

2011-07-14 Thread Hummingbird
Thanks Michal & other friends for sharing your time for this. I gather from this thread that I need to write my own class for this. It is a bit like manufacturing an axe myself before cutting the wood. But, continuing the python philosophy, let me look at the briter side of it. If I write the clas

Re: Managing objects spred among several tables/databases.

2011-07-14 Thread Hummingbird
What I want to accomplish from these tables is as given below. All the customer data can be maintained in a single table. i.e. customer(custid, custname, groupid, address, tel, mobile, city) In the course of normalising the database, we arrived at defining 2 tables. "customer" table maintaining b

Re: Managing objects spred among several tables/databases.

2011-07-14 Thread Michal Petrucha
On Thu, Jul 14, 2011 at 07:20:12AM -0700, Hummingbird wrote: > Maybe, I didn't explain the condition properely. > > As you say, in this case, > "UPDATE custdetl SET tel = NULL, address = , CITY = city> > WHERE custid = " > is fine in this simplified version. > > Suppose when a user removes addre

Re: Linking to Django Admin from 1.3

2011-07-14 Thread eric.frederich
Nevermind... this was my bad. I removed (.*) from my urls.py This is now working... thanks a bunch. This is what I get for developing an app that works and then not touching it for over a year. I really need to keep up with these things. -- You received this message because you are subscribed

Re: Linking to Django Admin from 1.3

2011-07-14 Thread eric.frederich
Well... two people replied with the same answer so rather than picking favorites I'll just reply to myself. This seems to work but looks a bit quirky. When I use {% url admin:index %} the link that gets generated actually has "admin/(.*)" in it. This even shows up in the url when I click on it.

Re: old app fails tests, runs ok

2011-07-14 Thread Javier Guerra Giraldez
Ok, error fixed. the issue was documented on ticket #12720, it was a change on Python's SimpleCookie implementation between 2.6.2 and 2.6.4 that broke the way the test client creates requests. updating to 1.1.4 (instead of naïvely asking for 1.1) restored sanity into the world. and i learned a f

Re: Linking to Django Admin from 1.3

2011-07-14 Thread rebus_
On 14 July 2011 16:35, eric.frederich wrote: > Hello, > > I am moving from 1.0.2 to 1.3 and am having problems linking to the > admin site from within a template. > I used to have this in my template... > >    Django Admin > > And I used to have this in my urls.py > >    url(r'^admin/(.*)'      ,

Re: Linking to Django Admin from 1.3

2011-07-14 Thread Alasdair Nicol
From the django docs on url namespaces [1] Namespaced URLs are specified using the : operator. For example, the main index page of the admin application is referenced using admin:index. This indicates a namespace of admin, and a named URL of index. So you link to the admin index in your temp

Linking to Django Admin from 1.3

2011-07-14 Thread eric.frederich
Hello, I am moving from 1.0.2 to 1.3 and am having problems linking to the admin site from within a template. I used to have this in my template... Django Admin And I used to have this in my urls.py url(r'^admin/(.*)' , admin.site.root, name='the-django- admin'), I'm sure this was

Re: Managing objects spred among several tables/databases.

2011-07-14 Thread Hummingbird
Maybe, I didn't explain the condition properely. As you say, in this case, "UPDATE custdetl SET tel = NULL, address = , CITY = WHERE custid = " is fine in this simplified version. Suppose when a user removes address, tel, city from table 'custdetl'. When fields are not nullable (not null=true),

Re: virtualenv with dev server

2011-07-14 Thread Bill Freeman
How are you starting the dev server? I'm mostly familiar with *nix usage, but, in a nutshell, the only thing that python code needs to use the virtual environment is to be run with the correct python. On *nix, pretty much the only significant thing that activate is to tweak the environment's path

Re: Managing objects spred among several tables/databases.

2011-07-14 Thread Michal Petrucha
On Thu, Jul 14, 2011 at 06:00:38AM -0700, Hummingbird wrote: > Table names (field names) are are under-- > > customer (custid, custname, groupid), > custdetl (custid, address, tel, mobile, city) > group (groupid, groupname) > > There is a single form for handling tables "customer" and "custdetl"

Re: Some more curious performance issues between MySQL and Django ORM

2011-07-14 Thread Cal Leeming [Simplicity Media Ltd]
On Thu, Jul 14, 2011 at 2:17 PM, bruno desthuilliers < bruno.desthuilli...@gmail.com> wrote: > On 14 juil, 02:24, "Cal Leeming [Simplicity Media Ltd]" > wrote: > > On 14 Jul 2011 00:13, "bruno desthuilliers" < > bruno.desthuilli...@gmail.com> > > wrote: > >> And FWIW, did you try the obvious: > >

Re: virtualenv with dev server

2011-07-14 Thread Leonidas Tsampros
Mike Dewhirst writes: > Trying to get virtualenv working for the first time for a new project > and have stumbled somehow. I can get it working as advertised (see > below) but django dev server doesn't notice. > > Any hints appreciated ... > > ||| here is virtualenv being activated > > C:\users\mi

Re: Proxy Model and casting

2011-07-14 Thread Tom Evans
On Thu, Jul 14, 2011 at 2:09 PM, tom wrote: > Hello, > > I have following proxy model > > class UserForSubdomain(User): >    """ >    This Model acts as a proxy to the django model:``User`` and >    allows to store the subdomain with the username to support >    the same usernames with different s

Re: Some more curious performance issues between MySQL and Django ORM

2011-07-14 Thread bruno desthuilliers
On 14 juil, 02:24, "Cal Leeming [Simplicity Media Ltd]" wrote: > On 14 Jul 2011 00:13, "bruno desthuilliers" > wrote: >> And FWIW, did you try the obvious: > >> return Session.objects.filter( >>            member__username=self.username, >>            is_fake = 0 >>         ).order_by("-id") > >

Proxy Model and casting

2011-07-14 Thread tom
Hello, I have following proxy model class UserForSubdomain(User): """ This Model acts as a proxy to the django model:``User`` and allows to store the subdomain with the username to support the same usernames with different subdomains. The username is split with the first '.'.

AW: Managing objects spred among several tables/databases.

2011-07-14 Thread Szabo, Patrick (LNG-VIE)
Hi, Are those tables somehow related to each other per FK ?! In that case i think you might be able to use a model form for that purpose. I'm not really good with django myself so i might be talking bs. . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT Developer LexisNe

Re: Managing objects spred among several tables/databases.

2011-07-14 Thread Hummingbird
Hi again ! I went through the docs of django again, but still could not find what I was looking for. Definition of my problem (simplified version to keep this post short): Table names (field names) are are under-- customer (custid, custname, groupid), custdetl (custid, address, tel, mobile, city

Re: urls

2011-07-14 Thread jocke khazad
http://127.0.0.1:8000/ is the same as / . To hit the following url: url(r'^$', 'person.views.home', name='home') use: HttpResponseRedirect('/') /Joakim On Thu, Jul 14, 2011 at 10:49 AM, Massimiliano della Rovere < massimiliano.dellarov...@gmail.com> wrote: > I think your case is #2 in > http

Re: middleware

2011-07-14 Thread Calvin Spealman
You should use Django Debug Toolbar. It can handle this sort of thing, and many other things, for you. On Thu, Jul 14, 2011 at 1:34 AM, NISA BALAKRISHNAN wrote: > how to write a middleware that that stores all database requests. > How can i store all database requests? > > pls help > > -- > You r

Re: 'RawQuerySet' object has no attribute 'get'

2011-07-14 Thread Cal Leeming [Simplicity Media Ltd]
On 14 Jul 2011 11:41, "Tom Evans" wrote: > > On Thu, Jul 14, 2011 at 10:56 AM, zdenulo wrote: > > Greetings to everybody, > > I have a problem for which I didn't find solution on internet, > > therefore I am posting context: > > > > simplified models.py for application testapp (django 1.3): > >

Re: 'RawQuerySet' object has no attribute 'get'

2011-07-14 Thread Tom Evans
On Thu, Jul 14, 2011 at 10:56 AM, zdenulo wrote: > Greetings to everybody, > I have a problem for which I didn't find solution on internet, > therefore  I am posting context: > > simplified models.py for application testapp (django 1.3): > > class Menu(models.Model): >    parent_menu = models.Fore

Re: Some more curious performance issues between MySQL and Django ORM

2011-07-14 Thread Cal Leeming [Simplicity Media Ltd]
On 14 Jul 2011 03:11, "Andre Terra" wrote: > > PostgreSQL or bust. Hehe, a lot of people have suggested using PostgreSQL, and in all fairness I do now understand some of the arguments in the MySQL vs debate.. Until i find something really really wrong with mysql, ill probably 'stay with the devil

'RawQuerySet' object has no attribute 'get'

2011-07-14 Thread zdenulo
Greetings to everybody, I have a problem for which I didn't find solution on internet, therefore I am posting context: simplified models.py for application testapp (django 1.3): class Menu(models.Model): parent_menu = models.ForeignKey('Menu', blank=True, null=True) title = models.CharFi

Re: creating a simple mailbox

2011-07-14 Thread ikatanda
have you created your views and added the url to point to the app mailbox page? On Jul 14, 7:36 am, bahare hoseini wrote: > hi there, > as my first project i'm going to create a simple mail box to recieve or > delete Emails, > i made my models in my application, could you please tell me the next

Re: Add attributes (css-class) to formfield

2011-07-14 Thread Tom Evans
On Wed, Jul 13, 2011 at 6:41 PM, Andreas Pfrengle wrote: > Hello, > > I know about assigning attributes to widgets, like shown here: > widget-instances> > or here: >

Re: urls

2011-07-14 Thread Massimiliano della Rovere
I think your case is #2 in https://docs.djangoproject.com/en/dev/topics/http/shortcuts/#redirect skype: masdero, icq: 473891447, yim: mas_dero, msn: mas_d...@hotmail.com Mi scriva in italiano; Write me in English; Skribu al mi Esperante! On Thu, Jul 14, 2011 at 10:13, N

urls

2011-07-14 Thread NISA BALAKRISHNAN
i am new to django. i have a very simple question. wht is the url i need to give to httpresponseredirect() to load my home page with url http://127.0.0.1:8000/ my urls.py looks like dis: urlpatterns = patterns('', # Examples: url(r'^$', 'person.views.home', name='home'), url(r'^edi

Re: database requests

2011-07-14 Thread NISA BALAKRISHNAN
thx On Thu, Jul 14, 2011 at 11:26 AM, Jirka Vejrazka wrote: > > how can i get the queries being passed while a page is being > > requested? i mean when a view is requested the database queries being > > sent. > > Hi, > > it's difficult to figure out what you need from your question, but > I'll m

virtualenv with dev server

2011-07-14 Thread Mike Dewhirst
Trying to get virtualenv working for the first time for a new project and have stumbled somehow. I can get it working as advertised (see below) but django dev server doesn't notice. Any hints appreciated ... ||| here is virtualenv being activated C:\users\miked\py\ssds>Scripts\activate (ssds)

Re: database requests

2011-07-14 Thread Jirka Vejrazka
> how can i get the queries being passed while a page is being > requested? i mean when a view is requested the database queries being > sent. Hi, it's difficult to figure out what you need from your question, but I'll make a wild guess that you need this: https://docs.djangoproject.com/en/dev