Re: Model Form Field Ordering

2009-02-04 Thread Alex Koshelev
The is no public/documented API for reorder fields, but you can do some trick with SortedDict: class MyModelForm(forms.ModelForm): mySpecialField = forms.ChoiceField(label='Special', choices=(('a','aa'))) class Meta: model = MyModelType MyModelForm.base_fields.keyOrder =

Re: Two forms.Form one page: second form will not show any errors

2009-02-04 Thread Gordon
Form 1 Template (rendered from view): http://dpaste.com/116827/ Form 2 Template (included in Form 1): http://dpaste.com/116826/ View Code: http://dpaste.com/116828/ Form 2 Code: http://dpaste.com/116829/ Once again, the problem is that Form 2 won't display any errors while Form 1 will display

Re: Required help for Basic Data insertion to the database from a form

2009-02-04 Thread Neeru
sorry for not tell u in problem detail in detail. i'm new to this kind of stuff. i havn't done this before. I will try to figure out a way to explain u. I tried all the stuff that u have said with example. anyway thanks. comming to my problem... as far this code works fine. there is no

Re: Two forms.Form one page: second form will not show any errors

2009-02-04 Thread Karen Tracey
On Thu, Feb 5, 2009 at 2:03 AM, Gordon wrote: > > Hello, > I have seperate django forms wrapper in one html form tag in my > template. > > When i render, both forms display fully. When I post, errors display > for the first form but not for the second. I am using a tag

Two forms.Form one page: second form will not show any errors

2009-02-04 Thread Gordon
Hello, I have seperate django forms wrapper in one html form tag in my template. When i render, both forms display fully. When I post, errors display for the first form but not for the second. I am using a tag by tag approach to the the template. Interesting thing is I did a test to see if

Re: models created from database table

2009-02-04 Thread Karen Tracey
On Thu, Feb 5, 2009 at 1:19 AM, Waruna de Silva wrote: > Thanks > > What is the best possible way to handle that type of a problem > > I don't know, it is not something I've ever needed. If you Google "composite primary keys" and Django you'll get hits that point to the

Re: Required help for Basic Data insertion to the database from a form

2009-02-04 Thread Neeru
thxs, I have the Problem in accessing the values from the form. On Feb 5, 11:13 am, Karen Tracey wrote: > On Thu, Feb 5, 2009 at 12:55 AM, Neeru wrote: > > > hi all, > > > As i'm new to the Django framework, > > i want to know the how can i insert the

Re: Model Form Field Ordering

2009-02-04 Thread Karen Tracey
On Thu, Feb 5, 2009 at 1:14 AM, Brian wrote: > > I have a ModelForm subclass where I define a special field. How do I > make that special field appear first in the rendered form (using a > form.as_* method)? > > Here is an example: > > class MyModelForm(forms.ModelForm): >

Re: models created from database table

2009-02-04 Thread Waruna de Silva
Thanks What is the best possible way to handle that type of a problem On Thu, Feb 5, 2009 at 11:45 AM, Karen Tracey wrote: > On Thu, Feb 5, 2009 at 12:58 AM, Waruna de Silva wrote: > >> Thanks Ramior for info >> >> In Models is it possible to name to

Re: models created from database table

2009-02-04 Thread Karen Tracey
On Thu, Feb 5, 2009 at 12:58 AM, Waruna de Silva wrote: > Thanks Ramior for info > > In Models is it possible to name to Fields as primary keys > > as exmaple, there are two fields > gid = models.IntegerField() > business_id = models.ForeignKey(Business) > > how to

Re: Changing default app url in development server

2009-02-04 Thread knight
Thank you all for the replies. I will try the middleware solution and tell you how it's going. :) It's nice to see that our group is big enough to get ~15 replies in 2 days. Thanks, Arshavski Alexander. On Feb 5, 5:14 am, Graham Dumpleton wrote: > On Feb 5, 1:25 

Model Form Field Ordering

2009-02-04 Thread Brian
I have a ModelForm subclass where I define a special field. How do I make that special field appear first in the rendered form (using a form.as_* method)? Here is an example: class MyModelForm(forms.ModelForm): mySpecialField = forms.ChoiceField(label='Special', choices=(('a', 'aa')))

Re: Required help for Basic Data insertion to the database from a form

2009-02-04 Thread Karen Tracey
On Thu, Feb 5, 2009 at 12:55 AM, Neeru wrote: > > hi all, > > As i'm new to the Django framework, > i want to know the how can i insert the form data into the database. > Plz let me know the solution and necessary changes that have to be > done > > program is like > >

Re: how to integrate captcha in Django

2009-02-04 Thread Karen Tracey
On Thu, Feb 5, 2009 at 12:54 AM, gganesh wrote: > > hi Django floks > i'm newbie to Django ,i have a task like > People have to register with their email in the index page , to enter > into my site and, to protect my site from unwanted usage, i need to > integrate captcha

Re: Overriding admin template: index.html

2009-02-04 Thread knight
My problem is that I want to pass additional variables to index.html. So I thought I can do it if I add these variables to view that renders index.html. Regards, Alex A. On Feb 4, 10:55 am, Kenneth Gonsalves wrote: > On Wednesday 04 Feb 2009 2:05:37 pm knight wrote: > >

Re: models created from database table

2009-02-04 Thread Waruna de Silva
Thanks Ramior for info In Models is it possible to name to Fields as primary keys as exmaple, there are two fields gid = models.IntegerField() business_id = models.ForeignKey(Business) how to make both of them as primary keys , following isn't work gid =

Required help for Basic Data insertion to the database from a form

2009-02-04 Thread Neeru
hi all, As i'm new to the Django framework, i want to know the how can i insert the form data into the database. Plz let me know the solution and necessary changes that have to be done program is like - in

how to integrate captcha in Django

2009-02-04 Thread gganesh
hi Django floks i'm newbie to Django ,i have a task like People have to register with their email in the index page , to enter into my site and, to protect my site from unwanted usage, i need to integrate captcha .i will be glad to find a help from you thanks in advance

Re: Serialization

2009-02-04 Thread issya
Brian, I can get data on the maps with no problem. It is just making it change when the user selects something. If you are trying to get data on a map, I have a handy way for you to do it. This is only for your template. You will have to find a way to geocode everything ahead of time. GeoDjango

Re: Serialization

2009-02-04 Thread issya
Thanks for the reply Russ. I will check into different things, you make it sound easier than it looks. :) On Feb 4, 11:33 pm, Russell Keith-Magee wrote: > On Thu, Feb 5, 2009 at 1:09 PM, issya wrote: > > > Thanks for the reply. I was aware of

Re: Admin site not using my overridden save()?

2009-02-04 Thread Karen Tracey
On Wed, Feb 4, 2009 at 11:39 PM, Silfheed wrote: > > Heyas > > So I'm sure this is pretty basic, but I don't seem to be able to get > the following to work and I cant seem to find suitable info on google > or the django site. > > I've got my model: > > class

Re: 'AdminSite' object has no attribute 'urls' issue

2009-02-04 Thread jason zones
got it,:-) On Thu, Feb 5, 2009 at 12:37 PM, Alex Gaynor wrote: > > > On Wed, Feb 4, 2009 at 11:33 PM, ethan zou wrote: > >> i also feel confused about the django version. it develops so fast that i >> cannot catch up. different versions have so many

Admin site not using my overridden save()?

2009-02-04 Thread Silfheed
Heyas So I'm sure this is pretty basic, but I don't seem to be able to get the following to work and I cant seem to find suitable info on google or the django site. I've got my model: class person(models.Model): gender = models.CharField(max_length=1, choices=(('M','male'), ('F','female))

Re: 'NoneType' object has no attribute 'rfind'

2009-02-04 Thread bfellows
Looks like I figured it out, it was my mad Python skillz. I cast the blah_id object as a string when feeding it to the GetFeed function. Works now. On Feb 4, 11:50 am, Karen Tracey wrote: > On Wed, Feb 4, 2009 at 2:37 PM, bfellows wrote: > > > Traceback:

Re: 'AdminSite' object has no attribute 'urls' issue

2009-02-04 Thread Alex Gaynor
On Wed, Feb 4, 2009 at 11:33 PM, ethan zou wrote: > i also feel confused about the django version. it develops so fast that i > cannot catch up. different versions have so many changes. Could it be > possible to find the the exact version of the tutorial in the official >

Re: 'AdminSite' object has no attribute 'urls' issue

2009-02-04 Thread ethan zou
i also feel confused about the django version. it develops so fast that i cannot catch up. different versions have so many changes. Could it be possible to find the the exact version of the tutorial in the official djangoproject website? i think the differences of the version of django may confuse

Re: Serialization

2009-02-04 Thread Russell Keith-Magee
On Thu, Feb 5, 2009 at 1:09 PM, issya wrote: > > Thanks for the reply. I was aware of that but I guess I don't > understand how to go about using it. I do understand that I can > serialize a queryset. But I cannot just go and use the serialized data > as template context.

Re: Serialization

2009-02-04 Thread Brian Neal
Hi - I'm working on a very similar problem (displaying data on a Google map). I haven't totally implemented this yet, but my way forward is to use AJAX to request the map data from my Django application, which will serve it as JSON (by serializing it). You then "deserialize" it in the Javascript

Re: 'AdminSite' object has no attribute 'urls' issue

2009-02-04 Thread ethan zou
now it works. thanks a lot. On Thu, Feb 5, 2009 at 12:10 PM, Alex Gaynor wrote: > > > On Wed, Feb 4, 2009 at 11:05 PM, jason wrote: > >> >> hello all. >> i followed the django tutorial, to the second part ,when activate the >> admin site, typing url

Re: 'AdminSite' object has no attribute 'urls' issue

2009-02-04 Thread Alex Gaynor
On Wed, Feb 4, 2009 at 11:05 PM, jason wrote: > > hello all. > i followed the django tutorial, to the second part ,when activate the > admin site, typing url 'http://localhost:8000/admin/' in the browser's > address bar, this error showed up. > my django version is 1.0.2, and

Re: Serialization

2009-02-04 Thread issya
Thanks for the reply. I was aware of that but I guess I don't understand how to go about using it. I do understand that I can serialize a queryset. But I cannot just go and use the serialized data as template context. From the options I've seen, it looks like if I did something like that I would

'AdminSite' object has no attribute 'urls' issue

2009-02-04 Thread jason
hello all. i followed the django tutorial, to the second part ,when activate the admin site, typing url 'http://localhost:8000/admin/' in the browser's address bar, this error showed up. my django version is 1.0.2, and python version is 2.6, using sqlite3. are there any configurations wrong with

Re: MultipleChoiceField issue

2009-02-04 Thread Malcolm Tredinnick
On Wed, 2009-02-04 at 18:59 -0800, Bobby Roberts wrote: [...] > Can you provide me an example of how I should be using getlist? I > don't see anything in the docs related to forms and getlist. That's because getlist() has nothing to do with forms. It's a method on the object that is

Re: MultipleChoiceField issue

2009-02-04 Thread Karen Tracey
On Wed, Feb 4, 2009 at 9:59 PM, Bobby Roberts wrote: > > > I'd guess you need to be calling getlist rather than get to pull all the > > various values from the POST data. (Which is a detail you wouldn't need > to > > worry about if you were using the standard form clean()

Re: Serialization

2009-02-04 Thread Russell Keith-Magee
On Thu, Feb 5, 2009 at 8:35 AM, issya wrote: > > My ideal situation would be to initially load the data through ajax > and update through ajax. But I cannot find an easy way to do this. If > I searialize the data, I don't see an easy way to deserialize it. Are you aware

Re: Basic Queryset issue

2009-02-04 Thread Malcolm Tredinnick
On Wed, 2009-02-04 at 18:02 -0800, CALdan wrote: > Hi, > > I'm in the process of learning django by creating a simple application > for use at work, I'm using the djangobook's tutorials as guidlines for > my own app. As far as I can tell, everything below is correct however > when django loads

Re: Modifying Handler to support multiple customized, inheriting clients

2009-02-04 Thread Russell Keith-Magee
On Thu, Feb 5, 2009 at 8:39 AM, bbeaudreault wrote: > > Sorry to spam, but in re-reading my post I realized that I assumed > people know what I mean by "Shared Code." That's not the unclear bit. The unclear bit is your terminology and how your are interpreting it. What,

Re: form validation in XMLHttp submission

2009-02-04 Thread Malcolm Tredinnick
On Wed, 2009-02-04 at 11:23 -0800, adrian wrote: > > I'm using the standard pattern for handling a POST request form > submission, even though the form is submitted by JavaScript as an > XMLHttpRequest, and the date validation is not working. I added some > logging statements to find the

Re: Changing default app url in development server

2009-02-04 Thread Graham Dumpleton
On Feb 5, 1:25 am, Adam Stein wrote: > I do something similiar where I have an extra item in the url.  To get > Apache and the Django server to match, I just add the extra part in > urls.py that I'm matching.  So instead of something like: > > (r'^admin/(.*)',

Re: MultipleChoiceField issue

2009-02-04 Thread Bobby Roberts
> I'd guess you need to be calling getlist rather than get to pull all the > various values from the POST data.  (Which is a detail you wouldn't need to > worry about if you were using the standard form clean() framework...not sure > why you are seemingly winging it on cleaning form data instead

Basic Queryset issue

2009-02-04 Thread CALdan
Hi, I'm in the process of learning django by creating a simple application for use at work, I'm using the djangobook's tutorials as guidlines for my own app. As far as I can tell, everything below is correct however when django loads the page in the browser there is no data from within the FOR

Getting uploaded file content type in model save

2009-02-04 Thread Brian Morton
I am working with PIL to resize and thumbnail images during a model save method. I am using SimpleUploadedFile as a wrapper to facilitate the thumbnail field's save method. SimpleUploadedFile requires that the proper content type be passed in as an argument. The trouble is, I may be working

Re: Recent admin redirect url error?

2009-02-04 Thread Karen Tracey
On Wed, Feb 4, 2009 at 7:44 PM, Adam Yee wrote: > > I'm experiencing Change password / Logout redirect errors while trying > to logout or change the password. > > The 404 messages show below: > Request Method: GET > Request URL:http://127.0.0.1/admin/admin/logout/

Re: Recent admin redirect url error?

2009-02-04 Thread Adam Yee
Using Django version 1.1 pre-alpha SVN-9805 On Feb 4, 4:44 pm, Adam Yee wrote: > I'm experiencing Change password / Logout redirect errors while trying > to logout or change the password. > > The 404 messages show below: > Request Method:         GET > Request URL:    

Recent admin redirect url error?

2009-02-04 Thread Adam Yee
I'm experiencing Change password / Logout redirect errors while trying to logout or change the password. The 404 messages show below: Request Method: GET Request URL:http://127.0.0.1/admin/admin/logout/ It's adding in an extra ^admin/ Same for Change password: Request URL:

Re: Django Templates: Dynamically addressing 2-D Dictionary

2009-02-04 Thread Glen Jarvis
>> I'm beating my head up against the wall with this. Could anyone send >> me some guidance? > > The short version is "You can't do that" - at least, not in the way > you expect. > > Django's template language specifically tries to avoid being a > programming language, and one of the things

Re: Modifying Handler to support multiple customized, inheriting clients

2009-02-04 Thread bbeaudreault
Sorry to spam, but in re-reading my post I realized that I assumed people know what I mean by "Shared Code." Basically I would have one main code-base that will contain code that all clients inherit from. By default a client would just be running straight off that "shared" code-base, so 2 new

Serialization

2009-02-04 Thread issya
I have a page that displays 16 houses and relevant information. It also displays a Google Map with all of the markers to houses on it. Right now I have it doing a jQuery ajax load and it loading new information to 2 separate divs, thus making 2 separate requests. I know this isn't the best way to

Re: Django Templates: Dynamically addressing 2-D Dictionary

2009-02-04 Thread Russell Keith-Magee
On Thu, Feb 5, 2009 at 7:30 AM, Glen Jarvis wrote: > > Notice that I can reference grants.2.63 through direct reference, but > when trying to use the variables alpha=2, and beta=63, this lookup > fails. Yes - it will. > I'm beating my head up against the wall with this.

New Django user question: how to keep table infomation updating

2009-02-04 Thread webbo
Hi all, I need to create a table, and this table has 3 attributes: Name, Host name, and baseline. I want to make a table able to display dynamic contents when I choose different value from baseline combo-box and click on "check" button. My design is: Baseline is a set of combo-box and

Re: MultipleChoiceField issue

2009-02-04 Thread Karen Tracey
On Wed, Feb 4, 2009 at 5:32 PM, Bobby Roberts wrote: > > Hi all. I'm using python2.5 / django .96x (yes i know - we're > upgrading soon). I have an issue with a multiplechoice field which I > can't figure out. Here are snippets > > > from the form: ># disaster choices

Re: syncdb dry run

2009-02-04 Thread Russell Keith-Magee
On Wed, Feb 4, 2009 at 11:57 PM, tow wrote: > > Is there a way to do a dry run of "manage.py syncdb", to see what sql > commands it's about to execute? > > "./manage.py sqlall" isn't good enough for my purposes because > > 1) I have to specify the list of

MultipleChoiceField issue

2009-02-04 Thread Bobby Roberts
Hi all. I'm using python2.5 / django .96x (yes i know - we're upgrading soon). I have an issue with a multiplechoice field which I can't figure out. Here are snippets from the form: # disaster choices previously defined Disaster=forms.MultipleChoiceField (required=True,

Re: Where to place files on apache server.

2009-02-04 Thread Benjamin Wohlwend
Hi, On Feb 4, 10:08 pm, djandrow wrote: > Hello everyone, > > [...] > > I created a file in Htdocs then in that created the project with the > views and urls.py and the others. > But if I go >

Django Templates: Dynamically addressing 2-D Dictionary

2009-02-04 Thread Glen Jarvis
I'm banging my head up against a wall on something. Pretty printed, here is the grant object that I created and am passing to my Django Template: {2L: {63L: [, ]}, 4L: {79L:[]} This object is an instance of a sub-classed dictionary: class GrantsDict(dict):

Re: Admin site / save_as won't work with inlines?

2009-02-04 Thread Karen Tracey
On Wed, Feb 4, 2009 at 3:56 PM, 3lancer.eu wrote: > > Hi everyone, > > Is there no chance to make save_as work with inlines? If so, is this > going to be fixed in upcoming releases? > There's a ticket reporting the problem: http://code.djangoproject.com/ticket/9651 which

Re: NetBeans IDE for Python

2009-02-04 Thread phillc
mine wasnt working exactly as you all described it... until i moved my django symlink to someplace else on my python path... and it suddenly worked its really odd. On Feb 3, 12:49 am, mrsixcount wrote: > Can't seem to get the auto complete to work when I import >

Re: ImageField, width_field, height_field not working

2009-02-04 Thread alex.gay...@gmail.com
On Feb 4, 3:48 pm, vicvicvic wrote: > Hello! > > I have created a ticket for this issue, with a patch which solves it. > I don't think it breaks anything... > > http://code.djangoproject.com/ticket/10196 That patch does indeed look to be correct, if you haven't

Where to place files on apache server.

2009-02-04 Thread djandrow
Hello everyone, I've recently installed apache and mod_python and i've managed to run a couple of python files, so i guess its working. I've also created a view, which displays a simple hello world message. I've tested this with the django server and it works. But i'm not sure how to get this to

Re: Optional m2m relationships in Admin

2009-02-04 Thread GeneralMean
On 4 Lut, 21:25, garagefan wrote: > check out django-tagging. It looks like they're using a custom Manager > that is handling the creation of new tags based off of an object that > is using "tags" listing new tags. Will do. Meantime, let's take a look again at the

Re: ImageField, width_field, height_field not working

2009-02-04 Thread vicvicvic
Hello! I have created a ticket for this issue, with a patch which solves it. I don't think it breaks anything... http://code.djangoproject.com/ticket/10196 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: Admin widget for geotagging

2009-02-04 Thread Cesar Mojarro
are u paying someone for this On Wed, Feb 4, 2009 at 2:55 PM, Anders wrote: > > Hi. I am in desperat need for a admin widget that let's my users > search for an address (via google geocode) and select one of the > results google provide or click in a

Admin site / save_as won't work with inlines?

2009-02-04 Thread 3lancer.eu
Hi everyone, Is there no chance to make save_as work with inlines? If so, is this going to be fixed in upcoming releases? Regards, Piotr --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Admin widget for geotagging

2009-02-04 Thread Anders
Hi. I am in desperat need for a admin widget that let's my users search for an address (via google geocode) and select one of the results google provide or click in a google map to specify a position. This position should then be saved in two separate fields (latitude and longitude). I've been

Re: Optional m2m relationships in Admin

2009-02-04 Thread garagefan
check out django-tagging. It looks like they're using a custom Manager that is handling the creation of new tags based off of an object that is using "tags" listing new tags. On Feb 4, 3:04 pm, GeneralMean wrote: > >On 4 Lut, 20:52, koenb

Re: Form submission not working

2009-02-04 Thread Felipe Sodré Silva
Never mind. I should have used name='bla' instead of id='bla'. On Wed, Feb 4, 2009 at 5:59 PM, Felipe Sodré Silva wrote: > Hello all. I'm facing a really weird problem here. > > I have this template: > > alert('post : {{ post }}'); > > > > > > > > and this

Re: Optional m2m relationships in Admin

2009-02-04 Thread GeneralMean
>On 4 Lut, 20:52, koenb wrote: > Shouldn't this be obj.tags.add(tag) ? (your m2mfield is called tags > not tag) Typo... It actually should say obj.tag.add(tag) - I wasn't pasting this code, wrote it by hand ;) Actual code has no syntax errors :)

Re: how to sync database upon change in field attribute ?

2009-02-04 Thread Karen Tracey
On Wed, Feb 4, 2009 at 1:26 PM, xankya wrote: > > class Bookmark(models.Model): >title = models.CharField(max_length=200, unique=True) >user = models.ForeignKey(User) >link = models.ForeignKey(Link) > > I need to remove "unique=True" attribute. I

Form submission not working

2009-02-04 Thread Felipe Sodré Silva
Hello all. I'm facing a really weird problem here. I have this template: alert('post : {{ post }}'); and this view for the template: def jstest(request): post = request.POST.get('bla', 'no posts') if request.method != 'POST': post = 'No post data sent'

Re: Optional m2m relationships in Admin

2009-02-04 Thread GeneralMean
On 4 Lut, 20:24, garagefan wrote: > From my limited understanding of Django... > > the admin.py stuff should not contain any save function. > > http://docs.djangoproject.com/en/dev/ref/contrib/admin/#ref-contrib-a... Hmm, take a look at this then:

Re: Optional m2m relationships in Admin

2009-02-04 Thread koenb
>     def save_model(self, request, obj, form, change): >         super(GamesAdmin, self).save_model(request, obj, form, change) >         if not change: >             #get a tag >             tag = Tags.objects.get(pk=1) >             #associate tag with newly created object >            

Re: 'NoneType' object has no attribute 'rfind'

2009-02-04 Thread Karen Tracey
On Wed, Feb 4, 2009 at 2:37 PM, bfellows wrote: > > Traceback: > File "/var/lib/python-support/python2.5/django/core/handlers/base.py" > in get_response > 86. response = callback(request, *callback_args, **callback_kwargs) > File "/var/django/.../views.py" in display > 33.

Re: how to sync database upon change in field attribute ?

2009-02-04 Thread xankya
I am using MySql. Karen Tracey wrote: > On Wed, Feb 4, 2009 at 1:26 PM, xankya wrote: > > > > > class Bookmark(models.Model): > >title = models.CharField(max_length=200, unique=True) > >user = models.ForeignKey(User) > >link =

Re: 'NoneType' object has no attribute 'rfind'

2009-02-04 Thread bfellows
Traceback: File "/var/lib/python-support/python2.5/django/core/handlers/base.py" in get_response 86. response = callback(request, *callback_args, **callback_kwargs) File "/var/django/.../views.py" in display 33. photos = gd_client.GetFeed(f) File

Re: Optional m2m relationships in Admin

2009-02-04 Thread garagefan
>From my limited understanding of Django... the admin.py stuff should not contain any save function. http://docs.djangoproject.com/en/dev/ref/contrib/admin/#ref-contrib-admin what exactly are you trying to do with the tag? Your M2M field in the initial Game class creates the relationship. You

'NoneType' object has no attribute 'rfind'

2009-02-04 Thread bfellows
I've run into what strikes me as an odd exception when using the gdata- python-client library in Django 1.0 on Python 2.5 and the dev environment server. For context, this is a very simple sandbox app for playing with the picasa web album API. It contains no data models. I have my urls set up to

form validation in XMLHttp submission

2009-02-04 Thread adrian
I'm using the standard pattern for handling a POST request form submission, even though the form is submitted by JavaScript as an XMLHttpRequest, and the date validation is not working. I added some logging statements to find the problem and I get the error message "MyModelForm' object has

Re: Optional m2m relationships in Admin

2009-02-04 Thread GeneralMean
Thanks for the answer, I modified my Game model according to your suggestion, and also, simplified whole thing. I can create new game without having to choose any tags - that's correct. Now, take a look at the save_model() method in GamesAdmin - I try to associate newly created Game with some

Re: how to sync database upon change in field attribute ?

2009-02-04 Thread Karen Tracey
On Wed, Feb 4, 2009 at 1:26 PM, xankya wrote: > > class Bookmark(models.Model): >title = models.CharField(max_length=200, unique=True) >user = models.ForeignKey(User) >link = models.ForeignKey(Link) > > I need to remove "unique=True" attribute. I

Re: Modifying Handler to support multiple customized, inheriting clients

2009-02-04 Thread bbeaudreault
Note: I could just make one big app, and deploy it separately for all my clients. But I want to be able to easily roll out big changes to all my clients, without having to replicate code a manually across them. That's why a Shared -> Client inheritance handler type of thing would work

Modifying Handler to support multiple customized, inheriting clients

2009-02-04 Thread bbeaudreault
Ok, yea. Sorry for the title, it is hard to generalize this question enough to be short like that. Anyway, at the company I work at we use mod_perl, and we have clients. Our code-base is set up like this: Shared Code -> Client Code The client code inherits and overrides shared code. So if

Re: Optional m2m relationships in Admin

2009-02-04 Thread garagefan
Not totally sure this will help with your error, as i haven't come across it yet. But for fields that may be empty I also have a blank = True and null = True. This is to tell the DB that it is acceptable to have no value in the field. ie, i'm using the following to choose add users to a private

Re: Newbie question: first project can't connect to MySQL

2009-02-04 Thread Kevin Audleman
I found the solution in the archives: I changed DATABASE_HOST to 127.0.0.1 from '' Kevin On Feb 4, 9:41 am, Kevin Audleman wrote: > Hello everyone, > > I am running through the tutorial and setting up my first django > project. Quite exciting! However I have run into

Newbie question: first project can't connect to MySQL

2009-02-04 Thread Kevin Audleman
Hello everyone, I am running through the tutorial and setting up my first django project. Quite exciting! However I have run into trouble connecting to MySQL. My settings.py file looks like this: DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or

2nd call for papers: PostgreSQL Conference East

2009-02-04 Thread Joshua D. Drake
PostgreSQL Conference East is being held at historic Drexel University on April 3rd through 5th 2009 . This is the second call for papers. The call for papers ends Feb 23rd and speakers will be notified on the 27th. You may submit your talk here: http://www.postgresqlconference.org . We are

Optional m2m relationships in Admin

2009-02-04 Thread GeneralMean
This is a huge one: I want to implement an optional m2m realtionship in django admin application, so it is possible to create a new Game (model description below) without choosing any tags associated with it. By default django form validation returns an error when I try to do such thing. So I

Re: Changing the structure of an already running site

2009-02-04 Thread phyl.jack...@gmail.com
Thanks Karen, that post is exactly what I was after. I can go and set one of those projects up if I need to. Phil On 4 Feb, 15:53, Karen Tracey wrote: > On Wed, Feb 4, 2009 at 10:46 AM, phyl.jack...@gmail.com < > > phyl.jack...@gmail.com> wrote: > > > Im fairly new to

Re: queryset iteration

2009-02-04 Thread Casey
On Feb 3, 6:19 pm, Malcolm Tredinnick wrote: > "Default" iteration over a queryset (using __iter__) also caches the > instances in memory so that they can be reused without requiring extra > database queries. Normally, the memory overhead is negligible, since the >

Re: how to associate django admin user with particular instances of certain model objects

2009-02-04 Thread Michael Repucci
That was EXACTLY what I was looking for!! Very clear and simple, with links to the documentation. That makes me so happy! Thank you a million times!! On Feb 4, 10:57 am, Karen Tracey wrote: > On Wed, Feb 4, 2009 at 10:48 AM, Michael Repucci wrote: > > >

Re: how to associate django admin user with particular instances of certain model objects

2009-02-04 Thread Karen Tracey
On Wed, Feb 4, 2009 at 10:48 AM, Michael Repucci wrote: > > Hi Django'ers! > > I'm brand new to Django, and I'm totally loving it. But I can't seem > to find the answer to a task I've encountered with a site that I'm > developing. I'm a moderately experienced Python

how to associate django admin user with particular instances of certain model objects

2009-02-04 Thread Michael Repucci
Hi Django'ers! I'm brand new to Django, and I'm totally loving it. But I can't seem to find the answer to a task I've encountered with a site that I'm developing. I'm a moderately experienced Python programmer, only a mediocre web developer, and as I said a newbie with Django, so please pardon

Re: Changing the structure of an already running site

2009-02-04 Thread Karen Tracey
On Wed, Feb 4, 2009 at 10:46 AM, phyl.jack...@gmail.com < phyl.jack...@gmail.com> wrote: > > > Im fairly new to django and new to databases in general and Im just > trying to work out how Im going to make changes to my website once its > up and running. > Im using mySQL, any time i add a field to

Re: Problem activating the admin function.

2009-02-04 Thread Karen Tracey
On Wed, Feb 4, 2009 at 10:32 AM, MickeSommar wrote: > > Hi Karen > > I imagine that it was only the # that should get deletet, the space is > thera by default. > Ah, I see there is a space there also in what's originally in the file, I guess to make it line up nicely.

Changing the structure of an already running site

2009-02-04 Thread phyl.jack...@gmail.com
Im fairly new to django and new to databases in general and Im just trying to work out how Im going to make changes to my website once its up and running. Im using mySQL, any time i add a field to one of my models I run syncdb but any calling already created users or comments causes an error.

Re: Problem activating the admin function.

2009-02-04 Thread MickeSommar
Hi Karen I imagine that it was only the # that should get deletet, the space is thera by default. Thanks fore the tip, it solved my problem. // Micke On 4 Feb, 16:19, Karen Tracey wrote: > On Wed, Feb 4, 2009 at 10:09 AM, MickeSommar wrote: > >

Re: Problem activating the admin function.

2009-02-04 Thread Karen Tracey
On Wed, Feb 4, 2009 at 10:09 AM, MickeSommar wrote: > [snip lots of detail except what turns out to be relevant so it was good to > include it all] > > 11.2 Edeting the urls.py file. > > Uncomment lines: > > from django.conf.urls.defaults import * > > # Uncomment the

FormSet in Wizard

2009-02-04 Thread Austin Gabel
Hello, I am trying to set up a Django FormWizard to add users to my site. On one of the steps I need to be able to enter more than one address. I was hoping to use a FormSet on this step but it does not seem to work as I had expected. The FormSet displays correctly initially, but when I submit

Problem activating the admin function.

2009-02-04 Thread MickeSommar
Hi all I'm trying to test django, I using the tutorial frome django: http://docs.djangoproject.com/en/dev/intro/tutorial01/#intro-tutorial01 I'm having problem with the admin-function, urls.py file give me errors. I have read that the tutorial is wrong. I have used the installed files frome

syncdb dry run

2009-02-04 Thread tow
Is there a way to do a dry run of "manage.py syncdb", to see what sql commands it's about to execute? "./manage.py sqlall" isn't good enough for my purposes because 1) I have to specify the list of applications myself (although it's easy enough to write a wrapper which will walk across

Re: Django Continuous Integration

2009-02-04 Thread Vitaly Babiy
Has any one got hudson to work as a CI system. Vitaly Babiy On Wed, Jan 14, 2009 at 1:05 PM, Adam V. wrote: > > > Revision Control: How do you layout your development repository? I'm > > using Subversion for my setup but would be interested in hearing what > > else others

  1   2   >