Conditional Order By

2019-11-15 Thread Kev H
I have a model where a field can be null (and is most of the time). However, I need to order_by this both this field and another field (the 2nd field is never null) so that the results would be sorted by from high to low (1st based on the possible null field if it is not null and then by the 2

Re: Hi guyz . iam just a beginner in google app engine..plz help me "abt deleting datas from DATASTORE"

2012-11-09 Thread Kev Dwyer
ge that you are getting is telling you that your employeekeys list does not contain keys, it contains references to the key method of each Employee instance in your query resultset. You need to change the line employeekeys.append(employee.key) to employeekeys.append(employee.key()) Now your

Re: how to use java script alert in view? i use form submit on post method. After sucessfull opreation in view i want alert

2012-09-16 Thread Kev Dwyer
Both methods depend on the user having enabled javascript in their browser. Depending on your use case, this may not be a safe assumption. Cheers, Kev -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: CSS not appearing in production mode.

2012-06-17 Thread Kev Dwyer
Jak wrote: > Hello All, > > I am having a difficult time getting the CSS for my web app to appear when > I turn debug mode to false. When debug mode = True all the images show up > fine, but when I turn it to false only the html appears. What do you think > could be happening? > > > Thanks > >

Re: How to Detect Current Page as Homepage?

2012-03-25 Thread Kev Dwyer
easypie wrote: > I'm trying to check {% if homepage %} then show {% endif %} > > I'm not sure how to go about a test to check the current page if it's my > homepage. Do I need to mess around with context processors? What's the > usual way of doing it? And how would the {% if ... %} look like? >

Re: Error while importing URLconf 'permitprint.urls': day is out of range for month

2012-02-29 Thread Kev Dwyer
t;> > 5 """ >> >> Hmmpf. One of the things improved since 0.96 is that error reporting >> of this kind has improved. There is an import error coming from one of >> the imports in the urlconf, and that is why it cannot import the >> urlconf. Is ther

Re: Help Me With This Form

2012-01-24 Thread Kev Dwyer
or debugging purposes I suggest removing the authentication check until you're sure the form is actually rendered. Cheers, Kev -- 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@googl

Re: django-admin.py startproject will NOT work.

2011-12-30 Thread Kev Dwyer
or any help. > Hello, If you're seeing the usage message then python is able to find and execute the django-admin.py script, but the script doesn't like the input that you are providing. Can you provide a paste of what you enter in the command prompt, and the output that you receive? Ch

Re: Best way to show/hide the logout link in a template?

2011-08-18 Thread Kev Dwyer
basic question. > > > Best Regards, > I use {% if user.is_authenticated %} to condition my logout link's appearance. See https://docs.djangoproject.com/en/1.3/topics/auth/#authentication-data- in-templates Cheers, Kev -- You received this message because you are subscribe

Re: Nested formsets at Django 1.3

2011-07-31 Thread Kev Dwyer
Kev Dwyer wrote: > Hello List, > > I've been upgrading an old Django 1.1.x app to use Django 1.3, and am > having a problem with nested formsets. > ... > > > I omitted one important fact in this write-up. In Nathan's original code, the lowest

Re: upgrade Django 1.2.3 to 1.3

2011-07-31 Thread Kev Dwyer
oblem-with-django-1-3- beta. In your case your using Windows rather than Linux, but the same advice applies - remove the django folder (and any django eggs) from the c:\python26\lib\site-packages folder and re-install 1.3. Or use virtualenv to maintain separate environments. Cheers, Kev -

Nested formsets at Django 1.3

2011-07-30 Thread Kev Dwyer
to work at 1.3. Has anyone successfully used Nathan's code at 1.3, or is anyone able to point me towards a nested formset implementation that works at this release? (Sorry about the absence of code examples - Nathan's post is much clearer than my code, so I'd recommend you look

Re: WEB SERVICE IN DJANGO USING ZSI

2010-11-27 Thread Kev Dwyer
On Sat, 27 Nov 2010 20:57:17 +0530, sami nathan wrote: > for creating server.py from wsdl file i am using this following code i > dont na weather its right but its not creating any file but its throwing > error wsdl2py --extended --file=D;\soap\FlyppSms.wsdl > File "", line 1 > wsdl2py

Re: urls permalink error

2010-09-02 Thread Kev
nks :) > Hello Patricia, You need to provide the stacktrace of the error that you are getting. Kev -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscr

Re: Crashing Dev Server (or Browser?)

2010-08-01 Thread Kev
gt; >From the looks of the crash dump, it looks as if Python is trying to compute some kind of illegal time value, but I on't have a Mac so I'm afraid I'm guessing. Glad you around it, Kev -- You received this message because you are subscribed to the Google Groups "Dja

Re: Crashing Dev Server (or Browser?)

2010-08-01 Thread Kev
ersion of Apple Mac Safari, > *both* Safari and the dev server crash. I can't tell which causes > which, and frankly find it odd that either to affect the other like > this. > > Running Django 1.2.1 and Python 2.6.1 > > Any ideas? > Can you show us the output from

Re: django-admin.py not working

2010-08-01 Thread Kev
go/bin/django-admin.py /usr/lib/python-django/bin/django-admin.pyc /usr/share/doc/python-django-doc/html/ref/django-admin.html /usr/share/man/man1/django-admin.1.gz k...@hera:~$ echo $PATH /home/kev/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games So you might want to che

Re: i need help with this...

2010-05-01 Thread Kev
really meant for the django site's webmaster - it isn't something that you can do yourself. You need to contact the download site's webmaster, explain that there's a problem with the site and ask them to fix it. Cheers, Kev -- You received this message because you are subscrib

Re: django+modelform+Foreignkey

2010-03-07 Thread Kev Dwyer
ou can manage how they are displayed. For example: class Author(models.Model): name = models.ForeignKey(User) status = models.CharField(max_length=30) def __unicode__(self): return self.name Cheers, Kev -- You received this message because you are subscribed to the Google Groups &q

Re: newbie - query not working!! Help please!!

2010-03-07 Thread Kev Dwyer
anything - generally, it should to return an HttpResponse object. Review part three of the Django tutorial. Cheers, Kev -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.c

Re: Ajax request, json object, fields with instance of inherits class converted in regular string

2010-02-21 Thread Kev Dwyer
unique making it the primary key shouldn't prove to be a problem. Cheers, Kev -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group,

Re: Delete a data row that is inherit by another one.

2010-02-14 Thread Kev Dwyer
database the documentation is at http://docs.djangoproject.com/en/1.1/topics/db/queries/#deleting-objects Cheers, Kev -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com.

Re: RequestContext and user.is_authenticated confusion

2010-02-14 Thread Kev Dwyer
On Sun, 14 Feb 2010 08:30:05 -0800, Achim Domma wrote: > Hi Kev, > > thanks for the hint. Trying different solutions I introduced indeed a > typo. Now I can see the username and is_authenticated works as expected. > But still curious: Is there a good reason, why I have to pass &

Re: RequestContext and user.is_authenticated confusion

2010-02-14 Thread Kev Dwyer
are working correctly, particularly that authentication are not "lost" by forgetting to pass them to one of your views. Passing a RequestContext to your templates is the correct way to give your templates access to authentication information. It seems cumbersome while your changing a

Re: Reversing post_change_redirect argument in django.contrib.auth.views.password_change

2010-02-13 Thread Kev Dwyer
On Sat, 13 Feb 2010 13:22:54 +, Kev Dwyer wrote: > Hello List, > > > Does anyone know how I can avoid hardcoding the post_change_redirect > argument to change_password, either in urls.py or perhaps by some > trickery in the template or form? > > Many thanks, >

Reversing post_change_redirect argument in django.contrib.auth.views.password_change

2010-02-13 Thread Kev Dwyer
). Does anyone know how I can avoid hardcoding the post_change_redirect argument to change_password, either in urls.py or perhaps by some trickery in the template or form? Many thanks, Kev -- You received this message because you are subscribed to the Google Groups "Django users&quo

ModelFormSet foreign keys display

2009-12-05 Thread Kev Dwyer
however so far I can't make this work. The code here outputs the date as a selectable ModelChoiceField. If I declare date in the ModelForm class I always end up with the id from the WorkShift object rather than the date itself. Can you advise how I can declare date (or do somet

Re: Pagination Suggestions

2008-12-24 Thread kev
Ah ok :) Thx!! On Dec 24, 5:12 pm, Brian Neal wrote: > On Dec 24, 3:54 pm, kev wrote: > > > Hello, > > Im trying to create a digg type pagination. Is there a decent > > pagination app already out there that works for 1.0? I tried looking > > but havent succeeded.

Pagination Suggestions

2008-12-24 Thread kev
Hello, Im trying to create a digg type pagination. Is there a decent pagination app already out there that works for 1.0? I tried looking but havent succeeded. Thanks, Kev --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Django models

2008-12-22 Thread kev
Alright thanks a lot. On Dec 22, 3:06 pm, bruno desthuilliers wrote: > On 22 déc, 17:10, kev wrote: > > > > > Hello, > > Im reading a django book and it adds friends to user authentication > > system by making: > > > (was .96) > > > c

Re: Django models

2008-12-22 Thread kev
ogether to > pass one variable. > > On Dec 22, 10:10 am, kev wrote: > > > Hello, > > Im reading a django book and it adds friends to user authentication > > system by making: > > > (was .96) > > > class Friendship(models.Model): > >   from

Django models

2008-12-22 Thread kev
Hello, Im reading a django book and it adds friends to user authentication system by making: (was .96) class Friendship(models.Model): from_friend = models.ForeignKey( User, related_name='friend_set' ) to_friend = models.ForeignKey( User, related_name='to_friend_set' ) def __st

Django model filter

2008-12-20 Thread kev
Hello, Im a bit confused with django model api and cannot seem to figure out how to do: SQL WHERE (user == username AND friend == friend) OR (user == friend AND friend == user). How would django model api write that code? Thanks, Kevin --~--~-~--~~~---~--~~ You

Re: urls.py password reset view.

2008-12-20 Thread kev
it's rather handy: > > http://www.rkblog.rk.edu.pl/w/p/password-reset-django-10/ > > -Jeff > > On Dec 20, 12:01 pm, kev wrote: > > > Hello, > > I have the following entry in urls.py file: > > >         (r'^forgotpassword/$', passwor

urls.py password reset view.

2008-12-20 Thread kev
Hello, I have the following entry in urls.py file: (r'^forgotpassword/$', password_reset, { 'template_name': 'users/forgotpassword.html', 'email_template_name': 'users/forgotpassword_template.html' }), Whenever i try to load it, i get: Reverse for

re:FIND SOME GREAT DEALS ON GAMES,DVD,MUSIC

2008-04-27 Thread kev
hi guys check out> http://www.find-a-great-deal.blogspot.com http://www.find-a-deal.blogspot.com http://www.niceeasy-cash.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to t

generic object detail views with object_list included

2006-08-28 Thread kev~!
Hey all, I'm new and get lost easily, and I'm probably just unable to find the documentation on this, but I'm stuck. I'm using the generic views to create a list of objects in a module and then to show the details of any one of those objects. The problem that I have is that I want to have 'previo

iteration of object_list in generic detail view

2006-08-28 Thread kev~!
Ok, so I'm new and I'm having a problem with generic views and I can't seem to find any documentation on this. I have the detail_list view working as I want it, pulling everything in the database up and rendering it out as I want. When you go to view the detail of one object, tho, I can't seem to