Re: Geos (geos-3.1.0rc2) wont 'make' on Ubuntu 8.10

2009-02-13 Thread Rhoel_in_Asia
Many thanks - this is my first outing on Ubuntu ans its been about 10 years since working with Redhat Rack - unfortunately that was pre- installed so this install is in effect a first. I previously had django running on WinXP with MySQL. Linux/postgreSQL is a nasty surprise for those finding this

collapsible form

2009-02-13 Thread Alan
Hi There, So using admin pages I can see the collapsible forms in action. Now I am wondering how to have this functionality in my project. I know I need to play with css (and I don't need javascript for that), but I was wondering if there's something else hidden in forms.Form module that would help

How to set the right PostGIS path to PostgreSQL 'share' directory

2009-02-13 Thread Rhoel_in_Asia
This is a newbie question and apologies in advance. The geoDjango install instructions for PostGIS say "fNext, find out PostgreSQL’s ‘share’ directory, and specify it as the data root directory when configuring. This ensures that PostGIS places its files in a location consistent with the PostgreS

Re: Error loading sqlite3 module

2009-02-13 Thread Muslu Yüksektepe
try to setup sqlite3 or check your models.py for* _sqlite* item 2009/2/13 Sandeep > > I just installed Python 2.6.1 and Django 1.0.2 on Windows. > > I am new to Python and Django and am following the tutorial for > Django. > > Per tutorial, I am setting the 'DATABASE_ENGINE' to sqlite3 in > sett

Re: How to set the right PostGIS path to PostgreSQL 'share' directory

2009-02-13 Thread Rhoel_in_Asia
Also, when the ./confure does run, it stops with the error checking for iconv.h... yes checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking for pg_config... /usr/bin/pg_config checking for geos-config... /usr/local/bin/geos-config checking for pr

Re: How to set the right PostGIS path to PostgreSQL 'share' directory

2009-02-13 Thread James Bennett
On Fri, Feb 13, 2009 at 3:32 AM, Rhoel_in_Asia wrote: > > Also, when the ./confure does run, it stops with the error > > checking for iconv.h... yes > checking build system type... i686-pc-linux-gnu > checking host system type... i686-pc-linux-gnu > checking for pg_config... /usr/bin/pg_config >

wxDjango anyone?

2009-02-13 Thread Christian Berg
As this is my first Post here, i wan't to seend a warm welcome here to you Django Users. Like many other People here on this List (and out there in the real World). I startet to love Python and Django (and PyGame). I'm not a real Programmer, i only code some small and trivial web-apps for person

Re: Processing a file...

2009-02-13 Thread Jacob Rigby
The testserver is single threaded (assuming you're using django- admin.py runserver), so it would appear to hang until the os.popen call completes. If it's really crashing, then something horrible must be going wrong with the child process. In a production setting, where you're using a multiproc

Re: Need to create a account_number column which is concat of id and some variable

2009-02-13 Thread Rama Vadakattu
there are many ways of solving this problem. please see the below thread for more details where similar problem was discussed : http://groups.google.com/group/django-users/browse_thread/thread/3a9960139307aaec/77b712ee9c08795b#77b712ee9c08795b Another method which you can use is =

how to populate field values in model.py before they are saved

2009-02-13 Thread gganesh
hi can i insert manually the values for fields before save method is called example in models.py i have class Auto(...) auto_name=models.CharField(..) my question is can i populate auto_name ='xyz' and then save by calling super class save method , --~--~-~--~~~---

Re: Group By and aggregation

2009-02-13 Thread Alessandro
2009/2/10 Alessandro > > > 2009/2/10 Russell Keith-Magee > >> >> >> i.e., plural modules, not singular module, in the Max lookup. It's the >> reverse lookup name for the module relationship on Module_scheme. For >> future reference, the message on the FieldError tells you the right >> name - mod

Re: Group By and aggregation

2009-02-13 Thread Russell Keith-Magee
On Fri, Feb 13, 2009 at 6:54 PM, Alessandro wrote: > > > 2009/2/10 Alessandro >> >> >> 2009/2/10 Russell Keith-Magee >>> >>> >>> i.e., plural modules, not singular module, in the Max lookup. It's the >>> reverse lookup name for the module relationship on Module_scheme. For >>> future reference,

Re: blank=True on Char/TextFields

2009-02-13 Thread Praveen
Hi Toby, you have not read properly the django docs. Note that empty string values will always get stored as empty strings, not as NULL. only use null=True for non-string fields such as integers, booleans and dates. For both types of fields, you will also need to set blank=True if you wish to p

Re: [Fwd: Error with File object]

2009-02-13 Thread Stefan Tunsch
Thanks Karen. Karen Tracey escribió: On Thu, Feb 12, 2009 at 9:55 AM, Stefan Tunsch wrote: I think I found a bug in the trunk. I downgraded to rev 9700 and it started to work again. Regards, Stefan I opened a ticket to track this: http:/

Re: Need to create a account_number column which is concat of id and some variable

2009-02-13 Thread gganesh
thanks for your reply On Feb 13, 2:46 pm, Rama Vadakattu wrote: > there are many ways of solving this problem. > please see the below thread for more details where similar problem was > discussed > :http://groups.google.com/group/django-users/browse_thread/thread/3a99... > > Another method

Re: how to populate field values in model.py before they are saved

2009-02-13 Thread bruno desthuilliers
On 13 fév, 10:51, gganesh wrote: > hi > can i insert manually the values for fields before save method is > called > example in models.py i have > class Auto(...) >      auto_name=models.CharField(..) > my question is can i populate auto_name ='xyz' and then save by > calling super class save m

Re: wxDjango anyone?

2009-02-13 Thread bruno desthuilliers
On 13 fév, 09:38, Christian Berg wrote: (snip) > After 3 Weeks of Django Hacking i want to use the DjangoORM for the > wxBackend to. > > Has anybody an idea how i could import django in an wxPython > applicaton? http://docs.djangoproject.com/en/dev/topics/settings/#using-settings-without-setting

Re: collapsible form

2009-02-13 Thread bruno desthuilliers
On 13 fév, 09:24, Alan wrote: > Hi There, > So using admin pages I can see the collapsible forms in action. Now I am > wondering how to have this functionality in my project. I know I need to > play with css (and I don't need javascript for that), I really wonder how you could achieve this with

Re: how to populate field values in model.py before they are saved

2009-02-13 Thread gganesh
thanks for your reply On Feb 13, 3:40 pm, bruno desthuilliers wrote: > On 13 fév, 10:51, gganesh wrote: > > > hi > > can i insert manually the values for fields before save method is > > called > > example in models.py i have > > class Auto(...) > >      auto_name=models.CharField(..) > >

Re: Changing the name of a project

2009-02-13 Thread Tim Chase
> I've written about one extreme end of this scale further over here: > http://www.pointy-stick.com/blog/2007/11/09/django-tip-developing-without-projects/ I've gotta admit that I was pretty ambivalent about Malcolm's ideas here until I needed to rename a project -- at which point the switch fl

Re: collapsible form

2009-02-13 Thread Alan
Thanks for your reply Bruno. On Fri, Feb 13, 2009 at 10:50, bruno desthuilliers < bruno.desthuilli...@gmail.com> wrote: > > On 13 fév, 09:24, Alan wrote: > > > I really wonder how you could achieve this without javascript (unless > of course you plan on reloading the whole page, but I doubt this

Re: Thoughts on nested Model references and JSON serialization

2009-02-13 Thread django_fo...@codechimp.net
By multiple calls I meant calls from the browser to the server. Right, in my case, now I may one call to get a list of news articles. One potential solution here would be to make the call to get the list of articles, then make another call to get the author for each article. I mentioned exponenti

Charts for Admin Interface

2009-02-13 Thread Robert
Dear Community, did ever anybody try to add charts (i.e. with ReportLab) to the admin interface? I think it would be a very nice feature to show statistics, ... First the user should be able to make some choices and then depending on these choices django should create a chart (values of course ou

Re: Processing a file...

2009-02-13 Thread Graham Dumpleton
On Feb 13, 8:42 pm, Jacob Rigby wrote: > The testserver is single threaded (assuming you're using django- > admin.py runserver), so it would appear to hang until the os.popen > call completes.  If it's really crashing, then something horrible must > be going wrong with the child process. > > In

GeoDjango - Center of a Polygon

2009-02-13 Thread Alfonso
How do I grab the center x and y co-ordinates of a polygon and display that in a template? I'd do this with a PointField... {{ object.coords.x }} etc Can I do that to get the center x and y points of a polygon? Thanks --~--~-~--~~~---~--~~ You received this messa

Re: blank=True on Char/TextFields

2009-02-13 Thread Lee Braiden
2009/2/13 Praveen : > Avoid using null on string-based fields such as CharField and > TextField unless you have an excellent reason. What exactly is the reasoning behind this advice? It seems to me that one would very rarely want to store an empty string. For example, if a user doesn't enter a

Re: blank=True on Char/TextFields

2009-02-13 Thread James Bennett
On Fri, Feb 13, 2009 at 6:31 AM, Lee Braiden wrote: > What exactly is the reasoning behind this advice? It seems to me that > one would very rarely want to store an empty string. For example, if > a user doesn't enter a surname, that does not mean that their surname > is "", unless they're Cher

Re: collapsible form

2009-02-13 Thread Daniel Roseman
On Feb 13, 11:23 am, Alan wrote: > Indeed, I have been looking > athttp://docs.djangoproject.com/en/dev/intro/tutorial02/#s-customize-th... > used 'classes': ['collapse'] in my admin page to see how it works and > I > don't see any javascript there and I don't believe page is been reloaded. You

Strange problem with templates when running as FCGI daemon

2009-02-13 Thread Yousef Salimpour
I'm going to deploy a django application using nginx, and I have a strange problem. Everything is ok when running the app using test server or even as fcgi with daemonize=false, but when I run without daemonize=false, It seems that django doesn't detect my customized templates in templates folder.

could not do post save functionality

2009-02-13 Thread gganesh
hi, The post save functionality is not working fine for me , please rectify mu faults , i have tried 2 ways to access post save functionality but both failed ( shown below as no :1 and no: 2 ) i case of no: 1 i got the o/p of line no 12 in the server but after saving ,line no 14 is not displaye

Re: collapsible form

2009-02-13 Thread Alan
Gosh, you're right. From the source of admin: Thanks a lot, Alan On Fri, Feb 13, 2009 at 12:51, Daniel Roseman wrote: > > On Feb 13, 11:23 am, Alan wrote: > > Indeed, I have been looking athttp:// > docs.djangoproject.com/en/dev/intro/tutorial02/#s-customize-th... > > used 'classes': ['colla

Re: Thoughts on nested Model references and JSON serialization

2009-02-13 Thread django_fo...@codechimp.net
Obviously I was tired when I wrote this. I apologize for the grammatical errors, which were a-plenty. On Feb 12, 5:51 pm, Russell Keith-Magee wrote: > On Thu, Feb 12, 2009 at 10:17 PM, django_fo...@codechimp.net > > > > wrote: > > > I wanted to get the communities thoughts on this subject.  I

(GeoDjango.. again) Silly question - grab single lat and long value from a MultiPointField?

2009-02-13 Thread Alfonso
PointField in a template... I can do {{ object.point.x }} and {{ object.point.y }} - works fine. But with a MultiPointField doing the same gives me nada. Where am I going wroing? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Strange problem with templates when running as FCGI daemon

2009-02-13 Thread Yousef Salimpour
UPDATE : Problem fixed by adding workdir option to manage.py runfcgi command and providing absolute path to project. On Feb 13, 3:14 pm, Yousef Salimpour wrote: > I'm going to deploy a django application using nginx, and I have a > strange problem. > Everything is ok when running the app using t

Re: Processing a file...

2009-02-13 Thread Amirouche B.
thank you for your answers and the insight into the how servers works. Using a background process, is kind of a burden for deployement but let's do it the way it works :D --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

Re: Admin template and Apache

2009-02-13 Thread will0
Hi May. You'll need to make the admin media accessible from and set ADMIN_MEDIA_PREFIX correctly. For instance, I keep my admin media folder in my media folder. I therefore have: ADMIN_MEDIA_PREFIX = 'http://myserver/media/admin/' As for the urlconf error, just go back to (r'^admin/(.*)', admi

Re: GeoDjango - Center of a Polygon

2009-02-13 Thread Justin Bronn
On Feb 13, 6:25 am, Alfonso wrote: > How do I grab the center x and y co-ordinates of a polygon and display > that in a template? {{ poly.centroid.x }}, {{ poly.centroid.y }} Note that the centroid point is not guaranteed to be on the surface of the polygon -- if that turns out be an issue than

Re: Error loading sqlite3 module

2009-02-13 Thread Karen Tracey
On Fri, Feb 13, 2009 at 1:16 AM, Sandeep wrote: > > I just installed Python 2.6.1 and Django 1.0.2 on Windows. > > I am new to Python and Django and am following the tutorial for > Django. > > Per tutorial, I am setting the 'DATABASE_ENGINE' to sqlite3 in > settings.py file. However, I get the fo

Re: comparisons with java framework

2009-02-13 Thread denis
Part of Igor's problem is the Avalanche effect: "... I need to install one more tool ... requires some dependencies ..." Avalanches can of course rumble rumble ... in installing or learning anything at all, not just Django. Two kinds of Avalanches: a) what do I need to install ? b)

Installing Django with rpm on RHEL4

2009-02-13 Thread cswebb
I've attempted to install Django via the rpm created with "setup.py bdist_rpm". RPM is created, however when attempting to install it, I get the following dependency error: error: Failed dependencies: /usr/local/bin/python is needed by Django-1.0.1_final-1.noarch Here's what a long list

Re: (GeoDjango.. again) Silly question - grab single lat and long value from a MultiPointField?

2009-02-13 Thread Justin Bronn
> But with a MultiPointField doing the same gives me nada.  Where am I > going wroing? A MultiPoint geometry is a collection, so you would index it like an array to get the Point geometry. In other words, treat like a list of Points. {{ multipoint.0.x }}, {{ multipoint.0.y }} -Justin --~--~---

Re: How to set the right PostGIS path to PostgreSQL 'share' directory

2009-02-13 Thread Justin Bronn
> flex??? Yes, `flex` is a prerequisite package to build PostGIS. If using ubuntu/debian then do `apt-get install flex`; redhat/centos then `yum install flex`. > You may have a bit more luck consulting a forum specifically for > PostGIS; people who are familiar with its workings will likely be

Re: Error loading sqlite3 module

2009-02-13 Thread Sandeep
Karen, Thank you for the tip. I am actually using Cygwin. And, I was puzzled by Python version myself. I thought it may be some internal versioning for 2.6. I will give a try with Windows prompt. Appreciate your help. Thanks, Sandeep On Feb 13, 9:41 am, Karen Tracey wrote: > On Fri, Feb 13, 20

forms - dynamically change initial values

2009-02-13 Thread Evgeny
Hi, I'm trying to make a redirect after a form has been submitted to the page with the form itself. Still I want to keep the state of the fields of the form. As the form becomes unbound after such redirect I probably have to dynamically set the initial values for the fiels of the specific exemplar

Re: Installing Django with rpm on RHEL4

2009-02-13 Thread Mike Ramirez
On Friday 13 February 2009 06:48:11 am cswebb wrote: > I've attempted to install Django via the rpm created with "setup.py > bdist_rpm". RPM is created, however when attempting to install it, I > get the following dependency error: > > error: Failed dependencies: > /usr/local/bin/python is

Years

2009-02-13 Thread bax...@gretschpages.com
I need a YearField of sorts, where users can select a year (for their car), and I'm trying to figure out how best to implement it. I'd need roughly 1901 to present. I know I could just put them all in choices, but that seems messy and a pain to maintain (even if only once a year). Better ways? --~

Re: Years

2009-02-13 Thread Daniel Roseman
On Feb 13, 4:45 pm, "bax...@gretschpages.com" wrote: > I need a YearField of sorts, where users can select a year (for their > car), and I'm trying to figure out how best to implement it. I'd need > roughly 1901 to present. I know I could just put them all in choices, > but that seems messy and a

Re: blank=True on Char/TextFields

2009-02-13 Thread tow
I'm sure it's possible that I haven't read the django docs properly; but I think my problem is actually that the Django docs don't speak to my usecase. I don't care how the database stores empty values. Really, nothing is of less interest to me, I find the details of database schemata extremely b

Re: Years

2009-02-13 Thread raj
Better ways? You mean something as simple as this? YEAR_CHOICES= [(str(y), str(y)) for y in range(1901,date.today().year +1)] .. year= forms.ChoiceField (choices=YEAR_CHOICES) Or something else? --~--~-~--~~~--

Re: Javascript problem

2009-02-13 Thread arbi
Thx, but I did this already. In fact i have no problem for a css doc, but problems for a js doc. I don't know why! My css is in "/media/css/css_file.css" and my js is in "/media/js/ test.js". A simple "alert" in my test.js file doesn't work. I don't understand. Any help? Thx! Arbi On 12 fév, 23:2

Re: Javascript problem

2009-02-13 Thread felix
use Firefox with Firebug installed if you aren't already. you can then see if you get any 404s and if any of the included files failed with syntax errors or if something happened during javascript runtime to kill it also, I like django-compress quite a bit for css and js felix :crucial-

Linked Comboboxes

2009-02-13 Thread Nathalia Sautchuk Patrício
Hi people, I'm new here and newbie in Django. I have a problem and I've tried to find the solution searching at Google but I didn't find it. I'm using the Django-admin and on one of my pages there are two combo-boxes related. I would like to filter the options in the second combo-box based on wh

Re: How to set the right PostGIS path to PostgreSQL 'share' directory

2009-02-13 Thread qwerty
2009/2/13 Justin Bronn > > > flex??? > > Yes, `flex` is a prerequisite package to build PostGIS. If using > ubuntu/debian then do `apt-get install flex`; redhat/centos then `yum > install flex`. > > > You may have a bit more luck consulting a forum specifically for > > PostGIS; people who are f

Re: Years

2009-02-13 Thread bax...@gretschpages.com
Perfect. Thanks! --~--~-~--~~~---~--~~ 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+uns

RE: Linked Comboboxes

2009-02-13 Thread Will Matos
Nathalia, I believe you have a number of options here. 1.You can overide the template for that model by creating your own tempate and providing your custom javascript/ajax calls that match the behaviour you're looking for. To do this you have to replicate the adm

Problem looping queryset in template

2009-02-13 Thread Mike Ramirez
This is the traceback for the error. http://dpaste.com/120271/ This error happens whenever I return a List of QuerySets on this page with more than one item. With one item, it works as expected. The code is here: http://dpaste.com/120278/ Using those queries in the shell are fine and iterabl

Re: Database Error

2009-02-13 Thread waltbrad
On Feb 12, 11:30 pm, Malcolm Tredinnick wrote: > > > The code you've pointed to makes debugging very hard. It completely > hides all the details of the exception. The first thing I would try > would be removing the "try" and"except" statements. If an exception > occurs, see what it is and what

Re: Problem looping queryset in template

2009-02-13 Thread Alex Gaynor
On Fri, Feb 13, 2009 at 2:13 PM, Mike Ramirez wrote: > This is the traceback for the error. > > http://dpaste.com/120271/ > > This error happens whenever I return a List of QuerySets on this page with > more than one item. With one item, it works as expected. > > The code is here: > > http://dpa

Re: Problem looping queryset in template

2009-02-13 Thread Mike Ramirez
On Friday 13 February 2009 11:17:05 am Alex Gaynor wrote: > You shouldn't have commas between the arguments to the cycle tag. > > Alexx Thank you for helping this blind bat. Mike -- I'm going to raise an issue and stick it in your ear. -- John Foreman signature.asc Descriptio

contrib.comments - sort admin-list by last comment / display add-form inline ?

2009-02-13 Thread DaleB
hi all, i have two questions concerning the comments module. is it possible to include an field in the admin change list that displays the last comment on a certain object and makes the list sortable by 'last commented on'? i think i read somewhere that you can't sort the admin list by foreign ke

Re: Admin site I18n - ForeignKeys, app names questions

2009-02-13 Thread 3lancer.eu
Thanks for all the help with 'fuzzies'. Any clues on translating foreign key fields in admin interface? Regards, Piotr --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Admin site I18n - ForeignKeys, app names questions

2009-02-13 Thread Alex Gaynor
On Fri, Feb 13, 2009 at 2:41 PM, 3lancer.eu wrote: > > Thanks for all the help with 'fuzzies'. Any clues on translating > foreign key fields in admin interface? > > Regards, > Piotr > > > A foreignkey can be marked for translation the same as any field, by providing a verbose_name argument. Alex

Re: Javascript problem

2009-02-13 Thread arbi
Ok I tryed it, and they say : "test.js is not loaded" in firebug. I don't see what to do next. What is strange also is that my background-body images are loaded on safari (no pb) and not on firefox... Any solution? thx On 13 fév, 18:19, felix wrote: > use Firefox with Firebug installed if you ar

Re: Anyone successfully install cmemcached?

2009-02-13 Thread Saurabh Sawant
Try this guide. http://lethain.com/entry/2009/feb/13/the-django-and-ubuntu-intrepid-almanac/ On Dec 30 2008, 4:19 am, meppum wrote: > I'm trying to install cmemcached on ubuntu intrepid but I keep getting > the following error when i attempt to run the test file after the > installation: > > "

Aggregating errors from multiple forms

2009-02-13 Thread zinckiwi
Hi All, I have a couple of views in my project that process two forms at once (that is, two django forms; one HTML form of course). While I maintain the User and UserProfile models separately, for UI purposes they are one construct, so I have an "Edit Account" page that uses a user_form and a pro

Re: Javascript problem

2009-02-13 Thread Briel
Firefox is known to cashe things a lot, this might be the reason why it doesn't load all the stuff. Also you should look at the page source to see if the missing js file is listet. On 13 Feb., 21:14, arbi wrote: > Ok I tryed it, and they say : "test.js is not loaded" in firebug. > I don't see wh

Re: using models interfaces as a communication layer (not to db directly)

2009-02-13 Thread Malcolm Tredinnick
On Thu, 2009-02-12 at 22:23 -0800, matt pokrzywa wrote: > Thanks for all the suggestions everyone. While it is quite the > heavyweight solution (and we'll probably just do everything w/ just > views in the end), could someone give me a small outline of the steps > I'd need to take to pull this XM

Re: Changing the name of a project

2009-02-13 Thread Malcolm Tredinnick
On Fri, 2009-02-13 at 05:07 -0600, Tim Chase wrote: > > I've written about one extreme end of this scale further over here: > > http://www.pointy-stick.com/blog/2007/11/09/django-tip-developing-without-projects/ > > I've gotta admit that I was pretty ambivalent about Malcolm's > ideas here until

Re: Javascript problem

2009-02-13 Thread felix
actually if you've got firebug on it won't cache at all. it will check if for "not modified" headers and reuse if the server says its not modified. the worst thing is that firefox is very slow with all the gadgets turned on. I use safari + firefox at the same time. just safari for speed. so arbi

Re: Thoughts on nested Model references and JSON serialization

2009-02-13 Thread mattimust...@gmail.com
On Feb 13, 10:31 pm, "django_fo...@codechimp.net" wrote: > By multiple calls I meant calls from the browser to the server. > Right, in my case, now I may one call to get a list of news articles. > One potential solution here would be to make the call to get the list > of articles, then make ano

Re: forms - dynamically change initial values

2009-02-13 Thread Malcolm Tredinnick
On Fri, 2009-02-13 at 07:15 -0800, Evgeny wrote: > Hi, > I'm trying to make a redirect after a form has been submitted to the > page with the form itself. Still I want to keep the state of the > fields of the form. As the form becomes unbound after such redirect I > probably have to dynamically se

Re: Installing Django with rpm on RHEL4

2009-02-13 Thread Malcolm Tredinnick
On Fri, 2009-02-13 at 06:48 -0800, cswebb wrote: > I've attempted to install Django via the rpm created with "setup.py > bdist_rpm". RPM is created, however when attempting to install it, I > get the following dependency error: > > error: Failed dependencies: > /usr/local/bin/python is n

Re: Aggregating errors from multiple forms

2009-02-13 Thread Malcolm Tredinnick
On Fri, 2009-02-13 at 14:08 -0800, zinckiwi wrote: > Hi All, > > I have a couple of views in my project that process two forms at once > (that is, two django forms; one HTML form of course). While I maintain > the User and UserProfile models separately, for UI purposes they are > one construct, s

Default values in model classes

2009-02-13 Thread Chris Lieb
I am new to Django and am trying to write a model to interact with an existing database. One of the fields in the database has a default value. To compensate for this, I added default=0 to the Field declaration. When I went to generate the DDL for the schema to make sure that I had done everyth

Re: Default values in model classes

2009-02-13 Thread Malcolm Tredinnick
On Fri, 2009-02-13 at 14:42 -0800, Chris Lieb wrote: > I am new to Django and am trying to write a model to interact with an > existing database. One of the fields in the database has a default > value. To compensate for this, I added default=0 to the Field > declaration. When I went to generat

Re: Changing the name of a project

2009-02-13 Thread Lee Braiden
2009/2/14 Malcolm Tredinnick : > Fact is, there's nothing particularly wrong > with using a project directory or even the project name, providing > things remain within that namespace. A large portion of code that's > written isn't going to be reusable apps Have to disagree here. Not only does t

Re: Changing the name of a project

2009-02-13 Thread Malcolm Tredinnick
On Sat, 2009-02-14 at 02:11 +, Lee Braiden wrote: > 2009/2/14 Malcolm Tredinnick : > > Fact is, there's nothing particularly wrong > > with using a project directory or even the project name, providing > > things remain within that namespace. A large portion of code that's > > written isn't g

Re: Thoughts on nested Model references and JSON serialization

2009-02-13 Thread mattimust...@gmail.com
Hi, I've finally pulled my finger out and written up some documentation on how to use my serializers. You can find it at: http://code.google.com/p/wadofstuff/wiki/DjangoFullSerializers On Feb 14, 11:23 am, "mattimust...@gmail.com" wrote: > On Feb 13, 10:31 pm, "django_fo...@codechimp.net" > >

How to display html text in database back on screen?

2009-02-13 Thread zweb
I have tiny mce editor instead of text area for description field. For rich text markup it generates and stores text with HTML markup in database. Now When I display this field data as {{form.description}}, I think django automatically converts <> to < > for security reasons. Any way to stop it

django-tinymce plugin question

2009-02-13 Thread zweb
I am using django-tinymce widget instead of text are widget. It is displaying the formatting menu bar on bottom instead of top of the field? Anyway to tell it to show formatting menu bar on top of the editor area? --~--~-~--~~~---~--~~ You received this message beca

Re: Aggregating errors from multiple forms

2009-02-13 Thread zinckiwi
Thanks Malcolm. > Define "didn't seem to work"? > ... > Have a look in django/templates/defaulttags.py for examples of argument > parsing in the built in tags for Django. I'm sure it was a gap in my knowledge, since you're obviously right about the built-in tags. I'll take a look at them. I was

Re: How to display html text in database back on screen?

2009-02-13 Thread Malcolm Tredinnick
On Fri, 2009-02-13 at 20:15 -0800, zweb wrote: > I have tiny mce editor instead of text area for description field. For > rich text markup it generates and stores text with HTML markup in > database. > > Now When I display this field data as {{form.description}}, I think > django automatically c

Re: Aggregating errors from multiple forms

2009-02-13 Thread Malcolm Tredinnick
On Fri, 2009-02-13 at 20:19 -0800, zinckiwi wrote: > Thanks Malcolm. > > > Define "didn't seem to work"? > > ... > > Have a look in django/templates/defaulttags.py for examples of argument > > parsing in the built in tags for Django. > > I'm sure it was a gap in my knowledge, since you're obviou

date-based ordering confusion

2009-02-13 Thread Gour
Hi! I'm doing my 1st steps in Python/Django using Python Web Development with Django book (http://withdjango.com/) Chapter 2 is 'developing' simple blog app and here is the model: From django.db import models From django.contrib import admin # Create your models here. class BlogPost(models.Mod

date-based ordering confusion

2009-02-13 Thread Gour
Hi! I'm doing my 1st steps in Python/Django using Python Web Development with Django book (http://withdjango.com/) Chapter 2 is 'developing' simple blog app and here is the model: From django.db import models From django.contrib import admin # Create your models here. class BlogPost(models.Mod