Hello,
I am sorry for asking a simple question.
(I read other answer bout iteration in several items in this user
group - they are too complicated for me. I have no time to study
Django deeper. )
I want to iterate over two lists simultaneously in form which is
simple (.html), do not described in m
Thanks
On Jan 7, 9:27 am, Chris Matthews wrote:
> {% for Ltarp in smth.3 %}
> SHOULD BE
> {% for Ltarp in smth.2 %}
> 'cos Lans only has 3 elements and Ltarp is Lans[2].
>
> Chris
>
> -Original Message-
> From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
>
On 2011-01-16, at 09:25 , gintare wrote:
> Hello,
>
> I am sorry for asking a simple question.
> (I read other answer bout iteration in several items in this user
> group - they are too complicated for me. I have no time to study
> Django deeper. )
> I want to iterate over two lists simultaneously
Hello,
is there such a thing as "compiled methods" in Django i.e. methods
whose return value is calculated only once and then stored? Or is
there a canonical Djangoish way to implement this?
An example:
Suppose we have phone objects that have a canonical form, such as
"alcatel a-341 i" and a par
On Sunday, January 16, 2011 9:24:49 AM UTC, Santiago Caracol wrote:
>
> Hello,
>
> is there such a thing as "compiled methods" in Django i.e. methods
> whose return value is calculated only once and then stored? Or is
> there a canonical Djangoish way to implement this?
>
> An example:
>
> Sup
Hi!
Suppose following model:
class UserEmail(models.Model):
"""User email"""
user = models.ForeignKey(User, db_index=True,
null=True, blank=True, editable=False)
"""User recieving the email"""
added = models.DateTimeField(_("added"), auto_now_add=Tru
Thank you very much! The term "memoize" was exactly what I was looking
for.
Santiago
--
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
*First of all did you try accessing the email subject with a dotted
notation?*
try
u = User.objects.all()
and
u[0].subject
On Sun, Jan 16, 2011 at 12:53 PM, Jari Pennanen wrote:
> Hi!
>
> Suppose following model:
>
> class UserEmail(models.Model):
>"""User email"""
>
>user = models.Forei
User != UserEmail
User does not have subject, thus it will raise AttributeError: 'User'
object has no attribute 'subject'
Secondly, I do not want to create 1+N queries (where N is number of
users), with creating a query per user this would be simple but very
inefficient.
On Jan 16, 12:16 pm, Pra
As masklinn says, zip: http://docs.python.org/library/functions.html#zip
Combine the two lists in python into one list of pairs (tuples).
change the render_to_response line to:
render_to_response(filter_obj.html', {'zipped': zip(obj1, obj2),
'q':query})
zip discards any elements that are left over
On 13/12/10 Michael P. Soulier said:
> Hi,
>
> We're enabling ipv6 on a server and finding that redirects in django are
> broken. The host portion is being truncated.
>
> Is this a known problem?
So I found the issue. Apache is passing a bad value for the
X_HTTP_FORWARDED_HOST variable. I've fi
Following is an extract of a Model I'm using. I'd like to be able to
query it to get a query set return that uses one of the Model
Definitions, e.g. get all the Hosts where "complete=True" where
'complete' is a model definition.
I know the nomenclature to use when exclude/include on a field in th
Hi,
On Jan 16, 1:04 pm, rmschne wrote:
> qs=DinnerHost.objects.filter(complete=True)
> and tried
> gs=DinnerHost.objects.filter(complete()=True
Try something along the lines of,
class DinnerHostManager(models.Manager):
def complete(self):
return self.filter(
sponsor=Tru
Thanks for reply Mike and TheRedRabbit, unfortunately I have never got
to try your suggestions. Before your response came in I tried
upgrading Lucid Lynx to Maverick Meerkat and lets just say it didn't
go well for me, I no longer have Linux installed on my laptop so am
back in Windows :(
to be con
Hallöchen!
David Walker writes:
> [...]
>
> and the the {% for %} becomes:
> {% for smth1, smth2 in zipped %}
On the other hand, as somebody having zip() in a dozen of
render_to_response calls, I can say that
{% for smth1, smth2 in list1, list2 %}
would be a nice thing to have. ;-)
Tschö,
To
Solved. Look at
http://stackoverflow.com/questions/4704924/django-signal-callback-function-missing-foreign-on-model
--
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
Here is my problem as using powerful raw,
User.objects.raw('SELECT usr.*, em.added as latest_email_added,
em.success as latest_email_success, em.subject as latest_email_subject
FROM auth_user AS usr LEFT JOIN dmusic_useremail as em ON em.user_id =
usr.id GROUP BY usr.id HAVING Max(em.added)')
Tha
Thanks. I'm still messing with this; but don't think it quite what I'm
looking for.
I want/need the Model Definition function complete() for use at the
record level. I did this as a function since the rules are not based
simply on the value of the fields.
Ideally, I'd like to have the class Dinn
Hello there,
I am new to django developement model. If someone know
1- how to access to the ModelForm fields instance in the view?
2- I am trying to developpe a website that contains many forms, is
there a way to make the same template (new and update) for a given
model.Models class
thanks,
--
It doesn't work that way. ORM translates you queries to SQL and the DB
is responsible for filtering. It is not possible to translate
arbitrary python function to SQL or pass it to DB engine. So you have
to formulate you query using .filter syntax or raw SQL.
Another possibility is to denormalize d
I posted my question in Stackoverflow because its easier to see the
code blocks.
Basically, I am having problems trying to get my polls template from
the Django tutorial working properly.
Please have a look. Thanks.
The link is here:
http://stackoverflow.com/questions/4705962/need-help-with-dja
Mikhail,
Thanks. I like that idea. Simple and understandable for those who
follow me.
On Jan 16, 2:51 pm, Mikhail Korobov wrote:
> It doesn't work that way. ORM translates you queries to SQL and the DB
> is responsible for filtering. It is not possible to translate
> arbitrary python function t
On Sun, Jan 16, 2011 at 10:00 AM, nai wrote:
> I posted my question in Stackoverflow because its easier to see the
> code blocks.
>
> Basically, I am having problems trying to get my polls template from
> the Django tutorial working properly.
>
> Please have a look. Thanks.
>
> The link is here:
On 2011-01-16, at 14:42 , Torsten Bronger wrote:
> Hallöchen!
>
> David Walker writes:
>
>> [...]
>>
>> and the the {% for %} becomes:
>> {% for smth1, smth2 in zipped %}
>
> On the other hand, as somebody having zip() in a dozen of
> render_to_response calls, I can say that
>
> {% for smth1,
Hallöchen!
Masklinn writes:
> On 2011-01-16, at 14:42 , Torsten Bronger wrote:
>
>> [...]
>>
>> On the other hand, as somebody having zip() in a dozen of
>> render_to_response calls, I can say that
>>
>> {% for smth1, smth2 in list1, list2 %}
>>
>> would be a nice thing to have. ;-)
>
> Why d
Unfortunately, no, I could not find a fix for it.
I still suspect some kind of version conflict in the MySQL drivers,
but it's strange, because I even tried creating a new test app, and
django created the database and all the tables just fine. It's only
the admin login that seems to break it.
But
Thanks Shawn, this is very helpful. It's good to hear Orbited is being
actively developed again.
I'm not already using RabbitMQ for anything, so I'm going to take the
opposite approach: start out doing some test projects with Hookbox, and then
try porting them to Orbited. I'm completely new to C
Hello,
I am using (only) django admin to insert data and have:
class ImageSize(models.Model):
...
class Image(models.Model):
size = models.ManyToManyField(ImageSize)
...
I need to save original image that have been uploaded (this is ok) and
then make resized copies depending on s
try:
gs=DinnerHost.objects.all().filter(complete()=True
objects by default doesn't select anything, so either use
objects.get(pk=var_pk) or the a-typical case all().
-Matteius
On Jan 16, 7:04 am, rmschne wrote:
> Following is an extract of a Model I'm using. I'd like to be able to
> query it
Truong,
Have you downloaded the facebook SDK[1] yet?
- Ryan
1. https://github.com/facebook/python-sdk/
On Mon, Jan 10, 2011 at 09:10:14AM -0800, trương thế linh wrote:
> Hi every body,
> I'm a newbie to django.
> please suggest me an app to intergrate with django to do allow me to
> post messag
I'm building a web app with django. It uses postgresql. The app code
is getting really messy and I'd like to improve it(my begginer skills
being a big factor too).
This is an excerpt of my models.py file:
REPEATS_CHOICES = (
(NEVER, 'Never'),
(DAILY, 'Daily'),
(WEEKLY, 'Weekly'),
You guys are the best!! Thanks
On Dec 12 2010, 10:28 pm, Brad Reardon wrote:
> Another tip is to add *.py to the PATHEXT variable or the like. That will
> allow the script to be found on the path. I'm not sure if that's the right
> variable name, but check it out.
>
> On Dec 12, 2010, at 10:13
> -I didn't know about the PickleField. I'm now reading about it, maybe
> I could use it to store all the transaction's datetime objects.
I'm using PickleField for precomputing some values, that I'd like to
keep normalized as well. Found no problems with this approach so far.
You can implement re-
We’re looking for an engineer to join our tech team (5 developers plus
designer) and help turn our alpha into an awesome beta. Compensation
will include a meaningful equity stake with salary to follow.
About us:
Located in San Francisco, Let’s Do This is an app that’s like a real
time meetup.com w
On Mon, Jan 17, 2011 at 8:08 AM, Jon Blackwell
wrote:
> This isn’t a black hole for resumes; if you are located in the Bay
> Area we guarantee a real human response within 48 hours….promise!
Since we're getting into disclaimers and disclosure -
django-developers isn't really a good place for resu
On Mon, Jan 17, 2011 at 8:46 AM, Russell Keith-Magee
wrote:
> On Mon, Jan 17, 2011 at 8:08 AM, Jon Blackwell
> wrote:
>> This isn’t a black hole for resumes; if you are located in the Bay
>> Area we guarantee a real human response within 48 hours….promise!
>
> Since we're getting into disclaimers
Ah, got it. Thanks so much!
2011/1/14 Rubén Dugo Martín
> You get the template but you don't render it.
>
> 2011/1/14 Fletcher Haynes
>
>> Hi everyone,
>>
>> I'm trying to work on a project in Django, but I'm encountering some odd
>> behavior. I have this in base.html in my template directory:
Hello,
I'm having some trouble getting jQuery UI to work. It doesn't seem to be
finding the CSS static file...here is my base.html and the page that
inherits from it. It does find my style.css file fine, which is my
non-jQuery stylesheet.
http://dpaste.com/324572/
I'd appreciate any help.
--
Yo
I am using a jquery project for forms that someone else created to
give myself a jump start on what Im trying to do. Unfortunately, I
can't get any other plugins to work that I download. No other jquery
plugins seem to work and Im pretty sure I have the directory paths
right and everything. I ha
Hi Tony,
On Mon, Jan 17, 2011 at 8:57 AM, Tony wrote:
> Unfortunately, I can't get any other plugins to work that I download. No
> other jquery
> plugins seem to work and Im pretty sure I have the directory paths
> right and everything.
Very lame, How would someone know why something dint w
On Sun, Jan 16, 2011 at 04:23, David Walker wrote:
> Despite reading round and round in circles in the documentation, I am
> completely baffled about localisation and how it works. I am not
> trying to do any translation yet, but want to code money and date
> formats right so that I don't have to
Hi Justin,
There are over 60 urls.py in my app and I'm running through each one
by one. Wish the stack trace had something from within the app. Thanks
for the help anyway. Will let you know if I manage to find the bad
file.
Regards,
Vamsy
On Jan 13, 5:07 pm, Justin Murphy wrote:
> Hi vamsy,
> C
Fletcher,
Hope you have copied all the files that JQueryUI requires, when am
using JQueryUI, this how my directory structure looks like,
-MyProject
- media
- css
- images
- js
- themes ( specific to JQueryUI )
- ui ( specific to JQueryUI )
- template
Prashanth,
This has to do with django because they work outside of django.
On Mon, Jan 17, 2011 at 6:12 AM, Prashanth wrote:
> Hi Tony,
>
> On Mon, Jan 17, 2011 at 8:57 AM, Tony wrote:
>
>> Unfortunately, I can't get any other plugins to work that I download. No
>> other jquery
>> plugins see
I was able to find two such recursive instances and things work fine
after removing them :)
On Jan 17, 10:12 am, vamsy krishna wrote:
> Hi Justin,
>
> There are over 60 urls.py in my app and I'm running through each one
> by one. Wish the stack trace had something from within the app. Thanks
> fo
On Sun, Jan 16, 2011 at 6:51 AM, Mikhail Korobov wrote:
> It doesn't work that way. ORM translates you queries to SQL and the DB
> is responsible for filtering. It is not possible to translate
> arbitrary python function to SQL or pass it to DB engine. So you have
> to formulate you query using .f
46 matches
Mail list logo