Hello,
I have an old version of django here where the F() object is not
available (0.96).
Is there a chance to reference a field on the same model without using
using F()?
I'd like to write:
hw=Hardware.objects.filter(he=F('rack__he'))
... but there is no F() in this version.
Any ideas?
Rega
Yes, that was the problem..It installed properly now..
On Wed, Apr 13, 2011 at 5:32 AM, werefr0g wrote:
> Are you using python 3?
>
> --
> 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
In writing a complex filter for an application, I've found a different
behavior between a filter like:
Model.objects.exclude(filter1, filter2)
and one like:
Model.objects.exclude(Q(filter1), Q(filter2))
where filter1 and filter2 are both field lookups on related models; in
particular only the sec
Django's auth module will do just fine.
You can store other information, such as 'date_password_modified' in a
model (UserProfile perhaps) which has a one-to-one correspondence with
User. Then you need to override the login view to check the validity
of the password based on this field. Now to det
Dear darekodz,
I noticed this myself a while back; It was'nt django specific, and I dont
know about IE, I generally try to avoid using that; But in case of Chrome,
whenever it encounters a 404 error (or certain other conditions) it seems to
decide the visitor is better off being served a generic g
Could you include the output to highlight the differences?
Brian
On Wed, Apr 13, 2011 at 9:32 AM, Gianluca Sforna wrote:
> In writing a complex filter for an application, I've found a different
> behavior between a filter like:
> Model.objects.exclude(filter1, filter2)
>
> and one like:
> Model
I am just starting out with Django and would love to find a tutorial that is
great for learning but also teaches the many aspects of the framework. I
have a few books but they seem to go off on one direction or another and
skip the basics to really get you up and running. I would like to build a
so
You could possibly resort to the extra() queryset method, allthough it eats
raw sql, its documented in the manual. Im not sure if its in 0.96 though.
--
Regards, Yuka
On Wed, Apr 13, 2011 at 3:09 PM, Roman Klesel
wrote:
> Hello,
>
> I have an old version of django here where the F() object is n
Try James Bennett's book, "Practical Django Projects."
It walks you step-by-step through creating full apps.
Shawn
--
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@googlegroups.com.
To unsubscri
Hello Yuka,
2011/4/13 Yuka Poppe :
> You could possibly resort to the extra() queryset method, allthough it eats
> raw sql, its documented in the manual. Im not sure if its in 0.96 though.
Yes, thanks!
I think I found a solution:
hw=Hardware.objects\
.filter(rack__he__isnull
On Wed, Apr 13, 2011 at 09:19:31AM -0400, Nick Hird wrote:
> I am just starting out with Django and would love to find a tutorial that is
> great for learning but also teaches the many aspects of the framework. I
> have a few books but they seem to go off on one direction or another and
> skip the
You could refactor the C code into a library, then call it from
Django.
There are several ways to interface with a C library in Python, but
you might want to look at ctypes:
http://docs.python.org/library/ctypes.html
It means you don't have to write extra C code just to do the
interfacing.
On
Also http://docs.djangoproject.com/en/1.3/topics/ is another place to look
for more focused topics that aren't covered in detail in the tutorials. I
found the documentation and tutorials that I find through
searching Google to be more than sufficient for learning and figuring my way
around djan
Beware of non-printable characters when copy-pasting the password ;)
More seriously: this is the only reason I can think of that would
explain your problem :-/
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
On 12 April 2011 22:09, JustinMarsan wrote:
> Hello,
>
> What would be the best way to allow some bots to POST some content to
> a website. Without crsf_token, the bot will get a 403, and I would
> prefer not to remove this behavior but rather find a way to make the
> bot send a token. How could I
Yes I think "Practical Django Projects" is very good for newbie, after
reading that i
start my own job using Django to setup a CMS.
On Wed, Apr 13, 2011 at 9:55 PM, Shawn Milochik wrote:
> Try James Bennett's book, "Practical Django Projects."
>
> It walks you step-by-step through creating full
What problems did you encounter? It's easier to help you knowing what went
wrong.
mjl
--
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@googlegroups.com.
To unsubscribe from this group,
What problems did you encounter? It's easier to help you knowing what went
wrong.
mjl
--
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@googlegroups.com.
To unsubscribe from this group,
On Wed, Apr 13, 2011 at 6:41 AM, Yuka Poppe wrote:
> I noticed this myself a while back; It was'nt django specific, and I dont
> know about IE, I generally try to avoid using that; But in case of Chrome,
> whenever it encounters a 404 error (or certain other conditions) it seems to
> decide the vi
> I believe that the cutoff is 512 bytes, but you may want to test in
> different browsers to be sure.
I suspected as much but wasnt quite sure, it didn't matter as much at the
time I had to deal with it, and the problem went away by itself. None the
less its nice to have this information floating
Thanks, I think that might be what I was looking for.
On Apr 13, 7:10 am, lilspikey wrote:
> You could refactor the C code into a library, then call it from
> Django.
>
> There are several ways to interface with a C library in Python, but
> you might want to look at ctypes:
>
> http://docs.pyth
That's essentially what google does.
I would suggest dealing with the Python~C integration/test as a command
line execution and when that works, learn to call the python wrapper
from django.
It's been 15 years since I actually did any of this, but it is pretty
straight forward with SWIG. There a
In my case I had to read some legacy data from a different schema on the
same MySQL server and it was easy (but perhaps not elegant) to just
establish a separate connection using MySQLdb module.
-Original Message-
From: django-users@googlegroups.com
[mailto:django-users@googlegroups.com] O
On Wed, Apr 13, 2011 at 1:38 PM, Sells, Fred
wrote:
> In my case I had to read some legacy data from a different schema on the
> same MySQL server and it was easy (but perhaps not elegant) to just
> establish a separate connection using MySQLdb module.
You shouldn't have to do that. Use this:
Xcellent improvement; that's (my code) what happens when you're too busy
fixing the problem to learn the tool ;)
From: django-users@googlegroups.com
[mailto:django-users@googlegroups.com] On Behalf Of Nick Arnett
Sent: Wednesday, April 13, 2011 4:44 PM
To: django-users@googlegroups.com
Subject:
There's no way you can check if the password is correct by querying
the db.
What you can do is try changing the pass thru user.set_password('some-
pass') and see if the login will work.
--
Gladys
http://blog.bixly.com
On Apr 13, 10:44 pm, bruno desthuilliers
wrote:
> Beware of non-printable ch
If you're running the "testserver" it's not using the database, you'll want
to try "runserver" instead.
--
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@googlegroups.com.
To unsubscribe from this
Hi,
A short description to wet your appetite: DSE is simplified "bulk"
insert/update for django, created for one simple reason - to insert or
update lots of data as fast as possible ( and still be developer and
django friendly ).
I`ve just released the first ( and hopefully only ) release candidat
Thanks for your help.
I went with 2 views, 1 for the image and 1 for the html.
On Apr 12, 2:06 pm, Sam Walters wrote:
> I mis-read this... basically you have one view and in the template you
> are rendering you put HTML:
>
>
>
>
> so that path will call your other views which return content as
On Apr 12, 6:47 am, Harish Tejwani wrote:
> What would be the best module or app that can support
>
> a) User's Password expiring every 6 months, so they are forced to
> change it
Although Django supports it, I would STRONGLY discourage you from
implementing such a policy. Password expiration
Il giorno 12/apr/2011, alle ore 04.05, Lei Zhang ha scritto:
> the static file is returned by nginx, and it is works well.
> But the file returned by dynamic pages does't works very well.
You have a pretty standard configuration.
Check the uWSGI logs (they report the response size) to see wher
On Friday 08 of April 2011 13:37:53 Casey Greene wrote:
> Can you change the request type from POST to GET? It sounds like this
> is not a database modifying operation.
>
> Casey
Yes, I could but the generated Dajaxice script doesn't give me the option to
use
a GET request. Perhaps I should jus
Are you using python 3?
--
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@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more option
Gnowsis.com, a Vienna-based hightech startup, are looking for a full-
time or part-time Django/Python User Interface Developer (f/m) to
extend their team in Vienna. You will work on an appealing user
interface for http://www.getrefinder.com.
Ideally you have the following technical skills:
+ Pyt
Are You aware of Django’s comments framework?
http://docs.djangoproject.com/en/dev/ref/contrib/comments/
--
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@googlegroups.com.
To unsubscribe from this
I am kind of aware of that. I just want to add a Stackoverflow kind of a
commenting system (with comments on answers and voting on answers) to my
already present application.
Does anyone know if Django's own comment app can be enhanced to be that or
has anyone already done that?
On Wed, Apr 13,
I've very strange error in part 3. I want to test using function
get_object_or_404. I've 3 polls, so in that adress:
http://localhost:8000/polls/1/
http://localhost:8000/polls/2/
http://localhost:8000/polls/3/
everything is OK.
In that adress:
http://localhost:8000/polls/4/
Should be exeptions 404.
37 matches
Mail list logo