Re: mod_wsgi+Apache+Postregsql on Windows

2010-08-13 Thread John Yeukhon Wong
Hi, Graham I looked at the error log and I fully understood the problem. I spent an hour trying different ways to understand the whole thing. Here is the result. f:/public/testproject/apache/django.wsgi //code begins here import os, sys sys.path.append("f:/public")

Re: mod_wsgi+Apache+Postregsql on Windows

2010-08-13 Thread Graham Dumpleton
On Aug 14, 12:52 pm, John Yeukhon Wong wrote: > Hi, Graham. > > I watched the video and your pdf up until the point you ran the wsgi > successfully. > > I restarted the apache and bottom of the apache monitor said "Apache/ > 2.2.16(Win32) mod_wsgi/3.3Python/2.7", and also

dashboard question

2010-08-13 Thread ionut cristian cucu
Hello list, I customized my first dashboard like so: http://paste.pocoo.org/show/250028/, but when I added Group, the site gets rendered weird: http://img705.imageshack.us/img705/8148/djangositeadmin12817724.png. Could you please help me find what have I done wrong? Thanks! -- You received this

Can't build Django documentation

2010-08-13 Thread Kevin
I tried to build the Django docs and got an error. $ cd django/docs/ $ make html sphinx-build -b djangohtml -d _build/doctrees . _build/html Running Sphinx v1.0.1 loading pickled environment... not yet created building [djangohtml]: targets for 427 source files that are out of date updating

Re: mod_wsgi+Apache+Postregsql on Windows

2010-08-13 Thread John Yeukhon Wong
According to this post http://www.rkblog.rk.edu.pl/w/p/mod_wsgi/ I used the similar approach, and had localhost/hello.py and worked. But what about the WSCI way that you showed us in the video? Thank you. -- You received this message because you are subscribed to the Google Groups "Django

Re: Best practice for maintaining the "Django stack"

2010-08-13 Thread hcarvalhoalves
This is a common issue with South: it sometimes swallows some import errors from other apps. In my case, I get this error with ImageKit when PIL is not installed, or not compiled correctly. About managing Django stack: the best thing you have is virtualenv + virtualenvwrapper and PIP with

Re: mod_wsgi+Apache+Postregsql on Windows

2010-08-13 Thread John Yeukhon Wong
Hi, Graham. I watched the video and your pdf up until the point you ran the wsgi successfully. I restarted the apache and bottom of the apache monitor said "Apache/ 2.2.16(Win32) mod_wsgi/3.3Python/2.7", and also I could see localhost again. I can see the blue page. I am sorry if I sound too

Re: Django Matrimonial Apps,

2010-08-13 Thread Kenneth Gonsalves
On Fri, 2010-08-13 at 20:08 +0100, Rizwan Mansuri wrote: > I would appreciates if anyone would like to join for this project. I > am > aiming to finish this within three month with basic functionality. is it to be open source? -- regards Kenneth Gonsalves -- You received this message because

Re: Django template compilation

2010-08-13 Thread Russell Keith-Magee
On Sat, Aug 14, 2010 at 7:40 AM, Antoni Aloy wrote: > Hello! > > Today I have been benchmarking a Django template to PHP compilar > called Haanga http://github.com/crodas/Haanga/ a development sponsored > by meneame.net a Digg like spanish site. Ricardo has made some sort

Re: mod_wsgi+Apache+Postregsql on Windows

2010-08-13 Thread Graham Dumpleton
On Aug 14, 11:26 am, John Yeukhon Wong wrote: > Hi, I know most of you work on Linux, but I do need this to be done on > Windows for a very personal reason. > > I mainly followed this tutorial here, except that I use mod_wsgi over >

mod_wsgi+Apache+Postregsql on Windows

2010-08-13 Thread John Yeukhon Wong
Hi, I know most of you work on Linux, but I do need this to be done on Windows for a very personal reason. I mainly followed this tutorial here, except that I use mod_wsgi over mod_python. http://wiki.thinkhole.org/howto:django_on_windows I had my python 2.7, apache, mod_wsgi and postreg all

Re: new Django-Python can't get to sqlite

2010-08-13 Thread Piotr Zalewa
there us many ways to do so I'd install pip from the package (rpm, right?) and then run "pip install pysqlite3" but the best would be o read about virtualenv and prepare djsngo environment for the project (not globally) zalun On 10-08-14 00:11, Tom wrote: The opsys is rhel AS5.2. I

Django template compilation

2010-08-13 Thread Antoni Aloy
Hello! Today I have been benchmarking a Django template to PHP compilar called Haanga http://github.com/crodas/Haanga/ a development sponsored by meneame.net a Digg like spanish site. Ricardo has made some sort of benchmark http://gallir.wordpress.com/2010/08/13/haanga-vs-django-vs-h2o. With my

Django psycopg2 installation issue

2010-08-13 Thread Nick
This is actually related to psycopg2, OS X and Postgres but I was hoping someone in here has seen the same issue. I recently installed PostgresPlus 8.4, Django dev (1.4?), and psycop2 version 2.2.0 on my imac OS X 10.6.4 When i try to run dbshell from the command line I get an error that reads

Ordering groups with aggregated field

2010-08-13 Thread MG
Hello, I'm trying to order a list with aggregations. For a restaurant, I have a visit list and i generate a customer list using customer_list=visit_list.values('customer_no').annotate(Sum('totalbill')).order_by('totalbill_sum') (visit class has visit no, customer no and totalbill models) I want

Re: new Django-Python can't get to sqlite

2010-08-13 Thread Tom
The opsys is rhel AS5.2. I couldn't find "yolk" on it (that's a program, right?). The machine has rpms for Python 2.4 & sqlite, but I was unable to get Django working with them. I thought Python 2.5 & later versions included sqlite, so I started installing all the software (Python, Django) in

Re: generating random keys/passwords

2010-08-13 Thread Shawn Milochik
The auth module in contrib uses the make_token method of default_token_generator in django.contrib.auth.tokens for the standard password reset, so that sounds like a good choice. Another good way to get a unique, random string is uuid.uuid4(). Shawn -- You received this message because you are

Re: generating random keys/passwords

2010-08-13 Thread Greg Pelly
And to answer your more general question about email signups, have a look at Django Registration. It should have everything you need. http://bitbucket.org/ubernostrum/django-registration/wiki/Home On Fri, Aug 13, 2010 at 3:44 PM, Greg Pelly wrote: > have a look at Django

Re: generating random keys/passwords

2010-08-13 Thread Greg Pelly
have a look at Django Command Extensions: http://code.google.com/p/django-command-extensions/ sample usage: $ ./manage.py generate_secret_key xr7+43ak=i^2+ommc_e6xn$6vph)_$ffb$n3kp#o1!675euxdu Greg On Fri, Aug 13, 2010 at 3:32 PM, bagheera wrote: > Hi, i'm looking for

generating random keys/passwords

2010-08-13 Thread bagheera
Hi, i'm looking for python module to generate random strings used as activation keys to being sent to newsletter subscribers in order to activate their subscription. Any suggestions? -- Linux user -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Overriding the widget of a custom form field in admin

2010-08-13 Thread Bill Freeman
I suspect that you must refrain from setting self.widget if widget is in kwargs. On Thu, Aug 12, 2010 at 1:22 PM, omat wrote: > Hi All, > > I have a custom TagField form field. > > class TagField(forms.CharField): >    def __init__(self, *args, **kwargs): >        

fixtures with permissions

2010-08-13 Thread Javier Guerra Giraldez
Hi in my system, i have a few predefined groups, and some custom permissions. the predefined groups have a strictly defined set of these permission; it's a very basic part of the specification. so, i defined these groups and the required permissions and dumped to a fixture file. after cleaning

How to create a dynamic form queryset on using inlineformset_factory?

2010-08-13 Thread carson
hi all, i use inlineformset_facotry to edit & save the additional values for my model. #model.py class ListingShippingService(models.Model): site = models.ForeignKey(Site) is_international = models.BooleanField(default=False) is_flat = models.BooleanField(default=False)

How can reverse('opensearch') work in the shell, but fail in a Test?

2010-08-13 Thread Bryan
I'm trying to install django-lean into my application. Open search is used in my app App. I can reverse('opensearch') in the Python shell. However, in the test, reverse('opensearch') * NoReverseMatch: Reverse for 'opensearch' with arguments '()' and keyword arguments In [47]:

Django Matrimonial Apps,

2010-08-13 Thread Rizwan Mansuri
Hello all, I am thinking to start writing app for Matrimonial/Dating. If anyone knows about anyone doing same project could please divert me to him/her/community. I would appreciates if anyone would like to join for this project. I am aiming to finish this within three month with basic

Inserting a row with x_set or select_related

2010-08-13 Thread Juan Hernandez
Hey there, Let's say that I have these models: *from django.contrib.auth.models import User* * * *class Publisher:* *name = Char(x)* * * *class Author:* *publisher = FK(Publisher)* *name = Char(x)* * * *class Book:* *user = FK(User)* *author = FK(Author)* *name = Char(x)*

Re: Different Django instances running on the same server

2010-08-13 Thread John Pencola
Rick, Absolutely! You'll want to take a look at installing virtualenv on that server. By running separate Python virtual environments you can install different modules and versions of those modules in "isolation" and then instruct your web server to reference a specific virtualenv. Here are a

Re: Bind variables in Oracle backend - how to use them?

2010-08-13 Thread Ian
On Aug 13, 11:04 am, buddhasystem wrote: > Friends, > > I'm in need of an implementation which calls for using bind variables (in > Oracle sense, not generic) in my SQL in a Django application. > > Any experience with that, anyone? To use raw SQL with Django, see:

Re: Different Django instances running on the same server

2010-08-13 Thread buddhasystem
Hello there, sure it can also be done, but it's hardly worth the effort imho. Just let these sit on two different ports and inform the client. If you are still compelled to redirect requests based on origin while using one external port, it's doable from inside Django as well -- you look at the

Re: Different Django instances running on the same server

2010-08-13 Thread Steve Holden
On 8/13/2010 1:09 PM, buddhasystem wrote: > CLIFFORD ILKAY wrote: >> >> On 08/12/2010 12:18 PM, Rick Caudill wrote: >>> Hi, >>> >>> Is it possible to run Django 1.1 and Django 1.2 on the same server? I >>> have some legacy apps that I need to port to 1.2 but until then I would >>> still like to

Re: csv files

2010-08-13 Thread Steve Holden
On 8/13/2010 12:59 PM, Tony wrote: > My script right now basically just reads from a csv file and puts it > into a dictionary for me. However, when I make my own csv file (just > the same as any I have seen), it acts inconsistently. For example, > sometimes it starts at the second line and

Re: javascript

2010-08-13 Thread buddhasystem
That's easy as other people explained, but not too flexible. I like putting hidden divs in my HTML and using jQuery to find this and parse out the data. This way, you can store complete structures id needed. elharoussi wrote: > > Hi > Is it possible to give a javascript function a django

Re: Different Django instances running on the same server

2010-08-13 Thread buddhasystem
I think it's even simpler than this. When configuring your Apache, you specify a few different virtual hosts listening on different ports. For each host, you give a different PYTHONPAH. And that's it. CLIFFORD ILKAY wrote: > > On 08/12/2010 12:18 PM, Rick Caudill wrote: >> Hi, >> >> Is it

Re: How to check for m2m orphans before deleting an object?

2010-08-13 Thread Nick Serra
Look into the clear() method on many to many relations. Calling .clear() before a delete will remove all relations between the models and allow you to delete the category only. You might be fighting the django admin on this though, so this would be best implemented in a custom solution. Not sure

Re: Programmatically connecting to a database

2010-08-13 Thread buddhasystem
Do you think that implementing the Router class can be helpful as well? It might save writing some code, not sure. Your answer is on this blog post: http://tidbids.posterous.com/saas-with-django-and-postgresql Good luck -- View this message in context:

Bind variables in Oracle backend - how to use them?

2010-08-13 Thread buddhasystem
Friends, I'm in need of an implementation which calls for using bind variables (in Oracle sense, not generic) in my SQL in a Django application. Any experience with that, anyone? TIA -- View this message in context:

Re: Ordering in the admin

2010-08-13 Thread Nick Serra
You can go two directions with this. First, you could use a intermediate model for the many to many join, which would allow you to specify extra field on the join, in this case the order. Read up on this here:

csv files

2010-08-13 Thread Tony
My script right now basically just reads from a csv file and puts it into a dictionary for me. However, when I make my own csv file (just the same as any I have seen), it acts inconsistently. For example, sometimes it starts at the second line and another time it kept starting at the end of the

Ordering in the admin

2010-08-13 Thread Wendy
I have a many to many field, with the horizontal available and chosen boxes in the admin. I wanted to see if there's any way that an admin can select the order that the chosen objects show up, and have it be saved and display that way. Right now, they're not ordered, but seem to show up based on

Re: Django 1.2 modelformset_factory fails with meta: widgets

2010-08-13 Thread Matthew R
I got hit by this same bug and here's the workaround I used, for future reference. Basically you need to specify a formfield_callback kwarg to modelformset_factory that just passes along any kwargs it receives (namely, in this case, the 'widget' argument) to Field.formfield(): def

Re: convert textinput in label or text for a modelform and modelformset_factory

2010-08-13 Thread refreegrata
the idea isn't depend of javascript. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com.

Re: convert textinput in label or text for a modelform and modelformset_factory

2010-08-13 Thread refreegrata
i'm sorry,but i don't understand the question. the model is only an example. My idea is a model like this: -- class Format(models.Model): code = models.CharField(max_length=10) name =

Re: javascript

2010-08-13 Thread pengwupeng pengwupeng2008
of course ,you can,but you should add ", function myJavaScriptFunction( pValue ) { var aa= “{{pValue.getName}}”; ... } 2010/8/13 Imad Elharoussi > I mean can we make operations to the DjangoTemplateVariable in the > javascript function > for example: > function

Re: Encoding with {% url %} tag

2010-08-13 Thread shacker
On Aug 12, 9:22 am, aa56280 wrote: > I'm using the url tag like so: {% url app.views.blah var1, var2 %} > > var1 and var2 need to be encoded, using the iriencode filter, so I > tried this: {% url app.views.blah var1|iriencode, var2|iriencode %} > > That doesn't do anything

Book's sample code dl

2010-08-13 Thread Mike W.
Hi, I was wondering if anybody has a location for the sample code download for the book/author/publish application in the Django book. I'm getting hung up on making forms and updating multiple tables (foreign keys) in a database. It seems like there's a lot of tutorials out there that will

Re: javascript

2010-08-13 Thread Daniel Roseman
On Aug 13, 3:50 pm, Imad Elharoussi wrote: > I mean can we make operations to the DjangoTemplateVariable in the > javascript function >  for example: > function myJavaScriptFunction( pValue ) { > >   {{pValue.getName}} > ... > > } > No. How would that be possible? The

Re: How to check for m2m orphans before deleting an object?

2010-08-13 Thread Alessandro Pasotti
2010/8/13 cootetom > Hi, as far as i'm aware, the delete method on models only get's called > if you delete an instance of that modal directly. So if you delete a > modal who has many children, the child delete methods don't get > called. So I suppose the next question would

Re: How to check for m2m orphans before deleting an object?

2010-08-13 Thread cootetom
Hi, as far as i'm aware, the delete method on models only get's called if you delete an instance of that modal directly. So if you delete a modal who has many children, the child delete methods don't get called. So I suppose the next question would be are you deleting TrackCategory's directly or

How to check for m2m orphans before deleting an object?

2010-08-13 Thread Alessandro Pasotti
Hi, I have a m2m like this: class TrackCategory(Model): class Track(Model): category = models.ManyToManyField(TrackCategory) I want to avoid that users delete a TrackCategory which contains Tracks, the best would be to allow deletion of the TrackCategory if and only the linked Tracks

Re: javascript

2010-08-13 Thread Imad Elharoussi
I mean can we make operations to the DjangoTemplateVariable in the javascript function for example: function myJavaScriptFunction( pValue ) { {{pValue.getName}} ... } 2010/8/13 Tim Sawyer > Yes > > myJavaScriptFunction( {{DjangoTemplateVariable}} ); > > function

Re: Best practice for maintaining the "Django stack"

2010-08-13 Thread Thomas Guettler
Hi, I develop on Linux and all my code is in $HOME and the code of django and third party apps are in $HOME, too. The Django SVN branch http://code.djangoproject.com/svn/django/branches/releases/1.2.X/ is checked out to _django1.2.X. And there is a symlink from $HOME/django to _djangoVERSION.

Re: javascript

2010-08-13 Thread Boguslaw Faja
Hi, Why not? onclick="javascript:alert('{{param}}');" ? best regards, On Fri, Aug 13, 2010 at 4:31 PM, Imad Elharoussi wrote: > Hi > Is it possible to give a javascript function a django variable as a > parameter? > thank you > > -- > You received this message

Re: javascript

2010-08-13 Thread Tim Sawyer
Yes myJavaScriptFunction( {{DjangoTemplateVariable}} ); function myJavaScriptFunction( pValue ) { ... } Tim. > Hi > Is it possible to give a javascript function a django variable as a > parameter? > thank you > > -- > You received this message because you are subscribed to the Google Groups

javascript

2010-08-13 Thread Imad Elharoussi
Hi Is it possible to give a javascript function a django variable as a parameter? thank you -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send

Re: Best practice for maintaining the "Django stack"

2010-08-13 Thread joconnell
Hi, I'd second that. PIP and virtual env have worked well for me too. You could also combine it with fabric in order to automate the building of different environments, so once you get a stable working environment you can use pip's 'freeze' command to create a requirements file with the exact

Re: Programmatically connecting to a database

2010-08-13 Thread Joao Silva
Your answer is on this blog post: http://tidbids.posterous.com/saas-with-django-and-postgresql Good luck On Aug 13, 2:19 pm, Jonathan Endersby wrote: > Hi > > I have a requirement that I imagine can't be too unique, however I am > unable to find examples online of

Re: Best practice for maintaining the "Django stack"

2010-08-13 Thread Daniel Abel
On Aug 13, 2:43 pm, Oivvio Polite wrote: > So I guess these errors are relating to some testing Django and/or > South does per default and that the errors might be due to some version > incompatibility between the Django/South versions I had installed last > year and the ones

Re: confusing query involving time ranges

2010-08-13 Thread Emily Rodgers
On Aug 13, 11:18 am, Steven Davidson wrote: > > It would have to be another datetime field rather than an is_current flag > > because an is_current flag wouldn't help me for queries in the past (if that > > makes sense). > > Ah yes, of course, I had not fully

Best practice for maintaining the "Django stack"

2010-08-13 Thread Oivvio Polite
I started playing around with Django sometime early 2009, did the tutorial and got started on a toy project. Then something came inbetween and now, coming back to my toy project I notice that the unit test spit out a lot of errors relating to the migration tool South. I've haven't written any test

Programmatically connecting to a database

2010-08-13 Thread Jonathan Endersby
Hi I have a requirement that I imagine can't be too unique, however I am unable to find examples online of how to achieve what I'm trying to do. In simple terms, I need a setup where each one of my user's data is stored in their own database. (We're using mysql). I have a master database that

Re: form developer

2010-08-13 Thread Baurzhan Ismagulov
On Fri, Aug 13, 2010 at 02:19:11AM -0700, Laurentiu wrote: > I am new to django and i want to ask if i can find a form developer > with drag and drop support for widgets and validations, database > binding fields, etc (like a desktop application). > > i look at some solutions for django like

form developer

2010-08-13 Thread Laurentiu
Hello! I am new to django and i want to ask if i can find a form developer with drag and drop support for widgets and validations, database binding fields, etc (like a desktop application). i look at some solutions for django like formunculous but i want something more complex. thanks a lot

Re: Help needed for XML to xslt conversion

2010-08-13 Thread Boguslaw Faja
Hi, are you trying to do that using django or this group had been choosed at random? :-) I suggest looking for 'xpath'. hint: /[...@attr="val"] best regards, On Fri, Aug 13, 2010 at 8:36 AM, Rahul wrote: > > Hi > I have seen a lots of example to pick the data from

Re: confusing query involving time ranges

2010-08-13 Thread Steven Davidson
> > It would have to be another datetime field rather than an is_current flag > because an is_current flag wouldn't help me for queries in the past (if that > makes sense). Ah yes, of course, I had not fully grasped that bit. A nullable foreign key reference to the State that supersedes it might

Re: confusing query involving time ranges

2010-08-13 Thread Emily Rodgers
On Aug 13, 9:51 am, Steven Davidson wrote: > Hmm, I can't fathom it. > > I would opt for a single simple query that returns a little more than you > need and post-process it in python. This would be more maintainable than a > hairy ORM query, I'd say; but if you

Re: reading pickled files

2010-08-13 Thread Daniel Roseman
On Aug 12, 4:53 pm, Tony wrote: > This is more of a python question but its in my Django project.  I am > reading a unicode object and an integer from a database into a > dictionnary and storing that in a pickled file.  Ive confirmed the > dictionary is done correctly because

Re: confusing query involving time ranges

2010-08-13 Thread Steven Davidson
Hmm, I can't fathom it. I would opt for a single simple query that returns a little more than you need and post-process it in python. This would be more maintainable than a hairy ORM query, I'd say; but if you have vast numbers of results that may not be appropriate. Alternatively, and presuming

Re: new Django-Python can't get to sqlite

2010-08-13 Thread Piotr Zalewa
Google "install sqlite/mysql $your_operating_system" If you provide more info (result of running yolk and your operating system) we will be able to help you a bit more. zalun On 10-08-13 03:15, Tom wrote: It's my first time using Django& I'm unable to get the demo going. I would like to use

Help needed for XML to xslt conversion

2010-08-13 Thread Rahul
Hi I have seen a lots of example to pick the data from simple xml for example Empire Burlesque Bob Dylan USA Columbia 10.90 1985 to convert it into a table following xsl works But

Re: confusing query involving time ranges

2010-08-13 Thread Emily Rodgers
On Aug 12, 8:26 pm, Alec Shaner wrote: > Hopefully some django sql guru will give you a better answer, but I'll take > a stab at it. > > What you describe does sound pretty tricky. Is this something that has to be > done in a single query statement? It doesn't have to be,

Re: confusing query involving time ranges

2010-08-13 Thread Paulo Almeida
I see. What about Alec Shaner's suggestion? If you replace 'order_by' with 'latest' it will be similar to my suggestion with just two queries. - Paulo On Fri, Aug 13, 2010 at 8:28 AM, Emily Rodgers wrote: > On Aug 12, 10:00 pm, Paulo Almeida

Re: confusing query involving time ranges

2010-08-13 Thread Emily Rodgers
On Aug 12, 10:00 pm, Paulo Almeida wrote: > Can you sequentially add the states for each foo? I'm thinking of something > like: > > states = [] > for foo in foos: >     foo_state = State.objects.filter(foo=foo, first_dt__lte=dt, > last_dt__gte=dt) >     if foo_state:

Re: convert textinput in label or text for a modelform and modelformset_factory

2010-08-13 Thread Boguslaw Faja
Hi, fast question: why fields = ['nombre'] instead of fields = ['name2'] ? Best regards On Wed, Aug 11, 2010 at 3:59 PM, refreegrata wrote: > with a model like this: > -- > class Format(models.Model): >    name1 =

Re: reading pickled files

2010-08-13 Thread Boguslaw Faja
Hi, without any code it's hard to say what can be a source of the problem. best regards, On Thu, Aug 12, 2010 at 5:53 PM, Tony wrote: > This is more of a python question but its in my Django project.  I am > reading a unicode object and an integer from a database into a >