GeoDjango Distances

2007-11-21 Thread Dan
Hi I started using the Geodjango branch, it seems to be working really well so far, I have a few questions that I could not find the answers to: 1 - Is there anyway in Geodjango to calculate distances between two points? 2 - When using 'dwithin' like below, what is the unit used in distance?

Re: Django Web Hosting Service

2007-11-21 Thread Hugh Bien
Another +1 for webfaction. The cheapest plan supports Django, 7.50/mo for two years in advance, but you can get a refund for your remaining time if you're not satisfied. Pretty sweet deal. On 11/21/07, Daniel Roseman <[EMAIL PROTECTED]> wrote: > > > On Nov 21, 1:57 pm, cwurld <[EMAIL

Re: generic views and form templates

2007-11-21 Thread Martin
hi, michael thanks for the help.. i've tried this but it still doesn't work. i'm doing something wrong, but i don't know what. if i remove save(), object still gets created, just without slug. my question here is: does slug field needs to have blank=True? when that is set, object gets created,

Re: Request in a template

2007-11-21 Thread Martin
Got it, thanks. I just had to insert this into my settings.py: TEMPLATE_CONTEXT_PROCESSORS = ( 'django.core.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media',

Re: Columns from one table in where

2007-11-21 Thread Alexander Nesterov
Uuups! Found solution by myself: >>> my = ArchiveCalls.objects.extra(where=['connect_time != disconnect_time']) Sorry ) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Request in a template

2007-11-21 Thread Alex Koshelev
You can use this context processor http://www.djangoproject.com/documentation/templates_python/#django-core-context-processors-request or pass request instance manually to template context in each view;) On 22 нояб, 00:56, Martin <[EMAIL PROTECTED]> wrote: > I have an parameter in my querystring

Columns from one table in where

2007-11-21 Thread Alexander Nesterov
Hello. I hope, somebody will help me with my newbie question or maybe give me some advice. I have such table in my django app: CREATE TABLE `my_archivecalls` ( ... `connect_time` datetime default NULL, `disconnect_time` datetime default NULL, ... ); I need to perform following select query:

Re: Request in a template

2007-11-21 Thread Will Larson
> I have an parameter in my querystring which i would like to access in > a template, fx: > > --- > > --- > http://www.b-list.org/weblog/2006/jun/14/django-tips-template-context- processors/ Shows you how to do just that. But, I would recommend handling that a bit different. Specifically

Re: How to create groups from code?

2007-11-21 Thread Russell Keith-Magee
On 11/21/07, Jose Jiménez <[EMAIL PROTECTED]> wrote: > > Thanks for your response Artiom, but i have a question about it. > > the documentation you link me says: "for each model in each specified > app, this command looks for the file /sql/.sql" > but i want initialize the auth_group table, so i

Re: generic views and form templates

2007-11-21 Thread Michael
Hi Martin, On Nov 22, 7:59 am, Martin <[EMAIL PROTECTED]> wrote: > i wrote this at the end of my model (for which, slug must be created > after user creates it): > > def save(self): > if not self.id: > self.slug = title.slugify() >

Request in a template

2007-11-21 Thread Martin
I have an parameter in my querystring which i would like to access in a template, fx: --- --- is this possible? Thanks. Martin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: starting point?

2007-11-21 Thread [EMAIL PROTECTED]
> dreamhost.com looks quite interesting though. how can they offer 500gb > for that price? are they serious and reliable? do they allow > subleasing of webspace? I don't recommend Dreamhost as a host for Django applications. They are 'serious' and their tech support is usually very helpful, but

Re: generic views and form templates

2007-11-21 Thread Martin
btw, after this change, object gets created, but the slug field is empty.. so i can't view the object, because of (r'^(?P\d{4})/(?P[a-z]{3})/(?P\w{1,2})/(? P[-\w]+)/$',object_detail, dict(komentar_date_dict, slug_field='slug')) thanks, martin

Re: generic views and form templates

2007-11-21 Thread Martin
Thanks a lot, guys! i'm pretty new to django and i really didn't want to use newforms in my app. but RajeshD's idea is pretty cool. it just seems that i don't know how to use slugify().. if you have just a little more time, please help me for a minute: i wrote this at the end of my model (for

Re: Class Attribute in New Forms Input Elements

2007-11-21 Thread Cristian
On Nov 21, 12:31 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > If you want custom behavior from the form, you should probably be > writing a custom form class. > I don't think this is that custom of a behavior. The old forms had this behavior by default and this customization doesn't affect

Re: Django Web Hosting Service

2007-11-21 Thread Daniel Roseman
On Nov 21, 1:57 pm, cwurld <[EMAIL PROTECTED]> wrote: > http://www.webfaction.com/ > > They are amazing and reasonably priced. Their support is great. They > have exceeded my expectations many times. > > Chuck Second this recommendation. I am very happy with them, and they have responded to

Re: Class Attribute in New Forms Input Elements

2007-11-21 Thread Daniel Roseman
On Nov 21, 8:17 pm, Cristian <[EMAIL PROTECTED]> wrote: > Thanks for the info. Unfortunately, I forgot to mention key point > (absentminded me) that I'm using the form_for_model function to create > many of these Form classes. Since I create many of these Form classes > on the fly, is there

Re: Class Attribute in New Forms Input Elements

2007-11-21 Thread James Bennett
On 11/21/07, Cristian <[EMAIL PROTECTED]> wrote: > Thanks for the info. Unfortunately, I forgot to mention key point > (absentminded me) that I'm using the form_for_model function to create > many of these Form classes. Since I create many of these Form classes > on the fly, is there another way

Re: Class Attribute in New Forms Input Elements

2007-11-21 Thread Cristian
Thanks for the info. Unfortunately, I forgot to mention key point (absentminded me) that I'm using the form_for_model function to create many of these Form classes. Since I create many of these Form classes on the fly, is there another way of specifying input element attributes? Thanks On Nov

Re: question about list_display

2007-11-21 Thread RajeshD
> > It is about how to use color in list_display. > When i use it, I didn't correctly get the colored field of > first_name. > Only get strings like '%s' in this > field. > Is there anything I misunderstand to make it work correctly? Your use of "allow_tags" looks good. A recent release of

Re: generic views and form templates

2007-11-21 Thread Michael
Hi Martin, Looking at your url conf above, I'm thinking that you're not currently using a form for your templates? I'd create a form (newform) for your model and then use this to ensure that entry of the slug field is not required [1] by the user when creating a post, and then update your form's

Re: generic views and form templates

2007-11-21 Thread RajeshD
> that work ok, when a user want to create an entry it opens > komentar_form.html and it's displayed right. but when user clicks > submit, it always returns a error for slug field. since user doesn't > write slug field (should be prepopulated, right?), No. That only happens in the admin and even

Re: Permissions and user.has_perm

2007-11-21 Thread RajeshD
> > >>> u.has_perm("person.add_person") > False What's your app_label (usually the lowercase name of the app whose models.py contains your Person class")? The has_perm method should be called with .add_person and not with .add_person

Re: generic views and form templates

2007-11-21 Thread Martin
ok, i'll rephrase this all.. i'm using django.views.generic.create_update.create_object to create an object, which has a slug field. i wrote custom template for creating objects. everytime i want to create an object i get an error, that the object with this title (or slug) already exists in my

Re: Oracle Backend - syncdb

2007-11-21 Thread Ian
On Nov 21, 5:24 am, Brot <[EMAIL PROTECTED]> wrote: > Hello, > > I expand the models.py in the django internal apps like auth, session, > contenttypes, > sites,..http://www.djangoproject.com/documentation/model-api/#db-tablespace > > This worked for me, but It's only a workaround. > I created a

Re: Python for Leopard Users. Built-in or compiled?

2007-11-21 Thread Jannis Leidel
On 21 Nov., 16:12, "Jon Atkinson" <[EMAIL PROTECTED]> wrote: > Considering OSX now comes with svn binaries, and built-in sqlite3 > python support, it's possible to be developing Django applications > very quickly with Leopard. Not to forget the availability of the setuptools :) I liked

Re: Django Web Hosting Service

2007-11-21 Thread Chris Hoeppner
I'm enrolled in the Media Temple Django Container Beta Testing programm, and so far, it's an absolute killer. They've been working close with the Django guys to make it somewhat the "official" django hoster. The django site itself is hosted on a media temple server. Though they're still in

Re: ANN: Reusable apps for Django - django-reusableapps 0.1

2007-11-21 Thread Jannis Leidel
Am 21.11.2007 um 16:57 schrieb Florian Apolloner: > Does this mean that I would need to run setup.py install after every > checkout, otherwise setuptools couldn't track it or am I mistaken? No, you don't need to install Django over and over again since it's much easier to use the "develop"

Re: Include tag - encoding

2007-11-21 Thread cwurld
opps - my mistake. The include file was not unicode encoded in utf-8. It actually was ascii with chars above above 127 making up the Spanish chars. When I converted it to unicode utf-8 all worked as expected. Chuck --~--~-~--~~~---~--~~ You received this message

Re: starting point?

2007-11-21 Thread [EMAIL PROTECTED]
thanks! i will look into symfony. i don't know yet what i will do. switching webhosters (and talking my customers into it) isn't always that easy... dreamhost.com looks quite interesting though. how can they offer 500gb for that price? are they serious and reliable? do they allow subleasing of

Re: starting point?

2007-11-21 Thread Gabriel Farrell
If you are stuck with PHP I recommend Symfony (http://www.symfony- project.org/). It's the most Django-like PHP framework I've seen. On Nov 21, 10:24 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > ok! argh... i don't want to use php anymore... :p is there at least a > django like framework

Re: ANN: Reusable apps for Django - django-reusableapps 0.1

2007-11-21 Thread Florian Apolloner
Does this mean that I would need to run setup.py install after every checkout, otherwise setuptools couldn't track it or am I mistaken? Best, Florian On 21 Nov., 16:39, Jannis Leidel <[EMAIL PROTECTED]> wrote: > Am 21.11.2007 um 13:54 schrieb Florian Apolloner: > > > Nice idea, but most (afaik)

Re: ANN: Reusable apps for Django - django-reusableapps 0.1

2007-11-21 Thread Jannis Leidel
Am 21.11.2007 um 13:54 schrieb Florian Apolloner: > Nice idea, but most (afaik) people are tracking the django-svn tree, > so we might need another way to check the version requirements? Or is > there another way to make django detectable by setuptools, although it > is a svn checkout? Good

Re: starting point?

2007-11-21 Thread [EMAIL PROTECTED]
ok! argh... i don't want to use php anymore... :p is there at least a django like framework for php someone can recommend? ...and i came across this now: http://code.djangoproject.com/ticket/2407 why did someone work on this if django + CGI is quite unusable anyway? has anyone tried this and got

Re: Python for Leopard Users. Built-in or compiled?

2007-11-21 Thread Jon Atkinson
I'm using the included Python. In past versions of OSX, I used to download and compile from MacPorts, but MacPorts has done very little to move towards Leopard at the moment (publically, that is - I'm sure they're working very hard behind the scenes), and a lot of common Python modules do not

How to specify different css properties for different fields in admin

2007-11-21 Thread Antonis Christofides
If I specify the following in the CSS: input[type='text'] { size: 60; } then the html fields for CharField in the admin are larger than the default. However, I don't want this for all fields, but only for specific fields. On the other hand, specifying "fields" in "class Admin" allows me to

Re: Setting up your django project outside the document root

2007-11-21 Thread Ian Lawrence
It is symlinking to the media folders yes...the part above this is in the tutorial is where python knows to look in your home/Web folder for the code: Add the django_projects folder to the PYTHONPATH so python knows to look here: [EMAIL PROTECTED]:~/Web$ cd .. [EMAIL PROTECTED]:~$ sudo gedit

Python for Leopard Users. Built-in or compiled?

2007-11-21 Thread jeffself
Which version of Python are you using on Leopard for Django? The included version or did you download and compile another copy? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Deploying django with mysql cluster?

2007-11-21 Thread James Bennett
On 11/21/07, Richard Coleman <[EMAIL PROTECTED]> wrote: > Does anyone have experience with using django and mysql cluster? Do we > need to modify django to handle this? Any words of wisdom? I haven't actually done it myself, but as far as I know it's a matter of: 1. Don't use syncdb to create

Deploying django with mysql cluster?

2007-11-21 Thread Richard Coleman
We have been developing our django app using standard mysql. But we plan to eventually migrate to a mysql cluster (engine is NDB). Does anyone have experience with using django and mysql cluster? Do we need to modify django to handle this? Any words of wisdom? Thanks for the help. Richard

Re: Django Web Hosting Service

2007-11-21 Thread cwurld
http://www.webfaction.com/ They are amazing and reasonably priced. Their support is great. They have exceeded my expectations many times. Chuck On Nov 21, 7:40 am, "Ronaldo Z. Afonso" <[EMAIL PROTECTED]> wrote: > Hi all, > > Can anybody recommend me a Django Web Hosting Service? > Thanks. > >

Re: Custom ManyToManyField widget in admin

2007-11-21 Thread kamil
sorry line "{{ group.grouper.name }}: [ shoud be: "{{ group.grouper.name }}": [ On Nov 21, 11:49 am, kamil <[EMAIL PROTECTED]> wrote: > Hi Julien > > in fact you don't even have to write view for it you can use generic > view as follows: > > put in your url.py: >

Django Web Hosting Service

2007-11-21 Thread Ronaldo Z. Afonso
Hi all, Can anybody recommend me a Django Web Hosting Service? Thanks. Ronaldo. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

(WWW.CNCIRCLE.COM) cheape wholesale nike jodan, af1, airmax, shox ,dunk, sneaker shoes, Gucci, prada, lacoste, lv, bape outlet shoes, and hoodies , jean, jacket, MP3,MP4, WATCH,IPHONE

2007-11-21 Thread kook
(WWW.CNCIRCLE.COM) cheape wholesale nike jodan, af1, airmax, shox ,dunk, sneaker shoes, Gucci, prada, lacoste, lv, bape outlet shoes, and hoodies , jean, jacket, MP3,MP4, WATCH,IPHONE --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: ANN: Reusable apps for Django - django-reusableapps 0.1

2007-11-21 Thread Florian Apolloner
> Versionized reusable apps are definitely a desirable feature! But I > don't like the idea of just using different entrypoints for each > Django release or other dependency. The setuptools _do_ have native > support for complex dependencies [1] via the "install_requires" > keyword. If Django

Re: Oracle Backend - syncdb

2007-11-21 Thread Brot
Hello, I expand the models.py in the django internal apps like auth, session, contenttypes, sites,.. http://www.djangoproject.com/documentation/model-api/#db-tablespace This worked for me, but It's only a workaround. I created a ticket, because I think it would be great to have the possibility

Re: starting point?

2007-11-21 Thread [EMAIL PROTECTED]
ok, thanks! but what is incredibly slow? :) a second until everything is started up each time? my apps probably would be quite small and there wouldn't be many apps. in case i would like to experiment with it nevertheless, is there a django CGI how-to somewhere? On Nov 21, 10:23 am, "James

Re: Feeds

2007-11-21 Thread Miguel Galves
Eventually, I gave up using the django feed package, and ended up writing my own. If someone is interested, please contact me. On Nov 13, 2007 9:52 PM, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > > On 14-Nov-07, at 4:39 AM, Miguel Galves wrote: > > > I dont understand your question. What do

Re: ANN: Reusable apps for Django - django-reusableapps 0.1

2007-11-21 Thread Jannis Leidel
> Versionized reusable apps are definitely a desirable feature! But I > don't like the idea of just using different entrypoints for each > Django release or other dependency. The setuptools _do_ have native > support for complex dependencies [1] via the "install_requires" > keyword. Forgot the

Re: ANN: Reusable apps for Django - django-reusableapps 0.1

2007-11-21 Thread Jannis Leidel
> I like the idea of 'django.apps', which is kinda more explicit than > just 'apps'. ;-) Yeah, though it may be confusing because there is no real "django.apps" module :-/ What about "django.applications"? Any other objections? > Following on this thought, maybe we can use version numbers

Re: Custom ManyToManyField widget in admin

2007-11-21 Thread kamil
Hi Julien in fact you don't even have to write view for it you can use generic view as follows: put in your url.py: --- from yourproject.cities.models import City urlpatterns = patterns('', .. (r'^custom_widget.js',

Re: Oracle Backend - syncdb

2007-11-21 Thread Norbert
Maybe you can change the tablespace in the initial sql, see here http://www.djangoproject.com/documentation/model-api/#database-backend-specific-sql-data Norbert --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

generic views and form templates

2007-11-21 Thread Martin
hi, i'm having a little trouble with templates for my app. here is the problem: i have title, slug and body field for my model blog. i would like other users to create blog entries, so i've used generic views and put this in my urls.py: (r'^edit/(?P\d+)/$', update_object, dict(model=Komentar,

Permissions and user.has_perm

2007-11-21 Thread Jon Atkinson
Hello, I am having some trouble with user permissions. I've read the documentation, but the built-in Permission object isn't behaving as I expect. Any help would be appreciated. I have a simple project containing one app. That app has one model, which is as follows. The model should be

Re: How to create groups from code?

2007-11-21 Thread Jose Jiménez
Thanks for your response Artiom, but i have a question about it. the documentation you link me says: "for each model in each specified app, this command looks for the file /sql/.sql" but i want initialize the auth_group table, so i haven't a model for that. i tried to put a groups.pyyaml.sql but

Re: choices option in input-field

2007-11-21 Thread Nader
I have read quickly the article "Variable Choice Lists'. I don't have a lot experience with Django, however I would try to explain my case. I have a model in which one of the fields has to be 'SelectedField', therefore I have to use a 'choices' options. class Dataset(models.Model): .

Re: starting point?

2007-11-21 Thread James Bennett
On 11/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > is it also possible to use django with normal cgi? > > i think performance wouldn't be a big problem since i only do low > traffic sites. Django does not offer direct support for CGI. The performance problem is unrelated to traffic;

Re: starting point?

2007-11-21 Thread [EMAIL PROTECTED]
is it also possible to use django with normal cgi? i think performance wouldn't be a big problem since i only do low traffic sites. On Nov 21, 5:17 am, gmacgregor <[EMAIL PROTECTED]> wrote: > On Nov 20, 3:08 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > thanks! hopefully my webhoster

Re: Understanding autoescape-aware filters

2007-11-21 Thread Ivan Sagalaev
Thanks for clarification! I have couple more things to iron out though... Malcolm Tredinnick wrote: > If we didn't have is_safe, every filter that did some kind of string > manipulation such as input = intput + 'x' would need to end with lines > like > > if isinstance(orig_input,

Oracle Backend - syncdb

2007-11-21 Thread Brot
Hello, yesterday I tried django in my company. We have oracle databases. But now I have a problem! :-( Is it possible to define TABLESPACES for the "syncdb" - CREATE TABLE - Statements? If not, where can I find the Statements in the source code to extend the statement? I am searching the source