-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
-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
efore 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:
-BEGI
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
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 wrote:
>
> Hey all,
>
> I am very new to Django and am having a bit of trouble with something
> and I'm hoping I can get some help fro
-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 PGP
thank 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
> wrote:
>> Tom,
>>
Tom,
make your line read:
results = Film.objects.filter(
Q(title__icontains=q) |
Q(director__name__icontains=q) |
Q(actors__name__icontains=q) |
Q(screenwriters__name__i
-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.
-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
-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?
>
> We
-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 to
-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 the
0% sure 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.c
t; 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
> wrote:
> No it doesn't. That would be your problem, you would have to write a
> custom backe
's own
> 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 INSTAL
defend 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?
&g
-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
-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
,
>
> Thanks 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
-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()" , i
-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 f
-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 templat
-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
-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 tha
mount of
> 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 pe
-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 jus
7;ll 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
-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:
>
t 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
> wrote:
> > I think they are the FamFamFam Icon pack.
> >
> > http:/
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 cam
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 datab
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 have d as a d
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,
> I run Django light web serve
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 any
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 becaus
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 combi
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, 20
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
>
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 by
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 = models.BooleanField
made a mistake in the c&p 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
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
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
> > mo
44 matches
Mail list logo