Re: MySQL-python-1.2.2 install problems

2008-06-30 Thread Malcolm Tredinnick
On Mon, 2008-06-30 at 20:13 -0700, [EMAIL PROTECTED] wrote: > Hello, > > I'm having problems installing MySQL-python-1.2.2. I've installed this > on my iMac with no problems but can't figure out how to resolve this: no Every now and again people report this. It means your Python installation

Re: Inheriting from auth.models.User

2008-06-30 Thread Michael Richardson
> Really? I was sort of hoping with model inheritance and newforms-admin I > would finally be able to get rid of user profile.  It was a useful hack > but now that there is a general solution the special case should be > disfavored, no? There's a patch for this -

MySQL-python-1.2.2 install problems

2008-06-30 Thread [EMAIL PROTECTED]
Hello, I'm having problems installing MySQL-python-1.2.2. I've installed this on my iMac with no problems but can't figure out how to resolve this: sudo port install py25-mysql ---> Fetching py25-setuptools ---> Attempting to fetch setuptools-0.6c8.tar.gz from

Re: Django newforms RadioSelect issue

2008-06-30 Thread Karen Tracey
On Mon, Jun 30, 2008 at 10:44 PM, Simon Li <[EMAIL PROTECTED]> wrote: > > Hi Guys; > > I use Django newforms,I met a problem > > UserRole=(['admin','administrator'],['user','Normal User']) > user_role = > >

Django newforms RadioSelect issue

2008-06-30 Thread Simon Li
Hi Guys; I use Django newforms,I met a problem UserRole=(['admin','administrator'],['user','Normal User']) user_role = forms.CharField(widget=forms.RadioSelect(choices=UserRole),error_messages={'required':u'You must choose one!'}) the code is rendered to html is: Administrator Normal User

Re: streaming upload

2008-06-30 Thread Graham Dumpleton
On Jul 1, 7:48 am, umrzyk <[EMAIL PROTECTED]> wrote: > On 30 Cze, 03:51, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > > > You may have to to ask the author of nginxmod_wsgiwhether streaming > > uploads is even possible. > > > I vaguely remember from discussions, that due to nginxmod_wsgibeing

Re: dreaded FieldError (used to be KeyError) can only replicate on production, ugh!

2008-06-30 Thread Malcolm Tredinnick
On Mon, 2008-06-30 at 16:53 -0700, Milan Andric wrote: > > > On Jun 30, 3:32 pm, Milan Andric <[EMAIL PROTECTED]> wrote: > > On Jun 30, 3:08 pm, "Scott Moonen" <[EMAIL PROTECTED]> wrote: > > > > > Hi Milan, would you mind posting the source for the object_list function > > > as > > > well? >

Re: Programming error 1064 - possibly bad string length?

2008-06-30 Thread Simon Tite
Karen, That was a good idea, trying from the manage.py shell:- it worked perfectly... So then I changed the form and just hard-coded the return value, like: #up.telephone=self.cleaned_data['telephone'], up.telephone="370 5814" up.save() (This closely duplicated what I

Re: MediaTemple Containers

2008-06-30 Thread elithrar
Have you considered WebFaction at all, if you're after Django on shared hosting? http://djangofriendly.com/hosts/ has a listing of hosts (shared & VPS) that do Django hosting - with comments about them. --~--~-~--~~~---~--~~ You received this message because you

Re: Programming error 1064 - possibly bad string length?

2008-06-30 Thread Karen Tracey
On Mon, Jun 30, 2008 at 7:36 PM, Karen Tracey <[EMAIL PROTECTED]> wrote: > On Mon, Jun 30, 2008 at 7:19 PM, Simon Tite <[EMAIL PROTECTED]> wrote: > >> > However, it could be that the problem is lurking at the beginning of >> > the SQL statement, which I haven't been able to see yet >> >

Re: dreaded FieldError (used to be KeyError) can only replicate on production, ugh!

2008-06-30 Thread Milan Andric
On Jun 30, 3:32 pm, Milan Andric <[EMAIL PROTECTED]> wrote: > On Jun 30, 3:08 pm, "Scott Moonen" <[EMAIL PROTECTED]> wrote: > > > Hi Milan, would you mind posting the source for the object_list function as > > well? > > I just imported object_list from django.views.generic.list_detail. > One

Re: Programming error 1064 - possibly bad string length?

2008-06-30 Thread Karen Tracey
On Mon, Jun 30, 2008 at 7:19 PM, Simon Tite <[EMAIL PROTECTED]> wrote: > > However, it could be that the problem is lurking at the beginning of > > the SQL statement, which I haven't been able to see yet > > ...so, how does one go about looking at the actual SQL which is passed > > to the

Re: Programming error 1064 - possibly bad string length?

2008-06-30 Thread Simon Tite
correction: the mySql command line which works is: UPDATE `app_userprofile` SET `telephone`=("'123 123'") WHERE `app_userprofile`.`id` = 1; On Jul 1, 1:14 am, Simon Tite <[EMAIL PROTECTED]> wrote: > Well, the quotes thing seems perhaps to be a bit of a red herring... I > have taken ALL the

Re: Programming error 1064 - possibly bad string length?

2008-06-30 Thread Simon Tite
Well, the quotes thing seems perhaps to be a bit of a red herring... I have taken ALL the fields out of my model and form (although they still remain in the database itself, I think Django will ignore their existence), apart from the foreign key to the User, and the telephone number. (Yes, this

Re: Inheriting from auth.models.User

2008-06-30 Thread Norman Harman
Ayaz Ahmed Khan wrote: > bhunter wrote: >> This should be a simple question. I'd like an Employee model. First >> name, last name, username, password--basically all the same stuff >> that's already in django.contrib.auth.models.User. Maybe I want some >> other things like salary, too. So, it

Re: Sorting by a nullable ForeignKey

2008-06-30 Thread Alex Rades
Hi Karen, could you point me to the code in admin which is responsible for this behaviour? I could produce a patch, do some testing and submit a ticket. Thank you On Mon, Jun 30, 2008 at 9:29 PM, Karen Tracey <[EMAIL PROTECTED]> wrote: > On Mon, Jun 30, 2008 at 11:32 AM, Alex Rades <[EMAIL

Re: streaming upload

2008-06-30 Thread umrzyk
On 30 Cze, 03:51, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > You may have to to ask the author of nginx mod_wsgi whether streaming > uploads is even possible. > > I vaguely remember from discussions, that due to nginx mod_wsgi being > an event driven system, rather than using a threaded model,

Re: Re-ordering foreign key on OF admin

2008-06-30 Thread Rajesh Dhawan
Hi, On Jun 30, 1:49 pm, "J. Cliff Dyer" <[EMAIL PROTECTED]> wrote: > Is it possible to add sorting criteria for a foreign key widget > in the oldforms admin?  (Django 0.96) > > I've got a foreign-key list with several thousand members, and it can be > difficult to find the appropriate item to

Re: sessions in template (outside of views)

2008-06-30 Thread Bobby Roberts
i love you haha many thanks to all the Django programmers who have given us such an awesome platform. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: sessions in template (outside of views)

2008-06-30 Thread Arien
On Mon, Jun 30, 2008 at 3:27 PM, Bobby Roberts <[EMAIL PROTECTED]> wrote: > > in my view I have: > > > from django.template import RequestContext > from django.template import Template, Context > > [... session variables set here...] > > return render_to_response('step3.html', >

Re: dreaded FieldError (used to be KeyError) can only replicate on production, ugh!

2008-06-30 Thread Milan Andric
On Jun 30, 3:08 pm, "Scott Moonen" <[EMAIL PROTECTED]> wrote: > Hi Milan, would you mind posting the source for the object_list function as > well? > I just imported object_list from django.views.generic.list_detail. -- Milan --~--~-~--~~~---~--~~ You received

Re: Programming error 1064 - possibly bad string length?

2008-06-30 Thread Simon Tite
Thanks Scott, for the speedy reply. "gender" is defined in models.py as gender=models.CharField(max_length=1,default="U",choices=GENDERS) and GENDERS=(("M","Male"),("F","Female"),("U","Uncertain")) However, when you say that it's a three-character string including single-quotes, where did the

Re: sessions in template (outside of views)

2008-06-30 Thread Bobby Roberts
> If you have activated the request context processor, the request is > *automatically* passed to the template.  (That was the point of all > this, right?) > > So to display the value of request.session['City'], for example, you'd > use this in your template: > >   {{ request.session.City }} > >

Re: Programming error 1064 - possibly bad string length?

2008-06-30 Thread Scott Moonen
Actually, I might be misreading the error string. It looks like the address field has extra quotes around it too. Maybe that's just how strings get formatted in this case and is not the problem... -- Scott On Mon, Jun 30, 2008 at 4:02 PM, Scott Moonen <[EMAIL PROTECTED]> wrote: > Simon, my

Re: dreaded FieldError (used to be KeyError) can only replicate on production, ugh!

2008-06-30 Thread Scott Moonen
Hi Milan, would you mind posting the source for the object_list function as well? -- Scott On Mon, Jun 30, 2008 at 4:01 PM, Milan Andric <[EMAIL PROTECTED]> wrote: > > I've been wresting with this one for a couple hours now trying to > track it down, but no luck. I'm recently updated to

Re: Programming error 1064 - possibly bad string length?

2008-06-30 Thread Simon Tite
On Jun 30, 10:02 pm, "Scott Moonen" <[EMAIL PROTECTED]> wrote: > Simon, my guess is that the error doesn't have to do with the truncation you > see, but that something that is passing the error along is trying to be > helpful by truncating the string -- one hopes in such a way that the error >

Re: Programming error 1064 - possibly bad string length?

2008-06-30 Thread Scott Moonen
Simon, my guess is that the error doesn't have to do with the truncation you see, but that something that is passing the error along is trying to be helpful by truncating the string -- one hopes in such a way that the error is still evident. :) Looking at the snippet you've posted, I wonder how

dreaded FieldError (used to be KeyError) can only replicate on production, ugh!

2008-06-30 Thread Milan Andric
I've been wresting with this one for a couple hours now trying to track it down, but no luck. I'm recently updated to django trunk and getting very odd reponses. I could take the same page and refresh it several times in succession and eventually get the page, but usually get 500 errors. What

Re: sessions in template (outside of views)

2008-06-30 Thread Arien
On Mon, Jun 30, 2008 at 8:12 AM, Bobby Roberts <[EMAIL PROTECTED]> wrote: > > ok i'm totally lost i guess... > > in my view i setup my session variables as such... > >request.session['Street2']=request.POST.get('Street2','') >

Programming error 1064 - possibly bad string length?

2008-06-30 Thread Simon Tite
I get the following error when trying to save a model - "userprofile.save()" - (1064, 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'), `gender` = ("\'F\'",), `hideyear` = (\'0\',), `address` = ("\'97

Re: Sorting by a nullable ForeignKey

2008-06-30 Thread Karen Tracey
On Mon, Jun 30, 2008 at 11:32 AM, Alex Rades <[EMAIL PROTECTED]> wrote: > Hi, > In the admin site (using latest newforms-admin), it seems not possible to > sort a table by a ForeignKey which is blank=True, null=True. > See this little example: > > class Group(models.Model): > name =

Re: possible urls issue

2008-06-30 Thread Bobby Roberts
ok first of all, thanks for your patience and your help. I'm making solid progress. So that I can learn how to program in Django as efficiently as possible... is there a better way to pass session data back to a template? Here's what i'm currently doing... def DoPayInfoForm (request): #

Re: Command Line Admin

2008-06-30 Thread Jeff Anderson
Eduardo O. Padoan wrote: python manage.py shell Yes, this works, but I'm thinking more of a curses-based app that can use the admin app's definitions and validations. I'm really looking at a niche where the admin website is 'too much' and the 'manage.py shell' is not enough.

Best way to structure flat pages

2008-06-30 Thread mccomas . chris
Hey all. Working on a new site for a University and was curious on the best way to use Django's FlatPages app, if I should use that or not. They have like 6 main sections: Current Students, Prospective Students, Faculty and Staff, About the School, Pharmacy Profession, and Community. Each of

Re: Command Line Admin

2008-06-30 Thread Eduardo O. Padoan
On Mon, Jun 30, 2008 at 2:31 PM, Jeff Anderson <[EMAIL PROTECTED]> wrote: > I thought of something that might prove useful. > > Anyone that has installed trac has used trac's command line admin interface. > > Something similar for django might be desirable in some situations. > > What I'm

Re: Querying a User profile

2008-06-30 Thread [EMAIL PROTECTED]
If you're using the svn release, you can filter directly on the user using the backwards relationship filtering thing. users=User.objects.filter(userprofile_set__team=team) Where userprofile_set is the related_name given in the userprofile's 'user' FK declaration. On Jun 30, 12:51 am, AdamC

Re: Regex

2008-06-30 Thread [EMAIL PROTECTED]
Not that I know of, in the event you need it you can also import QNot from the same place as Q and it does the same thing as ~Q On Jun 30, 12:48 pm, mike171562 <[EMAIL PROTECTED]> wrote: > just wondering, would there be a difference in performance between > using .exclude without the negation or

Re: Inheriting from auth.models.User

2008-06-30 Thread [EMAIL PROTECTED]
Just a note, model inheritance isn't current supported in the Admin(although it's coming). On Jun 30, 12:53 pm, bhunter <[EMAIL PROTECTED]> wrote: > Amazing!  5 minutes and dead-on answer. > Thanks.  The Django community rocks. > > PS Sorry for the RTFM question. > > On Jun 30, 1:29 pm, Ayaz

Re: Inheriting from auth.models.User

2008-06-30 Thread bhunter
Amazing! 5 minutes and dead-on answer. Thanks. The Django community rocks. PS Sorry for the RTFM question. On Jun 30, 1:29 pm, Ayaz Ahmed Khan <[EMAIL PROTECTED]> wrote: > bhunter wrote: > > This should be a simple question.  I'd like an Employee model.  First > > name, last name, username,

Re-ordering foreign key on OF admin

2008-06-30 Thread J. Cliff Dyer
Is it possible to add sorting criteria for a foreign key widget in the oldforms admin? (Django 0.96) I've got a foreign-key list with several thousand members, and it can be difficult to find the appropriate item to link to in the drop-box. It is particularly difficult when new items are

Re: Regex

2008-06-30 Thread mike171562
just wondering, would there be a difference in performance between using .exclude without the negation or .filter( with the negation? On Jun 30, 12:33 pm, Ayaz Ahmed Khan <[EMAIL PROTECTED]> wrote: > On Jun 30, 10:27 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > > > > > Negation of Q

Re: Regex

2008-06-30 Thread Ayaz Ahmed Khan
On Jun 30, 10:27 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > > Negation of Q objects is a recent addition > (seehttp://code.djangoproject.com/ticket/4858).  You must be using a > post-queryset-refactor SVN checkout while the original poster is probably > using a 0.96 release (or an SVN

Command Line Admin

2008-06-30 Thread Jeff Anderson
I thought of something that might prove useful. Anyone that has installed trac has used trac's command line admin interface. Something similar for django might be desirable in some situations. What I'm thinking is more or less a drop-in replacement for the django.contrib.admin app. One would

Re: Inheriting from auth.models.User

2008-06-30 Thread Ayaz Ahmed Khan
bhunter wrote: > This should be a simple question. I'd like an Employee model. First > name, last name, username, password--basically all the same stuff > that's already in django.contrib.auth.models.User. Maybe I want some > other things like salary, too. So, it makes sense that I should

Re: Regex

2008-06-30 Thread Karen Tracey
On Mon, Jun 30, 2008 at 12:27 PM, Ayaz Ahmed Khan <[EMAIL PROTECTED]> wrote: > > On Jun 30, 9:08 pm, mike171562 <[EMAIL PROTECTED]> wrote: > > Thanks that works well, but when I try to use the ~ as you suggested I > > get the error > > ""bad operand type for unary ~: 'Q'"" > > so i removed the ~

Inheriting from auth.models.User

2008-06-30 Thread bhunter
This should be a simple question. I'd like an Employee model. First name, last name, username, password--basically all the same stuff that's already in django.contrib.auth.models.User. Maybe I want some other things like salary, too. So, it makes sense that I should just inherit from this

Re: Getting "ProgrammingError" when saving my queryset into a session variable

2008-06-30 Thread Karen Tracey
On Mon, Jun 30, 2008 at 11:54 AM, Greg <[EMAIL PROTECTED]> wrote: > > Hello, > I have the following code: > > /// > > def tracking(request): >a = Order.objects.filter(order_status=2) >request.session['tracking'] = list(a) > > /// > > Whenever i access this function I get the following

Re: Problem with database view in admin

2008-06-30 Thread bcrem
Whoops...forgot to restart apache. Did that, on to a new set of errors; these make more sense to me though. Never mind (I hope). On Jun 30, 1:02 pm, bcrem <[EMAIL PROTECTED]> wrote: > Hello all, > > I've just run "manage syncdb" after some changes to my database on my > production site, but

Problem with database view in admin

2008-06-30 Thread bcrem
Hello all, I've just run "manage syncdb" after some changes to my database on my production site, but somehow my admin database view seems to be stuck on the old database (caching?); I see old tables that should be gone, don't see the new ones I've added models for. Before doing a sync I

Re: Django as front-end for php- and zope2-based apps?

2008-06-30 Thread MiloZ
Hi, I have just put a project on Google code, django-punbb: it provides a SSO between these two apps, php and django; more, as dokuwiki can share authentication with punbb, it will be possible to have a django "portal" with a forum and a wiki in php. http://code.google.com/p/django-punbb/ See

Re: Regex

2008-06-30 Thread Ayaz Ahmed Khan
On Jun 30, 9:08 pm, mike171562 <[EMAIL PROTECTED]> wrote: > Thanks that works well, but when I try to use the ~ as you suggested I > get the error > ""bad operand type for unary ~: 'Q'"" > so i removed the ~ and changed 'filter' to 'exclude' > That is weird. The negation operator works fine

Re: Trying to get ifequal to evaluate to True

2008-06-30 Thread Ayaz Ahmed Khan
On Jun 30, 9:00 pm, "Paolo Ambrosio" <[EMAIL PROTECTED]> wrote: > I just built a test application and it works for me, if I understood > what is your problem. > [...] > P.S. > I am using the trunk > Many thanks for taking out the time to build a test application. I really appreciate that.

Re: Regex

2008-06-30 Thread mike171562
Thanks that works well, but when I try to use the ~ as you suggested I get the error ""bad operand type for unary ~: 'Q'"" so i removed the ~ and changed 'filter' to 'exclude' On Jun 30, 9:53 am, Ayaz Ahmed Khan <[EMAIL PROTECTED]> wrote: > On Jun 30, 7:13 pm, mike171562 <[EMAIL PROTECTED]>

Re: possible urls issue

2008-06-30 Thread Paolo Ambrosio
On Mon, Jun 30, 2008 at 5:36 PM, Bobby Roberts <[EMAIL PROTECTED]> wrote: > ok assuming i use a HttpResponseRedirect, how would I pull the session > variables into the template? HttpResponseRedirect does not use a template. The response is a 302 code to the browser, not an html page, to tell

Re: Trying to get ifequal to evaluate to True

2008-06-30 Thread Paolo Ambrosio
On Mon, Jun 30, 2008 at 5:14 PM, Ayaz Ahmed Khan <[EMAIL PROTECTED]> wrote: > > On Jun 30, 8:05 pm, "Paolo Ambrosio" <[EMAIL PROTECTED]> > wrote: >> On Mon, Jun 30, 2008 at 4:52 PM, Ayaz Ahmed Khan >> >> <[EMAIL PROTECTED]> wrote: >> > [...] The variable "next" >> > does have that particular

Getting "ProgrammingError" when saving my queryset into a session variable

2008-06-30 Thread Greg
Hello, I have the following code: /// def tracking(request): a = Order.objects.filter(order_status=2) request.session['tracking'] = list(a) /// Whenever i access this function I get the following error: ProgrammingError at /tracking/ operator does not exist: character varying =

Re: possible urls issue

2008-06-30 Thread Bobby Roberts
ok assuming i use a HttpResponseRedirect, how would I pull the session variables into the template? BR --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Sorting by a nullable ForeignKey

2008-06-30 Thread Alex Rades
Hi, In the admin site (using latest newforms-admin), it seems not possible to sort a table by a ForeignKey which is blank=True, null=True. See this little example: class Group(models.Model): name = models.CharField(max_length=200, primary_key=True) class Person(models.Model): name =

Re: custom form with admin look and feel

2008-06-30 Thread Ayaz Ahmed Khan
chefsmart wrote: > I'm using django svn trunk. I have created several custom forms that > show up in the admin section of the website. However, these forms look > nothing like the admin forms. I tried extending change_form.html > template - unsuccessfully. > > Does anyone know what my template

Re: Trying to get ifequal to evaluate to True

2008-06-30 Thread Ayaz Ahmed Khan
On Jun 30, 8:05 pm, "Paolo Ambrosio" <[EMAIL PROTECTED]> wrote: > On Mon, Jun 30, 2008 at 4:52 PM, Ayaz Ahmed Khan > > <[EMAIL PROTECTED]> wrote: > > [...]  The variable "next" > > does have that particular value (I verified both by printing it out > > and by making sure {% if next %} evaluates

Re: possible urls issue

2008-06-30 Thread Ayaz Ahmed Khan
Bobby Roberts wrote: > i have a situation here. I'm trying to NOT use .html extensions in > this project. In other words i'd really like to just have my urls be > directories. The project consists of a series of forms and i'd like > them to proceed as follows: > mysite.com/step1/ >

Re: Trying to get ifequal to evaluate to True

2008-06-30 Thread Paolo Ambrosio
On Mon, Jun 30, 2008 at 4:52 PM, Ayaz Ahmed Khan <[EMAIL PROTECTED]> wrote: > [...] The variable "next" > does have that particular value (I verified both by printing it out > and by making sure {% if next %} evaluates to True). However, the > "ifequal" expression just doesn't work. Are you

Re: possible urls issue

2008-06-30 Thread Karen Tracey
On Mon, Jun 30, 2008 at 10:50 AM, Bobby Roberts <[EMAIL PROTECTED]> wrote: > > i have a situation here. I'm trying to NOT use .html extensions in > this project. In other words i'd really like to just have my urls be > directories. The project consists of a series of forms and i'd like > them

Re: possible urls issue

2008-06-30 Thread Paolo Ambrosio
On Mon, Jun 30, 2008 at 4:50 PM, Bobby Roberts <[EMAIL PROTECTED]> wrote: > when form1 is_valid, the view saves form1 to session variables then > redirects to step2 as follows: > > return render_to_response("step2.html",'form': form}, > context_instance=RequestContext(request)) > > > The main

Trying to get ifequal to evaluate to True

2008-06-30 Thread Ayaz Ahmed Khan
If a view is decorated with the `login_required decorator', an anonymous user accessing that view is directed to the login page with the URL the view exists on preserved in the "next" variable which is passed to the login view and template. In the login template, I am trying to match the value

Re: Regex

2008-06-30 Thread Ayaz Ahmed Khan
On Jun 30, 7:13 pm, mike171562 <[EMAIL PROTECTED]> wrote: > Hello, >    I am working on a django that querys long distance numbers from a > mysql database. I am currently using the django API, that goes > something like this. > > long_distance = >

possible urls issue

2008-06-30 Thread Bobby Roberts
i have a situation here. I'm trying to NOT use .html extensions in this project. In other words i'd really like to just have my urls be directories. The project consists of a series of forms and i'd like them to proceed as follows: mysite.com/step1/ mysite.com/step2/ mysite.com/step3/ Part

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

2008-06-30 Thread Ulf Kronman
[Posted this reply yesterday, but I can't see it, I post it again. Sorry for any duplication. / Ulf ] On Jun 27, 4:12 pm, gordyt <[EMAIL PROTECTED]> wrote: > Ulf I haven't played with this second solution, but I did just check > out a copy of the django-pyodbc project.  You should be OK

Re: Regex

2008-06-30 Thread mike171562
Rajesh D, That would be much simpler, but this is a pre-existing database of call records. thanks On Jun 30, 9:35 am, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > Hi Mike, > > >I am working on a django that querys long distance numbers from a > > mysql database. I am currently using the

Re: custom form with admin look and feel

2008-06-30 Thread chefsmart
I tried this, but couldn't get the desired results. Specifically, I want to have the look and feel of the change_form (including add another, save buttons etc and how the fields are arranged on the page). I have noticed that the change_form has some specific css and javascript. Is this documented

Re: Regex

2008-06-30 Thread Rajesh Dhawan
Hi Mike, >I am working on a django that querys long distance numbers from a > mysql database. I am currently using the django API, that goes > something like this. > > long_distance = >

Re: Dynamically setting a form's fields

2008-06-30 Thread Rajesh Dhawan
Hi, > I'm trying to do what I like to call "dynamically set a form's field". > I want the user to input a dictionary e.g. > { 'intField' : 'int', > 'strField' : 'str' } > ...to the constructor of the form which will then create the fields > 'intField' (forms.IntegerField) and 'strField'

Re: get admin url patch on db/models/base.py

2008-06-30 Thread Milan Andric
On Jun 29, 7:46 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sun, 2008-06-29 at 17:27 -0700, Milan Andric wrote: > > I was just curious if anything like this get_admin_url patch was > > already available in django trunk somewhere and I can eliminate the > > patch from my patched

Regex

2008-06-30 Thread mike171562
Hello, I am working on a django that querys long distance numbers from a mysql database. I am currently using the django API, that goes something like this. long_distance =

Re: Best way of getting objects within a certain date range (method or manager)?

2008-06-30 Thread [EMAIL PROTECTED]
That was it. Thanks! On Jun 30, 9:59 am, Matt <[EMAIL PROTECTED]> wrote: > On Jun 30, 8:36 am, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > It sounds like I'm using "event_date" without defining it first. But > > the examples in the Django documentation do the same thing. What am I > >

Re: Project structure

2008-06-30 Thread Rajesh Dhawan
Hi, > > Is it possible for me to define this datetime-function just once and > without the need to include the 'current_date' variable to the > "render_to_response" function every time? > I would like some standard variables in my Django-project to be > available in all templates without the

Re: Best way of getting objects within a certain date range (method or manager)?

2008-06-30 Thread Matt
On Jun 30, 8:36 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > It sounds like I'm using "event_date" without defining it first. But > the examples in the Django documentation do the same thing. What am I > doing wrong? Try: super(CurrentManager,

Re: views.py: Always a simple return?

2008-06-30 Thread RossGK
That's good advice, Ross.. I have put together a looped XMLHttpRequest script that seems to be working well. Against my Django server it can get 100 replies in about a second, so it appears theoretically at least to be able to responsive enough to handle a few per second. Your note about 28 in

Project structure

2008-06-30 Thread Nianbig
Hi, I have a question regarding best-practice on django project structure, I think I´ll best explain it with an example: I have 2 views, first and second. I have the same function (which in this case is a datetime-function) that is exactly the same in both views. views.py: - from

Re: Best way of getting objects within a certain date range (method or manager)?

2008-06-30 Thread [EMAIL PROTECTED]
Yes, it sounds like a custom manager will do the job. Here's what I added: class CurrentManager(models.Manager): def get_query_set(self): return super(CurrentManager, self).get_query_set().filter(event_date > datetime.date.today()) class Event(models.Model):

Re: Date based URLconf condition not working

2008-06-30 Thread Karen Tracey
On Mon, Jun 30, 2008 at 2:55 AM, 城市拓荒者 <[EMAIL PROTECTED]> wrote: > Hello! >I encounter same trouble,Please tell me how resolve it,thanks! > The answer for the original poster's problem was provided. If that answer does not fix your problem, then you must have a slightly different problem.

Re: sessions in template (outside of views)

2008-06-30 Thread Bobby Roberts
ok i'm totally lost i guess... in my view i setup my session variables as such... request.session['Street2']=request.POST.get('Street2','') request.session['City']=request.POST.get('City','') request.session['State']=request.POST.get('State','')

Re: Best way of getting objects within a certain date range (method or manager)?

2008-06-30 Thread bruno desthuilliers
On 30 juin, 14:53, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm wanting to display only current (vs. expired) calendar events via > my Django events app. Each event has a date that it will occur. But > I'm not sure of the best method to get only the current events in the > db. > >

Best way of getting objects within a certain date range (method or manager)?

2008-06-30 Thread [EMAIL PROTECTED]
I'm wanting to display only current (vs. expired) calendar events via my Django events app. Each event has a date that it will occur. But I'm not sure of the best method to get only the current events in the db. Current events are those whose date is less than or equal to the present date. They

Re: CMD output

2008-06-30 Thread Molly
Okay, thank you, I will try that! Molly On Jun 28, 3:29 am, Joseph <[EMAIL PROTECTED]> wrote: > create a batch file (.bat) with that command: > some.exe > null > and the users can start the application by clicking on the batch file. > > There is a issue here as well - the users will see a blank

MediaTemple Containers

2008-06-30 Thread Niall McCormack
Hi there, Does anyone know when the Media Temple Grid Service Django Containers are going to launch? I'm considering transfering my hosting form Dreamhost to Media Temple, but want to make use of Django from day 1... Any info would be grand! Cheers Niall

Re: Internal Redirects Limit

2008-06-30 Thread Malcolm Tredinnick
On Mon, 2008-06-30 at 10:03 +0200, Gorm Lai wrote: > Hey, > > I now have our django project set up both locally and on our own remote > server. Everything works fine. > > However, I still have trouble getting it up and running on the client's > site. It is a big broad casting company, so they

Re: Dynamically setting a form's fields

2008-06-30 Thread Deniz Dogan
Thanks! On Jun 30, 9:28 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Try taking a look at > this:http://www.satchmoproject.com/trac/browser/satchmo/trunk/satchmo/conf... > > On Jun 30, 2:09 am, Deniz Dogan <[EMAIL PROTECTED]> wrote: > > > Hello. > > > I'm trying to do what I like to

Internal Redirects Limit

2008-06-30 Thread Gorm Lai
Hey, I now have our django project set up both locally and on our own remote server. Everything works fine. However, I still have trouble getting it up and running on the client's site. It is a big broad casting company, so they won't let me mess with their apache setup directly. They will

Re: Django setup with apache

2008-06-30 Thread Gorm Lai
Thanks guys, I got this part working now. - Cheers, Gorm Tel: (+45) 31 12 78 44 Co-Founder of 3 Lives Left Blog: http://www.lai.as/index.php On Thu, 2008-06-26 at 13:27 -0700, phillc wrote: > > your urls is setup for > http://yourdomain.com/login/... > not

Re: Dynamically setting a form's fields

2008-06-30 Thread [EMAIL PROTECTED]
Try taking a look at this: http://www.satchmoproject.com/trac/browser/satchmo/trunk/satchmo/configuration/forms.py On Jun 30, 2:09 am, Deniz Dogan <[EMAIL PROTECTED]> wrote: > Hello. > > I'm trying to do what I like to call "dynamically set a form's field". > I want the user to input a

Dynamically setting a form's fields

2008-06-30 Thread Deniz Dogan
Hello. I'm trying to do what I like to call "dynamically set a form's field". I want the user to input a dictionary e.g. { 'intField' : 'int', 'strField' : 'str' } ...to the constructor of the form which will then create the fields 'intField' (forms.IntegerField) and 'strField'

Re: Date based URLconf condition not working

2008-06-30 Thread 城市拓荒者
Hello! I encounter same trouble,Please tell me how resolve it,thanks! On 6月15日, 上午8时57分, joshuajonah <[EMAIL PROTECTED]> wrote: > On Jun 14, 8:51 pm, Jeff Anderson <[EMAIL PROTECTED]> wrote: > > > > > joshuajonah wrote: > > > Is this not impossible? > > > > 404 error: > > > Using the