Re: importing users from another db

2007-07-07 Thread Carl Karsten
Russell Keith-Magee wrote: > On 7/8/07, Carl Karsten <[EMAIL PROTECTED]> wrote: >> Russell Keith-Magee wrote: >>> Django users have many skills. Unfortunately, mind reading is >>> generally not one of those skills :-) >>> >> Yeah, I see what you mean. seemed obvious to me :) >> >> does django

Re: importing users from another db

2007-07-07 Thread James Bennett
On 7/7/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > If you want Django to handle the full stack, then you will need to > write a Django model that corresponds to the model you are trying to > import. Usually not that difficult to do, but somewhat excessive > effort for a temporary

Re: one to many

2007-07-07 Thread Jacob Kaplan-Moss
On 7/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I'm curious about the use of instance._set. If I have models: > > class Foo(models.Model): > # something > > class Bar(models.Model): > myFoo = models.ForeignKey(Foo) > > ...would I be able to say barInstance.myFoo_set.[] ? By

Re: importing users from another db

2007-07-07 Thread Russell Keith-Magee
On 7/8/07, Carl Karsten <[EMAIL PROTECTED]> wrote: > > Russell Keith-Magee wrote: > > Django users have many skills. Unfortunately, mind reading is > > generally not one of those skills :-) > > > > Yeah, I see what you mean. seemed obvious to me :) > > does django expose it's ORM so that I can

Re: importing users from another db

2007-07-07 Thread Carl Karsten
Russell Keith-Magee wrote: > On 7/8/07, Carl Karsten <[EMAIL PROTECTED]> wrote: >> I am migrating a site from .net/access to django. the MySql Migration Wizard >> gets the data out of access and into a MySql db nice and easy. There is even >> some provision for scripting it, but don't ask me

Re: importing users from another db

2007-07-07 Thread Russell Keith-Magee
On 7/8/07, Carl Karsten <[EMAIL PROTECTED]> wrote: > > I am migrating a site from .net/access to django. the MySql Migration Wizard > gets the data out of access and into a MySql db nice and easy. There is even > some provision for scripting it, but don't ask me about that cuz I havn't used >

Re: Unexpected keyword argument when calling a function

2007-07-07 Thread Greg
Karen, Thanks...that is exactly what happened. I copied the old function but forgot to delete it Thanks On Jul 7, 7:05 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On 7/7/07, Greg <[EMAIL PROTECTED]> wrote: > > > > > I done this before with just one variable and it's always been (? > >

importing users from another db

2007-07-07 Thread Carl Karsten
I am migrating a site from .net/access to django. the MySql Migration Wizard gets the data out of access and into a MySql db nice and easy. There is even some provision for scripting it, but don't ask me about that cuz I havn't used it yet :) I can write .sql and python easy enough, and I

Re: Unexpected keyword argument when calling a function

2007-07-07 Thread Karen Tracey
On 7/7/07, Greg <[EMAIL PROTECTED]> wrote: > > I done this before with just one variable and it's always been (? > P\d+). Can I change the name from object_id to > manufacturer_id and collection_id? And can I send two variables > (three including request)? Yes, you can change the names and you

Re: Unexpected keyword argument when calling a function

2007-07-07 Thread Todd O'Bryan
According to the code I have, this should be working. Try changing it to def showcollection(request, manufacturer_id=None, collection_id=None): and see if that makes any difference. On Sat, 2007-07-07 at 16:07 -0700, Greg wrote: > Hello, > I have the following line in my urls.py file > >

Web Service Startup - Looking for Django partner/developer

2007-07-07 Thread BrandonB
Hi all, We are looking for a coder, perhaps a designer, for a new web 2.0 startup service. We have a lot of experience in startups and technology, but we're not coders or designers by profession. We are looking for someone who can code well in languages like PHP, Django or Ruby on Rails and also

Re: using create_update.update_object with formtools.preview

2007-07-07 Thread Malcolm Tredinnick
On Wed, 2007-07-04 at 13:52 +, sector119 wrote: > is it possible? or it's possible to use formtools.preview only with > newforms models? Formtools.preview relies on newform Forms, that is correct. Regards, Malcolm -- Many are called, few volunteer. http://www.pointy-stick.com/blog/

Re: caching and authentication

2007-07-07 Thread Jeremy Dunck
On 7/7/07, patrick k. <[EMAIL PROTECTED]> wrote: > I don´t understand why the page_cache is keyed by the vary header and > the view_cache is not. is there a reason for this? You mean cache_page rather than page_cache, but what is view_cache? I think I may have spotted the problem: the

Re: How to use Admin modules in my application

2007-07-07 Thread Doug B
admin != user Atleast that's my view. As tempting as the pretty admin interface might be, I think you would be better off rolling your own form and view for end users. Then you have complete control. Using the form_for_* functions you could have the whole thing done in a few minutes. fetch

Unexpected keyword argument when calling a function

2007-07-07 Thread Greg
Hello, I have the following line in my urls.py file r'^(?P\d+)/(?P\d+)/styles/$', 'mysite.rugs.views.showcollection'), // I have the following function defined in my views.py file def showcollection(request, manufacturer_id, collection_id): s =

Re: caching and authentication

2007-07-07 Thread patrick k.
Am 07.07.2007 um 19:36 schrieb Honza Král: > On 7/7/07, patrick k. <[EMAIL PROTECTED]> wrote: >> >> >> Am 07.07.2007 um 02:13 schrieb Jeremy Dunck: >> >>> >>> On 7/6/07, patrickk <[EMAIL PROTECTED]> wrote: when having a header where the username and a logout-button is displayed,

Re: Best location for projects and applications?

2007-07-07 Thread Christian M Hoeppner
I just organize them like I have always organized my projects (before django, not web related, etc...): /projects_root/client/project_ref/files All necesary files are given appropiate permissions and symlinked to some path like /var/www/someproject or so, to be in a "nice best

Re: Eroneous error with development server: 'module' object has no attribute 'urlpatterns'

2007-07-07 Thread Steve Bergman
Some additional info. I zapped my django installation and reinstalled from svn from scratch. I still had the problem. I tar'd up my project and moved it to a CentOS 5 box running 5631 and I do *not* experience the problem there. The two salient differences between the machines is that the

Re: mix in view or template?

2007-07-07 Thread Carl Karsten
Carl Karsten wrote: > I am trying to figure out the best place to matchup Events and Dates when > rendering a 'basic calendar.' > > Events: 0, 1, more per date. > Dates: a list of all the dates in a month, so about 30 - one for each day. > > # views.py > class Event(models.Model): > title

Re: trunk, sqlite backend bug with date handlig

2007-07-07 Thread Andrey Khavryuchenko
Malcolm, Thanks, your answers helped to trace down the problem. It appeared that just sqlite connection was opened without proper 'detect_types' parameter. MT> On Sat, 2007-07-07 at 23:04 +0300, Andrey Khavryuchenko wrote: >> MT> On Sat, 2007-07-07 at 20:57 +0300, Andrey Khavryuchenko

How to use Admin modules in my application

2007-07-07 Thread Angela Sutanto
Hi everybody, I'd like to take advantage of Admin modules to edit some my models e.g. user profile by navigating user to /admin/myapp/// to open change form. 1. I should check, whether is the same as request.user.id to prevent user from editing a foreign user record. But I don't know how

Re: Best location for projects and applications?

2007-07-07 Thread Malcolm Tredinnick
On Sat, 2007-07-07 at 15:32 -0500, J.P. Cummins wrote: > Hey Everyone, > > What is the proper location for projects and applications on a *nix > system? The online documentation creates a 'poll' application in the > project directory. To me, that seems reallybad. You seem to have hit

Re: object_list=[] ?

2007-07-07 Thread Carl Karsten
Malcolm Tredinnick wrote: > On Sat, 2007-07-07 at 14:59 -0500, Carl Karsten wrote: >> # views.py >> class Event(models.Model): >> title = models.CharField(maxlength=255) >> eventdate = models.DateField() >> description = models.TextField(blank=True) >> def __str__(self): >>

Re: Eroneous error with development server: 'module' object has no attribute 'urlpatterns'

2007-07-07 Thread Steve Bergman
This problem seems to occur whenever there is any syntax error in my code *anywhere*. I just introduced one about a hundred lines into my view function and triggered it. Here is a simple test case, complete with sample syntax error: === urls.py: from django.conf.urls.defaults import *

Best location for projects and applications?

2007-07-07 Thread J.P. Cummins
Hey Everyone, What is the proper location for projects and applications on a *nix system? The online documentation creates a 'poll' application in the project directory. To me, that seems reallybad. Is it the best practice? For my projects, I use the following folder structure:

Re: object_list=[] ?

2007-07-07 Thread Malcolm Tredinnick
On Sat, 2007-07-07 at 14:59 -0500, Carl Karsten wrote: > # views.py > class Event(models.Model): > title = models.CharField(maxlength=255) > eventdate = models.DateField() > description = models.TextField(blank=True) > def __str__(self): > return "%(ed)s %(t)s" %

Re: trunk, sqlite backend bug with date handlig

2007-07-07 Thread Malcolm Tredinnick
On Sat, 2007-07-07 at 23:04 +0300, Andrey Khavryuchenko wrote: > > MT> On Sat, 2007-07-07 at 20:57 +0300, Andrey Khavryuchenko wrote: > >> While I'm digging in sqlite backend sources, may anyone share his > >> experience? > > MT> I just tried this with some models I have here using sqlite

mix in view or template?

2007-07-07 Thread Carl Karsten
I am trying to figure out the best place to matchup Events and Dates when rendering a 'basic calendar.' Events: 0, 1, more per date. Dates: a list of all the dates in a month, so about 30 - one for each day. # views.py class Event(models.Model): title = models.CharField(maxlength=255)

Re: trunk, sqlite backend bug with date handlig

2007-07-07 Thread Andrey Khavryuchenko
MT> On Sat, 2007-07-07 at 20:57 +0300, Andrey Khavryuchenko wrote: >> While I'm digging in sqlite backend sources, may anyone share his >> experience? MT> I just tried this with some models I have here using sqlite and they all MT> loaded DateTime fields as Python datetime instances.

object_list=[] ?

2007-07-07 Thread Carl Karsten
# views.py class Event(models.Model): title = models.CharField(maxlength=255) eventdate = models.DateField() description = models.TextField(blank=True) def __str__(self): return "%(ed)s %(t)s" % {'t':self.title, 'ed':self.eventdate } # models.py # get Events

Re: Eroneous error with development server: 'module' object has no attribute 'urlpatterns'

2007-07-07 Thread Malcolm Tredinnick
On Sat, 2007-07-07 at 19:51 +, Steve Bergman wrote: > Apologies if I was not clear. Yes, I was expecting that if I had a > syntax error in my code, the development server (./manage.py > runserver) would either abort completely or restart itself. > > Instead, I see the error page directing

Re: Eroneous error with development server: 'module' object has no attribute 'urlpatterns'

2007-07-07 Thread Steve Bergman
Apologies if I was not clear. Yes, I was expecting that if I had a syntax error in my code, the development server (./manage.py runserver) would either abort completely or restart itself. Instead, I see the error page directing me to the syntax error, which I fix, and then reload the page or

Re: one to many

2007-07-07 Thread [EMAIL PROTECTED]
Yes, clear. Thanks. I read that example (found here: http://www.djangoproject.com/documentation/models/many_to_one/ ) right after I posted. I thought this usage made it very clear: # Create an Article via the Reporter object. >>> new_article = r.article_set.create(headline="John's second

Re: Eroneous error with development server: 'module' object has no attribute 'urlpatterns'

2007-07-07 Thread Malcolm Tredinnick
On Sat, 2007-07-07 at 19:15 +, Steve Bergman wrote: > I'm still seeing this with 5631. It is definitely after I hit a > syntax errror in my code that I see the behavior. I'm wondering if I > am the only one seeing this. Or if is perhaps expected behavior. What you do mean by "after you hit

Re: Eroneous error with development server: 'module' object has no attribute 'urlpatterns'

2007-07-07 Thread Steve Bergman
I'm still seeing this with 5631. It is definitely after I hit a syntax errror in my code that I see the behavior. I'm wondering if I am the only one seeing this. Or if is perhaps expected behavior. Thanks, Steve Bergman --~--~-~--~~~---~--~~ You received this

Re: trunk, sqlite backend bug with date handlig

2007-07-07 Thread Malcolm Tredinnick
On Sat, 2007-07-07 at 20:57 +0300, Andrey Khavryuchenko wrote: > Hi! > > Had anyone noticed that loading DateField and DateTimeField from sqlite > in-memory db results in getting plain strings instead of datetime objects? > > Code: > > f = models.Feed(feed_url='no such url',

trunk, sqlite backend bug with date handlig

2007-07-07 Thread Andrey Khavryuchenko
Hi! Had anyone noticed that loading DateField and DateTimeField from sqlite in-memory db results in getting plain strings instead of datetime objects? Code: f = models.Feed(feed_url='no such url', is_active=True) f.save() post = models.Post(feed = f, title='test post',

Re: Building forms by hands

2007-07-07 Thread Alexander Solovyov
On 7 июл, 20:30, "Bill Fenner" <[EMAIL PROTECTED]> wrote: > I wrote about a helper function that lets you access > individual radio buttons too, since otherwise you get all the > radiobuttons in one clump. > Seehttp://fenron.blogspot.com/2007/06/custom-radio-field-rendering-with > .

Re: Building forms by hands

2007-07-07 Thread Alexander Solovyov
On 7 июл, 20:14, Steve Bergman <[EMAIL PROTECTED]> wrote: > You do know that you can place the fields yourself, right? I know that I can. ;) They want to have all this s in HTML. But, if I can't easily get value from field, they will use {{ form.field }} notation. :D -- Alexander

Re: caching and authentication

2007-07-07 Thread Honza Král
On 7/7/07, patrick k. <[EMAIL PROTECTED]> wrote: > > > Am 07.07.2007 um 02:13 schrieb Jeremy Dunck: > > > > > On 7/6/07, patrickk <[EMAIL PROTECTED]> wrote: > >> > >> when having a header where the username and a logout-button is > >> displayed, how do you cache this page/view? > > > > There's a

Re: Building forms by hands

2007-07-07 Thread Bill Fenner
On 7/7/07, Alexander Solovyov <[EMAIL PROTECTED]> wrote: > Mmm... I'm using form_for_instance-derived form with many > modifications (Indeed, this is better than using form, written by > hands) - I love automatization. But my colleguaes, who are responsible > for HTML part, doesn't like

Re: Building forms by hands

2007-07-07 Thread Steve Bergman
On Jul 7, 9:48 am, Alexander Solovyov <[EMAIL PROTECTED]> wrote: > But my colleguaes, who are responsible > for HTML part, doesn't like django-generated forms - they want full > control. Yeah. Coworkers are a drag. ;-) You do know that you can place the fields yourself, right? If your form

Re: caching and authentication

2007-07-07 Thread patrick k.
Am 07.07.2007 um 02:13 schrieb Jeremy Dunck: > > On 7/6/07, patrickk <[EMAIL PROTECTED]> wrote: >> >> when having a header where the username and a logout-button is >> displayed, how do you cache this page/view? > > There's a CACHE_MIDDLEWARE_ANONYMOUS_ONLY setting if you want to only > do

It's "official"...The 7 Figure Code Has Launched!

2007-07-07 Thread AShopper.net
Hi, don't waste a single second... The most talked about product launch of 2007 just hit the shelves and you need to move *fast* if you expect to get your copy before they're gone! Go Here Now: => https://paydotcom.com/r/15727/pfelicies/ It really doesn't matter what business you're in, or how

Re: Building forms by hands

2007-07-07 Thread Alexander Solovyov
On 7 июл, 16:08, "Todd O'Bryan" <[EMAIL PROTECTED]> wrote: > On Sat, 2007-07-07 at 12:36 +, Alexander Solovyov wrote: > > On 5 июл, 14:19, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > > > > Can you explain your problem another way, possibly with a more > > > complete example? > > > Ok,

Re: Building forms by hands

2007-07-07 Thread Todd O'Bryan
On Sat, 2007-07-07 at 12:36 +, Alexander Solovyov wrote: > On 5 июл, 14:19, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > > > Can you explain your problem another way, possibly with a more > > complete example? > > Ok, I'll try. > > I want to enter HTML by hands, but can't determine

Re: Adding own auth methods

2007-07-07 Thread Tim Chase
> I'm trying to figure out whether I can use Django's built in auth > system for my needs. I need to limit access to certain areas > depending on whether the user is member of particular groups. Not > groups as in whether they area admins, moderators etc, but more in a > social network type

Re: Building forms by hands

2007-07-07 Thread Alexander Solovyov
On 5 июл, 14:19, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > Can you explain your problem another way, possibly with a more > complete example? Ok, I'll try. I want to enter HTML by hands, but can't determine which radio must be selected. Form is built with form_for_instance, so it

Re: No module named _md5

2007-07-07 Thread Graham Dumpleton
On Jul 7, 6:25 pm, e-gor <[EMAIL PROTECTED]> wrote: > Switching off mod_php doesn't help. > > when i import module md5 from command prompt there are no errors: > > # python > Python 2.5.1 (r251:54863, Jun 28 2007, 13:12:40) > [GCC 3.4.6 [FreeBSD] 20060305] on freebsd6 > Type "help", "copyright",

Adding own auth methods

2007-07-07 Thread Jamie Pittock
Hi all, I'm trying to figure out whether I can use Django's built in auth system for my needs. I need to limit access to certain areas depending on whether the user is member of particular groups. Not groups as in whether they area admins, moderators etc, but more in a social network type

Re: Error log interpretation

2007-07-07 Thread lastmohican
Hi guys, I posted this elsewhere but if you're up for an example consider my photo app or image gallery here: https://saschashideout.de/wiki/DjangoGalleryTutorial/ I am currently working on it, but when it's finished I will upload also urls.py and views.py. --- saschashideout.de

Re: making newforms' field as type hidden temporarily

2007-07-07 Thread [EMAIL PROTECTED]
On Jul 7, 10:47 am, Mambaragi <[EMAIL PROTECTED]> wrote: > Hello, > I use Django 0.96, newforms. > > If a form's field is bound, sometimes I need it to be hidden. > I have to use {% if %} for this. > But if it possible to set the form object's field as hidden > temporarily, it will be really

making newforms' field as type hidden temporarily

2007-07-07 Thread Mambaragi
Hello, I use Django 0.96, newforms. If a form's field is bound, sometimes I need it to be hidden. I have to use {% if %} for this. But if it possible to set the form object's field as hidden temporarily, it will be really nice. Regards, KwonNam.

Re: No module named _md5

2007-07-07 Thread e-gor
Switching off mod_php doesn't help. when i import module md5 from command prompt there are no errors: # python Python 2.5.1 (r251:54863, Jun 28 2007, 13:12:40) [GCC 3.4.6 [FreeBSD] 20060305] on freebsd6 Type "help", "copyright", "credits" or "license" for more information. >>> import md5 >>>