Re: connectiong querysets

2009-08-11 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 http://docs.djangoproject.com/en/dev/topics/db/queries/#complex-lookups-with-q-objects Luke Seelenbinder luke.seelenbin...@gmail.com http://www.google.com/profiles/luke.seelenbinder On Tue, Aug 11, 2009 at 9:38 AM, elminio wrote: -BEGIN PGP

Re: Django comments honeypot hide

2009-08-10 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 xhtml: html: Luke Seelenbinder luke.seelenbin...@gmail.com http://www.google.com/profiles/luke.seelenbinder -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkqAgj8ACgkQXQrGVCncjPz8FACffs+kJ757sMZIB2MEiuLX7V9P LIQAnj

Re: Javascript with built-in templates tags

2009-08-08 Thread Luke Seelenbinder
you post here, it wastes our time, and yours waiting for a response. Thanks! We are more than happy to help, just please check the documentation first. ;) Hope that works for you. Luke Seelenbinder luke.seelenbin...@gmail.com On Sat, Aug 8, 2009 at 5:32 PM, WilsonOfCanada wrote: -BEGIN PGP

Re: using python libraries in django?

2009-08-08 Thread Luke Seelenbinder
Django follows normal python import rules. So just lookup those to know what Django can use and how it needs to be setup. -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Luke Seelenbinder luke.seelenbin...@gmail.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkp

Re: How to get rid of the 'u'? Seems to be everyhere :)

2009-08-08 Thread Luke Seelenbinder
anything with Django, it helped a lot. Hope it helps, Luke Seelenbinder luke.seelenbin...@gmail.com On Sat, Aug 8, 2009 at 10:03 PM, strotos<da...@strotos.com> wrote: > > Hey all, > > I am very new to Django and am having a bit of trouble with something > and I'm hoping I c

Re: Javascript with built-in templates tags

2009-08-08 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I think your problem is just the spaces between the filters, try {{ mooman|safe|escapejs }}. Other then that, as long as the mooman is set in the context... that should work. Luke On Sat, Aug 8, 2009 at 12:34 PM, WilsonOfCanada wrote: -BEGIN

Re: Duplicate results using ORd Q queries

2009-08-08 Thread Luke Seelenbinder
you so much!  Just out of interest, do you > know why the query was returning dupes in the first place, and why my > while loop was not removing them? > > Thanks again, > > Tom > > On Aug 8, 2:51 pm, Luke Seelenbinder <luke.seelenbin...@gmail.com> > wrote:

Re: Duplicate results using ORd Q queries

2009-08-08 Thread Luke Seelenbinder
Tom, make your line read: results = Film.objects.filter( Q(title__icontains=q) | Q(director__name__icontains=q) | Q(actors__name__icontains=q) |

Re: Javascript with built-in templates tags

2009-08-07 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Wilson, Are you referring to rendering JS with template tags, or actual template tags in JS? In the first case, you use them like any other template tag. The second case is only possible if there is some JS library that uses Django-like templates.

Re: ValueError

2009-08-06 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Could we have the full traceback? That really isn't enough information to determine your problem. Regards, Luke luke.seelenbin...@gmail.com rekha wrote: > Hi, im getting ValueError when try to redirect to an html page.. also > the validation code

Re: multiple projects shared database

2009-08-05 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 There is no problem with that, as long as your code accounts for it. Luke luke.seelenbin...@gmail.com Robin Becker wrote: > My boss wants to have two different django controlled websites with a common > database. Is there a way to do this? > >

Re: Counting results

2009-08-05 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I believe QuerySets have a .count() method. Luke luke.seelenbin...@gmail.com When ideas fail wrote: > Hi, I was wondering what is the simpliest way to count the number of > objects returned in a QuerySet? > > Basically i have a blog and i want

Re: Template links when Django not domain root

2009-08-01 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Check out RequestContext and setting it up with the setting in settings.py: http://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors Luke luke.seelenbin...@gmail.com "I [may] disapprove of what you say, but I will defend to

Re: Amazon Product Advertising API

2009-08-01 Thread Luke Seelenbinder
it works, but for what I've used it for I think it does. Any testing is 100% appreciated. Luke Seelenbinder luke.seelenbin...@gmail.com "I [may] disapprove of what you say, but I will defend to the death your right to say it." -- Voltaire br...@instantdirectmarketing.com wrote: &

Re: Log in problem

2009-07-31 Thread Luke Seelenbinder
; login form > > {% else %} > > you are already logged in > > I don't know if that would work or not though. > > On 1 Aug, 01:30, Luke Seelenbinder <luke.seelenbin...@gmail.com> > wrote: > No it doesn't. That would be your problem, you would have to write a >

Re: Do I need django.contrib.auth in my INSTALLED_APP when if I don't use the models from there?

2009-07-31 Thread Luke Seelenbinder
n > username/password in the settings file. And this project doesn't use the > admin or any of the models in django.contrib.auth (besides returning > User from the authenticate method in the backend). > > So I guess I don't need django.contrib.auth in INSTALLED_APPS

Re: Log in problem

2009-07-31 Thread Luke Seelenbinder
efend to the death your right to say it." -- Voltaire When ideas fail wrote: > I'm using (r'^login/$', 'django.contrib.auth.views.login', > {'template_name': 'blogSite/login.html'}), for the view, so does that > pass a request of not? > > On 1 Aug, 01:09, Luke Seelenbinder <

Re: Do I need django.contrib.auth in my INSTALLED_APP when if I don't use the models from there?

2009-07-31 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Vasil, That will vary on what the apps you are using. If none of the apps depend on django.contrib.auth, you won't need it, unless you want to use the django admin (which depends on django.contrib.auth). To fully answer your question, we would need

Re: Log in problem

2009-07-31 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Are you passing the "request" to it? That's the only thing I can think of that would mess it up, otherwise it looks good syntactically. Luke luke.seelenbin...@gmail.com "I [may] disapprove of what you say, but I will defend to the death your right

Re: Django 1.1 returns 500 instead of 404 in non-debug mode

2009-07-30 Thread Luke Seelenbinder
anks for your email. The particular source is already fine with > no /. I also tried adding slash assuming you swapped the particular > line in your email. > > Can you give another shot and let me know if you can spot something? > > Regards, > Prabhu > > On Jul

Re: how encrypt datetime.now with python?

2009-07-30 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 convert it to a string: str(datetime.now()) Luke luke.seelenbin...@gmail.com "I [may] disapprove of what you say, but I will defend to the death your right to say it." -- Voltaire Asinox wrote: > hi guys, i want to encrypt the "datetime.now()" ,

Re: Django 1.1 returns 500 instead of 404 in non-debug mode

2009-07-30 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, I think I located your problem. In file invoicy / guidy / urls.py You should change the first url pattern to read: url(r'^/$', 'guidy_default', name='guidy-default'), instead of: url(r'^$', 'guidy_default', name='guidy-default'), That should

Re: dictionaries in template

2009-07-30 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 You are overwriting the 'answer' key every time. So there is only one key called 'answer'. Try editing it so you make the 'answer' key a list of the 'attach_list's, that is one possible solution. Or possibly do you mean to use if loops in the

Re: [solved]Re: test if GET is "empty"

2009-07-29 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 There is a more "pythonic" way to test, use request.GET.get(, False) e.g.: if request.GET.get('q', False): etc. That tests the dict for the key 'q' if it's not there, it returns false. Luke Seelenbinder luke.seelenbin...@gmail.com

Re: No such Table Error

2009-07-28 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Did you run manage.py syncdb in your project folder? And are the apps in your settings.py? Luke Seelenbinder marcoshernandez wrote: > Im having this error in my application (both admin models and my app > models) I'm almost certain th

Re: IDE for Django and Ext JS

2009-07-28 Thread Luke Seelenbinder
errors one (=me) does... > > Luke Seelenbinder wrote: > I personally use Eclipse w/ PyDEV and web dev tools. I absolutely love > it. I tried netbeans a while ago, and didn't see an advantage to switch > to it. > > That being said, IDEs are really a matter of personal preference, I

Re: IDE for Django and Ext JS

2009-07-28 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I personally use Eclipse w/ PyDEV and web dev tools. I absolutely love it. I tried netbeans a while ago, and didn't see an advantage to switch to it. That being said, IDEs are really a matter of personal preference, I know of a lot of people that

Re: Where are the admin app icons from?

2009-07-27 Thread Luke Seelenbinder
be used. Not enough pixels in such a small > image to scale properly." > > Between the famfam stuff and various other random "finds" on the web, > I think I can get by. Thanks for the pointers to that other grey > scale library as well. I can see that being useful in the future.

Re: Trying to reference a foreignKey in a modelAdmin class

2009-07-27 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 What error exactly is it throwing? I noticed this: is it supposed to be: list_filter('Competition.startDate', 'Division')? Hope that helps. We really need the error it is throwing to more accurately diagnose and repair. Luke S. irishsteve wrote:

Re: Where are the admin app icons from?

2009-07-27 Thread Luke Seelenbinder
the "minis" in that set as well, but they were *too* small! > > Arrgh!  It ain't easy designing a web app with no graphic design > skills! > > Margie > > On Jul 27, 11:11 am, Luke Seelenbinder <luke.seelenbin...@gmail.com> > wrote: > > I think they are the

Re: Where are the admin app icons from?

2009-07-27 Thread Luke Seelenbinder
I think they are the FamFamFam Icon pack. http://www.famfamfam.com/ Luke S. On 07/27/2009 02:10 PM, Margie wrote: Yeah ... I know where the icons used in the admin app are. And I'm using them in my own app (which is derived from the admin app). So I was just trying to figure out if they

Re: Application level data

2009-07-27 Thread Luke Seelenbinder
Look at the official caching documentation: Low-level API (for individual data pieces) http://docs.djangoproject.com/en/dev/topics/cache/#the-low-level-cache-api That should work for you Luke S. On 07/27/2009 12:21 PM, vishy wrote: > Hi, > > I have some data which I don't want to get from

Re: Using Django's Cache

2009-07-20 Thread Luke Seelenbinder
That is entirely possible; however, it might slow down the rendering of the template, because you simply have more to handle. Luke On Jul 20, 12:49 pm, WilsonOfCanada wrote: > Well then I will have to try a different approach.  When using > render_to_response('webpage.html', d), I

Re: How redirect lightweight webserver messages?

2009-07-17 Thread Luke Seelenbinder
That would depend on the OS you use. If you use linux: "python manage.py runserver >> example.log" That will save the output in a file, instead of showing it on screen, allowing you to have another webserver serve it. Luke On Jul 17, 6:38 am, Andrew wrote: > Hi,

Amazon Product Advertising API

2009-07-17 Thread Luke Seelenbinder
I'm working on a django project right now that uses the Amazon Product Advertising API. I was using pyaws, but it is quite outdated and won't be useful for the changes coming in the next month. My first question is whether you know of any other python library for it. Second question, is there

order_by function

2008-11-21 Thread Luke Seelenbinder
Can I order_by a function within the model? I know you can list them in the admin inteface, etc. But can you order_by a model function? Or would you have to write a custom piece of code to do that? Thanks, Luke --~--~-~--~~~---~--~~ You received this message

Combine QuerySets from two different child models

2008-11-19 Thread Luke Seelenbinder
the models are: class Word(models.Model): ... some stuff... class Meta: abstract=True class Noun(Word): .. some stuff .. class Verb(Word): ... some stuff ... code: nouns= Noun.objects.all() verbs=Verb.objects.all() words = verbs | nouns I get an error saying: "Cannot

Re: ManyToManyField with multiple model options

2008-11-15 Thread Luke Seelenbinder
That was a typo. The error I'm getting is "ForeignKey cannot define a relation with abstract class Word" It is a ManyToMany through table, that's the reason it is ForeignKey Luke On Nov 15, 8:29 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sat, 2008-11-15 a

Re: Css and Images are missing

2008-11-15 Thread Luke Seelenbinder
Django doesn't serve the media files, look at http://docs.djangoproject.com/en/dev/howto/static-files/?from=olddocs Luke On Nov 15, 10:49 am, Luis Goncalves <[EMAIL PROTECTED]> wrote: > Hello guys I need your help in here. > > Sorry I am new in Django and I am having a problem, my css and jpgs

Re: Bug in Admin or in my model ?

2008-11-15 Thread Luke Seelenbinder
You need to specify your encoding in your models file. Like: # -*- coding: iso-8859-15 -*- Look at http:// evanjones.ca/python-utf8.html The sixth section of the page explains. Regards Luke On Nov 15, 11:09 am, Ivan Mincik <[EMAIL PROTECTED]> wrote: > Hi, > I have a problem when adding record

ManyToManyField with multiple model options

2008-11-15 Thread Luke Seelenbinder
Basically, I want to allow a ManyToManyField to use any of a Model's children, like this: class Word(models.Model): word = models.CharField(...) class Meta: abstract = True class Noun(Word): gender = models.CharField(...) class Verb(Word): irregular =

Re: Foreign Key with a default key

2008-11-13 Thread Luke Seelenbinder
made a mistake in the c the line: definition = models.CharField(max_length='100', default=Stat()) should be: definition = models.CharField(max_length='100',) On Nov 13, 6:35 pm, Luke Seelenbinder <[EMAIL PROTECTED]> wrote: > I'm am trying to make a F

Foreign Key with a default key

2008-11-13 Thread Luke Seelenbinder
I'm am trying to make a ForeignKey with a default value. But when I save i get a "invalid literal for int() with base 10: 'Stat object'" error Here is my code: from django.db import models class Stat(models.Model): total = models.IntegerField(default=0) right

Re: Create field from two others

2008-07-04 Thread Luke Seelenbinder
Thanks, for the reply I have since defined a function to handle this. On Thu, Jul 3, 2008 at 11:35 PM, James Bennett <[EMAIL PROTECTED]> wrote: > > On Thu, Jul 3, 2008 at 8:59 PM, lukeqsee <[EMAIL PROTECTED]> wrote: > > > > Can you take a first_name & a last_name field and then in the same > >