SQL Relay

2008-07-03 Thread Dave Pederson
Has anyone out there used django with a database load balancer like sqlrelay? Is it even feasible? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

OperationalError: database is locked

2008-07-03 Thread bhunter
Hi, I have a pretty simple app with about 7 models defined, generating probably about 15 tables or so. Just to test performance, I wrote a script that tries to populate the database with on the order of about 10,000 entries. On the backend, right now I'm using sqlite3 just for simplicity's

Re: Create field from two others

2008-07-03 Thread James Bennett
On Thu, Jul 3, 2008 at 8:59 PM, lukeqsee <[EMAIL PROTECTED]> wrote: > > Can you take a first_name & a last_name field and then in the same > model make a field that is full_name? ie > first_name = models.CharField(max_length=75) > last_name = models.CharField(max_length=75) > full_name =

Re: Using SQLite in production

2008-07-03 Thread James Bennett
On Thu, Jul 3, 2008 at 8:28 PM, Alex Slesarev <[EMAIL PROTECTED]> wrote: > One more issue - if you change a model, then you have to drop database > and recreate it using syncdb (sqlite do not allow modifying tables and > columns). It is not so good for production use. This is not quite correct.

Re: Form Errors after validations

2008-07-03 Thread Malcolm Tredinnick
On Thu, 2008-07-03 at 12:53 -0700, NewSpire wrote: > I have a newform and I do most of the validation with the clean > functions and that works great. I need to generate a form error from > inside the view that is displayed just like any other validation > error. For example, the form data is

Re: Oracle syncdb

2008-07-03 Thread Ian
On Jul 3, 3:23 pm, El Marto <[EMAIL PROTECTED]> wrote: > Hi all! > > I've developed and tested an application in MySQL and everything > worked fine fine fine. Now i am migrating to Oracle, the app works > fine but I am having a lot of trouble with the Django admin. > > Whenever i run syncdb, it

non editable admin model

2008-07-03 Thread Bobby Roberts
Got a weird question. I have a need to make it so that we can search/ view a certain model in the admin section but not add or edit. is this possible? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Create field from two others

2008-07-03 Thread lukeqsee
Can you take a first_name & a last_name field and then in the same model make a field that is full_name? ie first_name = models.CharField(max_length=75) last_name = models.CharField(max_length=75) full_name = models.CharField(value=first_name + last_name, max_length=100) I know that is not

Re: Editing content in Django Admin change-list

2008-07-03 Thread Alex Slesarev
You can change required admin templates and tags. Though it is not so difficult, it is not so good, because it will touch ALL applications and models. Malcolm is right - better to create own custom page, see http://new.djangobook.com/en/1.0/chapter17/ -- Best regards, Alex Slesarev.

Re: Copyright issues for an application developed using django, python and mySQL

2008-07-03 Thread Dan Ellis
There are no licensing issues with either Python or Django, which are both distributed under very liberal licenses (Python Software Foundation License and the BSD license respectively). http://www.python.org/psf/license/ http://www.opensource.org/licenses/PythonSoftFoundation.php

Re: django and mod_python with vhosts

2008-07-03 Thread joshuajonah
I am an idiot. It WAS the UniqueID. I had this idea that it it mapped to the SECRET_KEY for some reason. Sorry for the confusion. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Using SQLite in production

2008-07-03 Thread Alex Slesarev
One more issue - if you change a model, then you have to drop database and recreate it using syncdb (sqlite do not allow modifying tables and columns). It is not so good for production use. -- Best regards, Alex Slesarev. --~--~-~--~~~---~--~~ You received this

Re: django and mod_python with vhosts

2008-07-03 Thread joshuajonah
Actually, this is my httpd.conf at the bottom: # Use name-based virtual hosting. # #NameVirtualHost *:80 # # NOTE: NameVirtualHost cannot be used without a port specifier # (e.g. :80) if mod_ssl is being used, due to the nature of the # SSL protocol. # # # VirtualHost example: # Almost any

Re: django and mod_python with vhosts

2008-07-03 Thread joshuajonah
Ok, the NameVirtualHost in the main httpd.conf is not enabled. How should i configure this? am i supposed to choose a specific domain? or them all? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: django and mod_python with vhosts

2008-07-03 Thread joshuajonah
Also, i made sure the "UniqueID" is infact unique:D --~--~-~--~~~---~--~~ 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

Re: django and mod_python with vhosts

2008-07-03 Thread joshuajonah
The directive is this: SetHandler python-program PythonHandler django.core.handlers.modpython PythonPath "['/var/www/vhosts/hftvnetwork.com/django-projects'] + sys.path" SetEnv DJANGO_SETTINGS_MODULE DSN.settings PythonDebug On PythonInterpreter UniqueID I will check

Re: django and mod_python with vhosts

2008-07-03 Thread Graham Dumpleton
On Jul 4, 11:03 am, joshuajonah <[EMAIL PROTECTED]> wrote: > I have a Media Temple DV server, it has 7 sites hosted on it, 5 of > them are paying clients. > > The vhost file structure is like this: > > /var/www/vhosts/whatever.com/ > /var/www/vhosts/whatever2.com/ > /var/www/vhosts/whatever3.com/

django and mod_python with vhosts

2008-07-03 Thread joshuajonah
I have a Media Temple DV server, it has 7 sites hosted on it, 5 of them are paying clients. The vhost file structure is like this: /var/www/vhosts/whatever.com/ /var/www/vhosts/whatever2.com/ /var/www/vhosts/whatever3.com/ There are vhost.conf files in a "conf" directory (e.g: /var/www/vhosts/

Re: Copyright issues for an application developed using django, python and mySQL

2008-07-03 Thread Russell Keith-Magee
On Fri, Jul 4, 2008 at 8:31 AM, Nagu <[EMAIL PROTECTED]> wrote: > > How do I go about addressing the copyright and licensing issues? (I do > not know if licensing is the right word here). What copyright and licensing issues? IANAL, but none of the licenses used by Django, MySQL or Python require

Re: Copyright issues for an application developed using django, python and mySQL

2008-07-03 Thread Juanjo Conti
Are you going to distribute copies of your software or is just an internal development of the company? -- Juanjo Conti --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Copyright issues for an application developed using django, python and mySQL

2008-07-03 Thread Nagu
Hi, I made a small recommendation engine for our company using python, django, and mySQL. My supervisor and the senior management are worried about the copyright and licensing issues. They want to find out the details on how to go about start using it, like quoting python/django/ mySQL

Re: DB relations and delete question

2008-07-03 Thread Russell Keith-Magee
On Fri, Jul 4, 2008 at 12:08 AM, Jad <[EMAIL PROTECTED]> wrote: > > Lets say we have Accounts that is referenced profile, group, interest > tables. > > If I delete the account ID 1 would the related data to that account in > profile, group and interest table be deleted in all cases of relation? >

Re: Sorting by a nullable ForeignKey

2008-07-03 Thread noodslane
On Jul 1, 4:29 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > Assuming all such problems have all been fixed now, though, it would seem > this restriction could be removed from admin.  I did some experimenting and > if I remove the code in admin that prevents such sorting, everything seems > to

Re: Django Setup with apache & mod_python

2008-07-03 Thread Peter of the Norse
No. It’s the Python import path. Namely what you do for “import path.settings” when in the Python shell. There should be a partial OS path in your PythonPath setting that fills in the rest. On Jun 27, 2008, at 9:38 AM, nerdydork wrote: > Question on apache setup using mod_python, the

Re: Discard an uploaded image when returning a form with errors

2008-07-03 Thread TiNo
If the image verifies, and is on your server already, why not resize it? :D On Thu, Jul 3, 2008 at 11:49 PM, Berco Beute <[EMAIL PROTECTED]> wrote: > > To answer my own question, I now moved the validation code to the form > and create a PIL image using >

Oracle syncdb

2008-07-03 Thread El Marto
Hi all! I've developed and tested an application in MySQL and everything worked fine fine fine. Now i am migrating to Oracle, the app works fine but I am having a lot of trouble with the Django admin. Whenever i run syncdb, it creates one table and throws an exception like this: ORA-00955:

Re: generating tables and forms at runtime with the django subsystem

2008-07-03 Thread bruno desthuilliers
On 1 juil, 15:04, "José Moreira" <[EMAIL PROTECTED]> wrote: > hello, > > i'm a recent django developer. Sometime soon i will have to develop a > module for a cms solution to allow the content publishers to design > custom forms (including form layout) for webpages and to store the > results of

Re: Discard an uploaded image when returning a form with errors

2008-07-03 Thread Berco Beute
To answer my own question, I now moved the validation code to the form and create a PIL image using Image.open(StringIO(uploadedFile.content)): ===forms.py class ImageForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(ImageForm, self).__init__(*args, **kwargs)

Re: Displaying Child Records in a list of the Parent Records

2008-07-03 Thread Daniel Roseman
On Jul 3, 7:43 pm, Lee Hinde <[EMAIL PROTECTED]> wrote: > Say I have invoices (parent) and payments (child) and I want to show > each payment made against the invoices while displaying the list of > invoices. > > I've read other discussions here about the problems of automatically > loading child

Re: DB relations and delete question

2008-07-03 Thread Jad
I'm not asking about certain DB engine but how django would behave in presence of foriegn key? II will give an exampel of what arised this concern. http://www.djangoproject.com/documentation/db-api/ One-to-many relationships Forward If a model has a ForeignKey, instances of that model will

extending flatpages

2008-07-03 Thread Carl Karsten
I need to add some fields to flatpage model. (like header image) is there a clean way to do this? I saw it come up before, and one comment was "model subclassing is not supported." So now that it is supported... I am going to learn that it wont help me with this problem? Carl K

Re: choices

2008-07-03 Thread rskm1
On Jul 3, 8:13 am, urukay <[EMAIL PROTECTED]> wrote: > no, no i mean it otherway, just like Rajesh Dhawan wrote (link he sent). I will rephrase your original question; it's not obvious to everyone that the REASON you want two of your six choices to be "not selectable" is because they are

Re: removing page from cache (memcache)

2008-07-03 Thread Mike Chambers
Thanks. From the Vary Headers section: -- By default, Django’s cache system creates its cache keys using the requested path — e.g., "/stories/2005/jun/23/bank_robbed/". This means every request to that URL will use the same cached version, regardless of user-agent differences such as cookies

Re: Installation error - missing module django.core

2008-07-03 Thread Leaf
Thanks for the help. I really should have followed the instructions better, I guess. On Jul 3, 3:51 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote: > On Thu, Jul 3, 2008 at 3:25 PM, Leaf <[EMAIL PROTECTED]> wrote: > > 3. To make sure that I could run properly, I added C:\Python25 and C: > >

Re: DB relations and delete question

2008-07-03 Thread bbeaudreault
Wouldn't it depend on the type of DB? (mysql, postgresql,etc)? Or is this something enforced in django regardless of db? On Jul 3, 1:28 pm, Randy Barlow <[EMAIL PROTECTED]> wrote: > Jad wrote: > > Lets say we have Accounts that is referenced profile, group, interest > > tables. > > > If I delete

Re: removing page from cache (memcache)

2008-07-03 Thread Norman Harman
Mike Chambers wrote: > I just did some local debugging, and notice something interesting. The > cache key appears to be generated based on a hash of the request headers. > > This means that visiting the same page in two different browsers will > generate 2 unique keys, which means that the

Form Errors after validations

2008-07-03 Thread NewSpire
I have a newform and I do most of the validation with the clean functions and that works great. I need to generate a form error from inside the view that is displayed just like any other validation error. For example, the form data is all valid, but the credit card processing fail. How could I

Problem accessing data saved within a transaction

2008-07-03 Thread Chester
Hello, I'm trying to write an application that will make heavy use of transactions when saving different records to the database. I'm having a problem accessing the data that has been saved within a transaction before I commit the transaction. I need to do this because I need to either save

Re: Installation error - missing module django.core

2008-07-03 Thread Marty Alchin
On Thu, Jul 3, 2008 at 3:25 PM, Leaf <[EMAIL PROTECTED]> wrote: > 3. To make sure that I could run properly, I added C:\Python25 and C: > \Python25\Lib\site-packages\django\django\bin to my PATH variable. Looks like you've got one too many "django" directories in here. When Python tries to

Re: Installation error - missing module django.core

2008-07-03 Thread phillc
inside your sitepackages/django folder, there is a folder called django... that is what should be in site-packages On Jul 3, 3:25 pm, Leaf <[EMAIL PROTECTED]> wrote: > I'm trying to install Django on Windows XP SP2, but I received an > error while doing so. > > 1. I downloaded and installed

Installation error - missing module django.core

2008-07-03 Thread Leaf
I'm trying to install Django on Windows XP SP2, but I received an error while doing so. 1. I downloaded and installed Python 2.5, PostgreSQL 8.3.1, and psycopg. 2. I used TortoiseSVN to check out the latest revision from the SVN repository at http://code.djangoproject.com/svn/django/trunk/ and

Displaying Child Records in a list of the Parent Records

2008-07-03 Thread Lee Hinde
Say I have invoices (parent) and payments (child) and I want to show each payment made against the invoices while displaying the list of invoices. I've read other discussions here about the problems of automatically loading child records using select_related().

Re: customozing model method representation in admin

2008-07-03 Thread Daniel Roseman
On Jul 3, 6:32 pm, ashwoods <[EMAIL PROTECTED]> wrote: > if i have a method for a model, that returns True or False, is there a > way for the admin to show automatically a symbol like it does for > booleanfields or something similar? From http://www.djangoproject.com/documentation/model-api/ :

Re: removing page from cache (memcache)

2008-07-03 Thread Mike Chambers
I just did some local debugging, and notice something interesting. The cache key appears to be generated based on a hash of the request headers. This means that visiting the same page in two different browsers will generate 2 unique keys, which means that the cache isnt used. For example, on

customozing model method representation in admin

2008-07-03 Thread ashwoods
if i have a method for a model, that returns True or False, is there a way for the admin to show automatically a symbol like it does for booleanfields or something similar? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: DB relations and delete question

2008-07-03 Thread Randy Barlow
Jad wrote: > Lets say we have Accounts that is referenced profile, group, interest > tables. > > If I delete the account ID 1 would the related data to that account in > profile, group and interest table be deleted in all cases of relation? > One to one, one to many, many to many? same question

Re: removing page from cache (memcache)

2008-07-03 Thread Mike Chambers
Upon looking at the source, it looks like I am using an out of date way to generate the cache key: http://code.djangoproject.com/browser/django/trunk/django/utils/cache.py Does anyone have an example of how to generate the key from just the page path? i.e. /about/ The : get_cache_key API

Re: customizing or extending ModelForm

2008-07-03 Thread chefsmart
Thanks for the tip. I'm guessing this is for the newforms-admin or at least the svn trunk. I'm not adding the extra field to the model because it doesn't really belong there, though it's related to the model. On Jul 3, 6:10 pm, Huuuze <[EMAIL PROTECTED]> wrote: > Yes, you can do that, but you'd

DB relations and delete question

2008-07-03 Thread Jad
Lets say we have Accounts that is referenced profile, group, interest tables. If I delete the account ID 1 would the related data to that account in profile, group and interest table be deleted in all cases of relation? One to one, one to many, many to many? same question applies to update

Re: raise Http404("my message")

2008-07-03 Thread Norman Harman
Aljosa Mohorovic wrote: > if i call raise Http404("my message") and i set custom view to handle > 404 errors how do i get "my message" in that view? I was gonna say look at the default 404 template. But, in my django (newforms admin branch) /django/contrib/admin/templates/admin/404.html there

Re: What part of Django source code should I read first?

2008-07-03 Thread bruno desthuilliers
On 3 juil, 10:22, Rit Lim <[EMAIL PROTECTED]> wrote: > I'm a recent college graduate, and I haven't written any real program. > I'm trying to learn the more advance topics in Python... Its > impossible to get an entry-level Python job. > > What part of Django source code should I read first?

Re: assertRedirects do not exist in 0.97 pre?

2008-07-03 Thread Norman Harman
Florencio Cano wrote: > Where is the problem? where you don't use django's TestCase > import unittest > class UserTestCase(unittest.TestCase): from django.test import TestCase class UserTestCase(TestCase): -- Norman J. Harman Jr. Senior Web Specialist, Austin American-Statesman

Re: raise Http404("my message")

2008-07-03 Thread Malcolm Tredinnick
On Thu, 2008-07-03 at 08:40 -0700, Aljosa Mohorovic wrote: > if i call raise Http404("my message") and i set custom view to handle > 404 errors how do i get "my message" in that view? You don't. The default 404 handler serves up a template and passes it the request path, that is all. If you

Re: custom template tags

2008-07-03 Thread mccomas . chris
here's the code: TEMPLATE {% load more_news %} {% get_morenews_list %} {% for news in more_news %} {{ news.title }} {% endfor %} MORE_NEWS.PY from myproject.site.models import Blog from django.template import Library,Node register = Library() def build_morenews_list(parser, token):

raise Http404("my message")

2008-07-03 Thread Aljosa Mohorovic
if i call raise Http404("my message") and i set custom view to handle 404 errors how do i get "my message" in that view? Aljosa --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: custom template tags

2008-07-03 Thread mccomas . chris
one more thing. the first one is working. i tried to setup a second template tag for the page called more_news.py. the first is working as recent_news.py. recent_news.py gets the more recent entry, i have more_news.py set to get 2-6. i have {% load more_news %} since the file is more_news.py,

html templates - for-cycle without a variable

2008-07-03 Thread antony_h
How could I repeat my 20 times? I've found how I can repeat it 5 times: {% for a in 12345|make_list %} {% endfor %} But it's not so great for e.g. a hundred Usage: my designer wants to test his layout and I don't want to create a custom tag for such a simple task

(sorry for flooding)

2008-07-03 Thread antony_h
'Messages from new members are moderated' - didn't notice --~--~-~--~~~---~--~~ 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

html templates - for cycle without a variable

2008-07-03 Thread antony_h
How could I repeat my 20 times? I've found how I can repeat it 5 times: {% for a in 12345|make_list %} {% endfor %} But it's not so great for e.g. a hundred Usage: my designer wants to test his layout and I don't want to create a custom tag for such a simple task

html templates - 'for' cycle without a variable

2008-07-03 Thread antony_h
How could I repeat my 20 times? I've found how I can repeat it 5 times: {% for a in 12345|make_list %} {% endfor %} But it's not so great for e.g. a hundred Usage: my designer wants to test his layout and I don't want to create a custom tag for such a simple task

Re: Make changes to model...

2008-07-03 Thread Malcolm Tredinnick
On Thu, 2008-07-03 at 17:09 +0200, TiNo wrote: > The Meta class is to change the Model name, but Chris wants to change > the app name, not? > I don't think you can do that. You're right. I misread the mail. Changing the app name in the admin requires editing the template. Malcolm >

Re: Discard an uploaded image when returning a form with errors

2008-07-03 Thread Berco Beute
Something tells me the validation actually belongs to the form, but how can I get to the image size from within the form? ===forms.py class ImageForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(ImageForm, self).__init__(*args, **kwargs) def clean_image(self):

Re: Make changes to model...

2008-07-03 Thread TiNo
The Meta class is to change the Model name, but Chris wants to change the app name, not?I don't think you can do that. On Thu, Jul 3, 2008 at 2:53 AM, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > > On Wed, 2008-07-02 at 11:49 -0700, [EMAIL PROTECTED] wrote: > > Thanks guys. I know how to do

Re: streaming upload

2008-07-03 Thread Mike Axiak
Hi jm, I've been trying to reproduce your problem with no success. Can you please post your nginx configuration (a safe version, obviously)? Also, if you stop by #django, my username is axiak. It might be easier to track this down in IRC. Cheers, Mike On Jul 2, 6:26 pm, umrzyk <[EMAIL

assertRedirects do not exist in 0.97 pre?

2008-07-03 Thread Florencio Cano
Hello, I'm writing some tests to my login views and I get this error when executing the tests: AttributeError: 'UserTestCase' object has no attribute 'assertRedirects' This is the view: import unittest from django.test.client import Client from django.contrib.auth.models import User class

Re: custom template tags

2008-07-03 Thread mccomas . chris
thanks man, for some reason i couldn't get it and it was about to drive me nuts :) On Jul 3, 10:37 am, Berco Beute <[EMAIL PROTECTED]> wrote: > It should be in: > /project/application/templatetags/ > > 2B --~--~-~--~~~---~--~~ You received this message because

Re: custom template tags

2008-07-03 Thread Malcolm Tredinnick
On Thu, 2008-07-03 at 07:33 -0700, [EMAIL PROTECTED] wrote: > On my homepage I want to have a few different items, one is the recent > news items. I created the recentnews.py file: > > from myproject.site.models import Blog > from django.template import Library,Node > > register = Library() >

Re: custom template tags

2008-07-03 Thread mccomas . chris
Didn't mean to send it. In my template I'm using this to call the recent news: {% load recent_news %} {% get_news_list %} I'm getting a TemplateSyntaxError, 'recent_news' is not a valid tag library: Could not load template library from django.templatetags.recent_news, No module named

Re: Anyone got a backend for MS SQL Server working?

2008-07-03 Thread Ulf Kronman
Hi Malcom, and thanks for your answer. On Jul 3, 8:37 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Not knowing anything about this particular project, but if that's what > the line really says in the source (and I'm not doubting you, just very > surprised), it's completely wrong. It's

Re: custom template tags

2008-07-03 Thread Berco Beute
It should be in: /project/application/templatetags/ 2B --~--~-~--~~~---~--~~ 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

Discard an uploaded image when returning a form with errors

2008-07-03 Thread Berco Beute
I have a form for uploading images. When uploaded I check for a maximum size, see snippet below. If it's too big I return the same form but without the uploaded (big) image. Unfortunately the big image is part of the returned form (I can tell since I display the image for a form). Is there a way

custom template tags

2008-07-03 Thread mccomas . chris
On my homepage I want to have a few different items, one is the recent news items. I created the recentnews.py file: from myproject.site.models import Blog from django.template import Library,Node register = Library() def build_news_list(parser, token): return NewsObject() class

Re: newsletter in django

2008-07-03 Thread Jeff Anderson
sebey wrote: I am planning on making a newsletters so should I use django build-in options or mailman or something else you would recomenmt I recommend mailman. It is scalable and proven mailing list software. but I am new to web dev and python so therefore django as well but I have one

Re: django+mod_python, caching or something else?

2008-07-03 Thread Mario
Thanks to all, I wrote custom tags. It's solve my problem! --~--~-~--~~~---~--~~ 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

newsletter in django

2008-07-03 Thread sebey
I am planning on making a newsletters so should I use django build-in options or mailman or something else you would recomenmt but I am new to web dev and python so therefore django as well but I have one request that it is easy to mantain and costumize (costum signup in like an ajax window as an

Re: OneToOneField('self') problem

2008-07-03 Thread Malcolm Tredinnick
On Thu, 2008-07-03 at 05:55 -0700, Aldo wrote: [...] > I have several problems on the admin site with this model : > -I cannot change 'married_to' field after object creation. Pretty much no work has been done on OneToOneField handling in existing (trunk) admin, since it's not worth it with

Re: A little help with an idea

2008-07-03 Thread bbeaudreault
Thanks Daniel and Scott for the replies. It certainly has given me a better sense of how to implement something like this in Django, as well as an overall better understanding of Django in general. This will certainly be a fun project and I can't wait to get started on it as I learn more about

Re: Include django views in other web sites

2008-07-03 Thread Jeff Anderson
Alessandro wrote: I need to include some django output in other web pages. The problem is that Sometimes I cannot use server side includes on the other side, and I don't know how to do. I thought maybe some javascript or ajax to include with a

Re: Include django views in other web sites

2008-07-03 Thread David Christiansen
Just a thought, but can you put this information in an iframe? On Jul 3, 1:28 pm, Alessandro <[EMAIL PROTECTED]> wrote: > I need to include some django output in other web pages. The problem > is that Sometimes I cannot use server side includes on the other side, > and I don't know how to do. >

Re: A little help with an idea

2008-07-03 Thread Scott Moonen
Bryan, here's one way that you might approach it: 1. From a model perspective, you probably want to have a model like Account or Person or Blog that corresponds to the first component of the URL path. Then you can have a model like BlogPost or somesuch (maybe other models like

Re: A little help with an idea

2008-07-03 Thread Daniel Hepper
Hey Bryan, > So basically when I roll it out, the website would have no blogs on > it, just a front page welcoming me and possibly displaying some > statistics or news on it and allowing register/login. So if I were > the first to create an account, I would gain access to >

Re: choices

2008-07-03 Thread urukay
no, no i mean it otherway, just like Rajesh Dhawan wrote (link he sent). guess i'll have to find other way to that, not in Model level. but thanks Alessandro Ronchi-2 wrote: > > 2008/7/3, urukay <[EMAIL PROTECTED]>: >> >> >> yes, but it's only for limpidity :) and I need the user to chose

Re: customizing or extending ModelForm

2008-07-03 Thread Huuuze
Yes, you can do that, but you'd need to add it to the ModelForm's fields: >> self.fields['short_name'] = forms.CharField(label='Short Name', max_length=9) This code would need to be added to an overridden __init__ in your ModelForm. One question, however: why don't you add this field to your

Re: deleting a session

2008-07-03 Thread Jeff FW
I haven't tried this (I'll try it when I get home), but looking at the session code shows that you should be able to call: request.session.delete() to delete the whole session at once. On Jul 3, 3:52 am, Daniel Hepper <[EMAIL PROTECTED]> wrote: > Try: > > for key in request.session.keys(): >    

Re: How do I get the value of a disabled Select widget?

2008-07-03 Thread Jeff FW
Why do you need to put the value back into a form? I'm assuming that this is on the second page of a multi-part form, or something along those lines. A safer way to do it might be to store the value in the session, and not rely on the data coming back from the form to be correct. (The user can

OneToOneField('self') problem

2008-07-03 Thread Aldo
Hello, I have successfully used OneToOne relationships for inheritance, this is pretty well documented on the official doc and the result on admin site is very elegant. But I cannot use OneToOne field on another simple case : the marriage case. The goal is to link 2 objects of the same type

Re: A little help with an idea

2008-07-03 Thread bbeaudreault
Hey Daniel, Thanks for the reply. ... Duh! I don't know why I didn't think of that. There are so many foreign aspects of this to me (yes I come from a mod_perl, php background). I can give some more information to hopefully help me grasp this just that bit more. Basically I am creating my

Re: choices

2008-07-03 Thread Alessandro Ronchi
2008/7/3, urukay <[EMAIL PROTECTED]>: > > > yes, but it's only for limpidity :) and I need the user to chose only one > option from the list. Just can't count on that user wil chose to fill only > one field with choices if there are more possible fields with choices. > And it isn't possible

Re: forms + UI question

2008-07-03 Thread pihentagy
I don't quite get how a context processor, which can define template variables, help here. On Jul 3, 12:43 am, phillc <[EMAIL PROTECTED]> wrote: > look up context processors > > On Jul 2, 4:31 am, pihentagy <[EMAIL PROTECTED]> wrote: > > > Hi! > > > I have an auction site, the items appear in

Unsorted user selection widget after changeset 7806 (nfa)

2008-07-03 Thread spacetaxi
Hello, currently I'm a little bit lost on this one... Maybe some kind soul can give me a hint? Look at this excerpt of a model class: - from django.db import models from django.contrib.auth.models import User class Article(models.Model): # (...snip...) editors =

Include django views in other web sites

2008-07-03 Thread Alessandro
I need to include some django output in other web pages. The problem is that Sometimes I cannot use server side includes on the other side, and I don't know how to do. I thought maybe some javascript or ajax to include with a

Re: What part of Django source code should I read first?

2008-07-03 Thread [EMAIL PROTECTED]
Have you dived already? [1] If not, you should! [1]: http://www.diveintopython.org/ On Jul 3, 10:22 am, Rit Lim <[EMAIL PROTECTED]> wrote: > I'm a recent college graduate, and I haven't written any real program. > I'm trying to learn the more advance topics in Python... Its > impossible to get

Re: Inputting Date/Time in a Django Form

2008-07-03 Thread TiNo
Ah yeah. Maybe: collection_datetime = forms.SplitDateTimeField(widget=forms.SplitDateTimeWidget()) collection_datetime.widget.widgets = (input1.. , input2..) would do the trick? I don't have a development env here so I am only guessing. Anybody else has suggestions on this? Because it looks a

customizing or extending ModelForm

2008-07-03 Thread chefsmart
Please see the following dpaste code. http://dpaste.com/60529/ There is a model, with a ModelForm. The ModelForm has a "short_name" field that is not part of the model. Is this even possible/legal? --~--~-~--~~~---~--~~ You received this message because you are

Re: What part of Django source code should I read first?

2008-07-03 Thread urukay
i agree, the best way to learn Django is to start doing something Kenneth Gonsalves wrote: > > > > On 03-Jul-08, at 1:52 PM, Rit Lim wrote: > >> I'm a recent college graduate, and I haven't written any real program. >> I'm trying to learn the more advance topics in Python... Its >>

Re: What part of Django source code should I read first?

2008-07-03 Thread Kenneth Gonsalves
On 03-Jul-08, at 1:52 PM, Rit Lim wrote: > I'm a recent college graduate, and I haven't written any real program. > I'm trying to learn the more advance topics in Python... Its > impossible to get an entry-level Python job. > > What part of Django source code should I read first? none - first

Re: What part of Django source code should I read first?

2008-07-03 Thread [EMAIL PROTECTED]
In terms of advanced concepts in python, the metaclass usage in the model system is pretty advanced. And the SQL generation stuff in the Query class is probably pretty cool alogirthmwise. On Jul 3, 3:22 am, Rit Lim <[EMAIL PROTECTED]> wrote: > I'm a recent college graduate, and I haven't

Re: choices

2008-07-03 Thread urukay
yes, but it's only for limpidity :) and I need the user to chose only one option from the list. Just can't count on that user wil chose to fill only one field with choices if there are more possible fields with choices. And it isn't possible to add to oe field multiple choices lists (i mena

What part of Django source code should I read first?

2008-07-03 Thread Rit Lim
I'm a recent college graduate, and I haven't written any real program. I'm trying to learn the more advance topics in Python... Its impossible to get an entry-level Python job. What part of Django source code should I read first? --~--~-~--~~~---~--~~ You received

Re: Stability of trunk and 1.0 target: experience, testimonials?

2008-07-03 Thread Bradley Wright
Hi, On Jul 3, 6:58 am, Ramdas S <[EMAIL PROTECTED]> wrote: > It is any day better than PHP.. This is almost definitely the wrong list to be writing comparisons, but as a long-time PHP user (and now a Django user), I have to say that PHP is not as bad or useless as Python apologists tend to make

  1   2   >