Running html files in /var/www alongwith Django over Apache

2011-12-22 Thread nipun batra
Hi,I got my Apache Mod_WSGI and Django working following http://blog.stannard.net.au/2010/12/11/installing-django-with-apache-and-mod_wsgi-on-ubuntu-10-04/with a twist that my 000-default site has the contents ServerAdmin webmaster@localhost DocumentRoot /home/nipun/webdev/demo/demo

Re: Which IDE should I use for Django?

2011-12-22 Thread kenneth gonsalves
On Thu, 2011-12-22 at 16:44 +, Cal Leeming [Simplicity Media Ltd] wrote: > Personally - I'd recommend Sublime Text 2 - but this is a text editor, > not really an IDE. actually the best IDE is the linux desktop - especially if you have 2 or more monitors. -- regards Kenneth Gonsalves -- You

Django 1.4 alpha 1 released

2011-12-22 Thread James Bennett
Tonight as part of the 1.4 development process, we've released the first alpha for Django 1.4. You can read all about it on the blog: https://www.djangoproject.com/weblog/2011/dec/22/14-alpha-1/ And in the release notes: https://docs.djangoproject.com/en/dev/releases/1.4-alpha-1/ -- "Bureaucr

Re: Jython zxJDBC / Python cx_oracle wrong number or types of arguments when calling to oracle's stored procedure

2011-12-22 Thread Python_Junkie
I presume that the stored procedure has been created. I use the python module pyodbc. Google has good documentation how to set this up. then after creating the connection you can execute the stored procedure 4 lines of code will then create the crsr followed by the execution crsr.execute('stor

Re: Compare two tables in a secondary database

2011-12-22 Thread Python_Junkie
Putting django aside for the moment, are you able to take the sql that you wrote above and write a python script with the sql code above. I use the pyodbc module to perform all of my sql scripts. Once you write the successful python sql script, you can import this working module into a django vie

Re: Which IDE should I use for Django?

2011-12-22 Thread Alex Mandel
On 12/20/2011 06:28 AM, Parisson wrote: On 20/12/2011 08:23, Alex Mandel wrote: Code completion is subpar, actually one of the worst python editors for that because you have to pregenerate the lists. Eric's completion is based on QScintilla and works fast here.. Do you know any completion sys

Generic views parameter 'extra_context' didn't use form class?

2011-12-22 Thread 郁夫
hi, I use a form class in Generic views 'list_detail.object_list' para 'extra_context ' form > class DevSrcForm(forms.Form): > f_eqno = forms.CharField(label='编号') > f_eqclass = forms.ChoiceField(choices=(),widget=forms.Select(attrs={}),label='分类') > f_ipaddress = forms.CharField(re

Re: Weekly discussion/randoms thread..

2011-12-22 Thread Cal Leeming [Simplicity Media Ltd]
I'm thinking that if we keep this a strictly on-list event, it will encourage people to get involved at any time, simply by replying to the thread. We'd pick a day which consistently shows most activity, and someone would just start the thread off on that day. Maybe a few 'etiquette' rules for th

Re: Which IDE should I use for Django?

2011-12-22 Thread Matteius
PyCharm 2.0 has been released and I've been using PyCharm for over a year now with strong results. It is great to have an editor that can correct you and help auto-complete your code. -Matteius On Dec 19, 10:42 am, Masklinn wrote: > On 2011-12-19, at 16:30 , Andre Terra wrote: > > > > > What do

Re: Compare two tables in a secondary database

2011-12-22 Thread Edvinas Narbutas
Yeah, the ORM didn't work out as i thought for this. I have written this raw query with a model. Alot less code compared to as before. class itemSearch(models.Model): typeID = models.SmallIntegerField(primary_key = True)typeName = models.CharField(max_length = 200) item_search_results = itemS

Ember.js or Backbone.js for Django?

2011-12-22 Thread Jesramz
Which of these is best suited to work with django? -- 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 email to django-users+unsubscr...@google

Re: Weekly discussion/randoms thread..

2011-12-22 Thread Russell Keith-Magee
On Fri, Dec 23, 2011 at 12:39 AM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > Since starting, PythonWeekly seems to have been sending out some quite > useful and interesting information.. > > Although it's not directly related to Django, a lot of the informa

Re: Compare two tables in a secondary database

2011-12-22 Thread Python_Junkie
I think you are limiting yourself by excluding sql. I use the ORM for the admin side of the house and I use sql for all of my web based presentations. SQL will do everything that you want to achieve. ORM has limitations as you have seen. On Dec 22, 7:27 am, kr0na wrote: > Im trying to compare

Professional forum software that integrates with Django

2011-12-22 Thread Mark Stahler
Does any one know of a professional forum package, commercial or open source like vBulletin, phpBB or similar that easily integrates with Django's authentication system? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Using filter for serialized model.Field's

2011-12-22 Thread Matt Schinckel
I'm guessing it's got to do with testing for equality. It will be restricted to how the field prepares data for querying the database, and (speaking as the maintainer of JSONField) you need to be very careful with querying on json fields, as the data is stored as a string, so changes about how

geodjango admin polygonfield with hole

2011-12-22 Thread Josh K
I've set up geodjango to use the OSMGeoAdmin model. One of the models I've created has a PolygonField. GeoDjango states it follows the OpenGIS Simple Features specification. The spec lists a polygon as being able to have a "hole". So does anyone know how to draw a hole on the OSMGeoAdmin model slip

Re: Weekly discussion/randoms thread..

2011-12-22 Thread Cal Leeming [Simplicity Media Ltd]
Sure, here you go: Taken from: http://excess.org/article/2011/12/unfortunate-python/ if __name__ == '__main__'

how to use asyncore socket in django views.py

2011-12-22 Thread Kay
if I have easy asyncore socket code as follow: -- import socket import asyncore class asysocket(asyncore.dispatcher): def __init__(self,host,port): asyncore.dispatcher

Re: Compare two tables in a secondary database

2011-12-22 Thread Edvinas Narbutas
Im trying to query the second DB for information. Its a back up from another database, its separate from default, here is the settings.py -> DATABASES: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': '#', 'USER': '#', 'PASSWORD': '#',

Re: Which IDE should I use for Django?

2011-12-22 Thread Cal Leeming [Simplicity Media Ltd]
Personally - I'd recommend Sublime Text 2 - but this is a text editor, not really an IDE. But, it doesn't come with 'useful' code completion or code intellisense. It also really depends on what sort of developer you are.. If you came from a background of using a text editor like vi/nano/editra,

Weekly discussion/randoms thread..

2011-12-22 Thread Cal Leeming [Simplicity Media Ltd]
Since starting, PythonWeekly seems to have been sending out some quite useful and interesting information.. Although it's not directly related to Django, a lot of the information is highly relevant to every day Django use. It also got me thinking, perhaps it would be nice to have a weekly thread

am I understanding sessions correctly?

2011-12-22 Thread Chris Curvey
The short version: when processing a request, does Django *always* collect session information from the session store before starting the view? The long version: i have an application that makes heavy use of AJAX. When a user changes something on the page, the page fires an AJAX POST to apply t

Re: Which IDE should I use for Django?

2011-12-22 Thread Lord Max
For me Eric con linux and pyScripter on windows To my point of view debug is fundamental -- 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/-/o6WWR1kA5lAJ. To po

Re: Select field with default text

2011-12-22 Thread Andre Terra
You could perhaps subclass ChoiceField to allow for custom empty_labels. This code is highly untested and written so casually it shouldn't be pasted anywhere. # your forms.py from django.forms.fields import ChoiceField class MyCustomChoiceField(ChoiceField): def __init__(self, *args, **kwarg

Re: Which IDE should I use for Django?

2011-12-22 Thread jrief
Eclipse + PyDev -- 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 email to django-users+unsubscr...@googlegroups.com. For more options, visit

Using filter for serialized model.Field's

2011-12-22 Thread jrief
Hi, I have i weird problem when using model fields JSONField and PickledObjectField together with the filter function. from jsonfield.fields import JSONField from picklefield.fields import PickledObjectField class Item(models.Model): picklefield = PickledObjectField(null=True, blank=True)

Re: Select field with default text

2011-12-22 Thread Tom Evans
On Thu, Dec 22, 2011 at 12:37 PM, talbronstien wrote: > Hi, > > I want to have a field in a form class which will render as select in > html. But, I want default text shown as "Select Blood Type". My > declaration is > > gender = forms.ChoiceField(required=False,choices = > USER_BLOOD_CHOICES). >

Re: Compare two tables in a secondary database

2011-12-22 Thread Tom Evans
On Thu, Dec 22, 2011 at 12:27 PM, kr0na wrote: > Im trying to compare two tables in a second database that is a > migrated database from mssql. The second database doesn't have any > apps for it, it will only be used for queries. > > This are my models for the two tables. > from django.db import m

Select field with default text

2011-12-22 Thread talbronstien
Hi, I want to have a field in a form class which will render as select in html. But, I want default text shown as "Select Blood Type". My declaration is gender = forms.ChoiceField(required=False,choices = USER_BLOOD_CHOICES). But, if I add an option value in html, as Select Blood Type". I get an

Compare two tables in a secondary database

2011-12-22 Thread kr0na
Im trying to compare two tables in a second database that is a migrated database from mssql. The second database doesn't have any apps for it, it will only be used for queries. This are my models for the two tables. from django.db import models class invGroups(models.Model): groupID = mod

Re: forms.CharField() remove text

2011-12-22 Thread Daniel Roseman
On Thursday, 22 December 2011 09:09:16 UTC, @timkofu wrote: > > Also, I just found out from here > https://docs.djangoproject.com/en/1.3/topics/forms/ that i can just: > > {{form.field_name}} > > which makes things even more flexible. > Don't forget that you will need to render the validation er

Re: forms.CharField() remove text

2011-12-22 Thread Timothy Makobu
Also, I just found out from here https://docs.djangoproject.com/en/1.3/topics/forms/ that i can just: {{form.field_name}} which makes things even more flexible. 2011/12/22 Timothy Makobu > Fantastic. Thanks Amao. > > > 2011/12/22 Branton Davis > >> AmaoZhao's answer is probably the best. Yo

Re: How to add a ManyToManyField "dynamically" to a model?

2011-12-22 Thread Hanne Moa
On 20 December 2011 19:07, huseyin yilmaz wrote: > Generic forign key might help you I want to avoid Generic Foreign Keys as I don't like them much, philosophically speaking. I want something that is easier to work with from the SQL side of things. HM -- You received this message because you