On Aug 12, 10:00 pm, Paulo Almeida
wrote:
> Can you sequentially add the states for each foo? I'm thinking of something
> like:
>
> states = []
> for foo in foos:
> foo_state = State.objects.filter(foo=foo, first_dt__lte=dt,
> last_dt__gte=dt)
> if foo_state:
> states.append(foo_st
I see. What about Alec Shaner's suggestion? If you replace 'order_by' with
'latest' it will be similar to my suggestion with just two queries.
- Paulo
On Fri, Aug 13, 2010 at 8:28 AM, Emily Rodgers wrote:
> On Aug 12, 10:00 pm, Paulo Almeida
> wrote:
> > Can you sequentially add the states for
On Aug 12, 8:26 pm, Alec Shaner wrote:
> Hopefully some django sql guru will give you a better answer, but I'll take
> a stab at it.
>
> What you describe does sound pretty tricky. Is this something that has to be
> done in a single query statement?
It doesn't have to be, but I would like to try
Hi
I have seen a lots of example to pick the data from simple xml for example
Empire Burlesque
Bob Dylan
USA
Columbia
10.90
1985
to convert it into a table following xsl works
But what
Google "install sqlite/mysql $your_operating_system"
If you provide more info (result of running yolk and your operating
system) we will be able to help you a bit more.
zalun
On 10-08-13 03:15, Tom wrote:
It's my first time using Django& I'm unable to get the demo going. I
would like to use
Hmm, I can't fathom it.
I would opt for a single simple query that returns a little more than you
need and post-process it in python. This would be more maintainable than a
hairy ORM query, I'd say; but if you have vast numbers of results that may
not be appropriate.
Alternatively, and presuming
On Aug 12, 4:53 pm, Tony wrote:
> This is more of a python question but its in my Django project. I am
> reading a unicode object and an integer from a database into a
> dictionnary and storing that in a pickled file. Ive confirmed the
> dictionary is done correctly because i print it out from t
On Aug 13, 9:51 am, Steven Davidson
wrote:
> Hmm, I can't fathom it.
>
> I would opt for a single simple query that returns a little more than you
> need and post-process it in python. This would be more maintainable than a
> hairy ORM query, I'd say; but if you have vast numbers of results that
>
> It would have to be another datetime field rather than an is_current flag
> because an is_current flag wouldn't help me for queries in the past (if that
> makes sense).
Ah yes, of course, I had not fully grasped that bit. A nullable foreign key
reference to the State that supersedes it might
Hi,
are you trying to do that using django or this group had been choosed
at random? :-)
I suggest looking for 'xpath'.
hint: /[...@attr="val"]
best regards,
On Fri, Aug 13, 2010 at 8:36 AM, Rahul wrote:
>
> Hi
> I have seen a lots of example to pick the data from simple xml for example
>
>
Hello!
I am new to django and i want to ask if i can find a form developer
with drag and drop support for widgets and validations, database
binding fields, etc (like a desktop application).
i look at some solutions for django like formunculous but i want
something more complex.
thanks a lot
--
On Fri, Aug 13, 2010 at 02:19:11AM -0700, Laurentiu wrote:
> I am new to django and i want to ask if i can find a form developer
> with drag and drop support for widgets and validations, database
> binding fields, etc (like a desktop application).
>
> i look at some solutions for django like formu
Hi
I have a requirement that I imagine can't be too unique, however I am
unable to find examples online of how to achieve what I'm trying to
do.
In simple terms, I need a setup where each one of my user's data is
stored in their own database. (We're using mysql).
I have a master database that st
I started playing around with Django sometime early 2009, did the
tutorial and got started on a toy project. Then something came inbetween
and now, coming back to my toy project I notice that the unit test spit
out a lot of errors relating to the migration tool South. I've haven't
written any test
On Aug 13, 11:18 am, Steven Davidson
wrote:
> > It would have to be another datetime field rather than an is_current flag
> > because an is_current flag wouldn't help me for queries in the past (if that
> > makes sense).
>
> Ah yes, of course, I had not fully grasped that bit. A nullable foreign
On Aug 13, 2:43 pm, Oivvio Polite wrote:
> So I guess these errors are relating to some testing Django and/or
> South does per default and that the errors might be due to some version
> incompatibility between the Django/South versions I had installed last
> year and the ones that are installed no
Your answer is on this blog post:
http://tidbids.posterous.com/saas-with-django-and-postgresql
Good luck
On Aug 13, 2:19 pm, Jonathan Endersby wrote:
> Hi
>
> I have a requirement that I imagine can't be too unique, however I am
> unable to find examples online of how to achieve what I'm tryi
Hi,
I'd second that. PIP and virtual env have worked well for me too. You
could also combine it with fabric in order to automate the building of
different environments, so once you get a stable working environment
you can use pip's 'freeze' command to create a requirements file with
the exact vers
Hi
Is it possible to give a javascript function a django variable as a
parameter?
thank you
--
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, send
Yes
myJavaScriptFunction( {{DjangoTemplateVariable}} );
function myJavaScriptFunction( pValue ) {
...
}
Tim.
> Hi
> Is it possible to give a javascript function a django variable as a
> parameter?
> thank you
>
> --
> You received this message because you are subscribed to the Google Groups
>
Hi,
Why not?
onclick="javascript:alert('{{param}}');"
?
best regards,
On Fri, Aug 13, 2010 at 4:31 PM, Imad Elharoussi
wrote:
> Hi
> Is it possible to give a javascript function a django variable as a
> parameter?
> thank you
>
> --
> You received this message because you are subscribed to th
Hi,
I develop on Linux and all my code is in $HOME and the code
of django and third party apps are in $HOME, too.
The Django SVN branch
http://code.djangoproject.com/svn/django/branches/releases/1.2.X/
is checked out to _django1.2.X. And there is a symlink from $HOME/django to
_djangoVERSION.
T
I mean can we make operations to the DjangoTemplateVariable in the
javascript function
for example:
function myJavaScriptFunction( pValue ) {
{{pValue.getName}}
...
}
2010/8/13 Tim Sawyer
> Yes
>
> myJavaScriptFunction( {{DjangoTemplateVariable}} );
>
> function myJavaScriptFunction( pValue
Hi,
I have a m2m like this:
class TrackCategory(Model):
class Track(Model):
category = models.ManyToManyField(TrackCategory)
I want to avoid that users delete a TrackCategory which contains Tracks, the
best would be to allow deletion of the TrackCategory if and only the linked
Tracks b
Hi, as far as i'm aware, the delete method on models only get's called
if you delete an instance of that modal directly. So if you delete a
modal who has many children, the child delete methods don't get
called. So I suppose the next question would be are you deleting
TrackCategory's directly or ar
2010/8/13 cootetom
> Hi, as far as i'm aware, the delete method on models only get's called
> if you delete an instance of that modal directly. So if you delete a
> modal who has many children, the child delete methods don't get
> called. So I suppose the next question would be are you deleting
>
On Aug 13, 3:50 pm, Imad Elharoussi wrote:
> I mean can we make operations to the DjangoTemplateVariable in the
> javascript function
> for example:
> function myJavaScriptFunction( pValue ) {
>
> {{pValue.getName}}
> ...
>
> }
>
No. How would that be possible? The template is rendered on the
Hi,
I was wondering if anybody has a location for the sample code download
for the book/author/publish application in the Django book.
I'm getting hung up on making forms and updating multiple tables
(foreign keys) in a database. It seems like there's a lot of
tutorials out there that will cover
On Aug 12, 9:22 am, aa56280 wrote:
> I'm using the url tag like so: {% url app.views.blah var1, var2 %}
>
> var1 and var2 need to be encoded, using the iriencode filter, so I
> tried this: {% url app.views.blah var1|iriencode, var2|iriencode %}
>
> That doesn't do anything though. I can't find any
of course ,you can,but you should add ",
function myJavaScriptFunction( pValue ) {
var aa= “{{pValue.getName}}”;
...
}
2010/8/13 Imad Elharoussi
> I mean can we make operations to the DjangoTemplateVariable in the
> javascript function
> for example:
> function myJavaScriptFunction( pValue )
i'm sorry,but i don't understand the question.
the model is only an example. My idea is a model like this:
--
class Format(models.Model):
code = models.CharField(max_length=10)
name = models.CharField(max_length=30
the idea isn't depend of javascript.
--
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, send email to
django-users+unsubscr...@googlegroups.com.
Fo
I got hit by this same bug and here's the workaround I used, for
future reference. Basically you need to specify a formfield_callback
kwarg to modelformset_factory that just passes along any kwargs it
receives (namely, in this case, the 'widget' argument) to
Field.formfield():
def create_formfield
I have a many to many field, with the horizontal available and chosen
boxes in the admin. I wanted to see if there's any way that an admin
can select the order that the chosen objects show up, and have it be
saved and display that way. Right now, they're not ordered, but seem
to show up based on
My script right now basically just reads from a csv file and puts it
into a dictionary for me. However, when I make my own csv file (just
the same as any I have seen), it acts inconsistently. For example,
sometimes it starts at the second line and another time it kept
starting at the end of the f
You can go two directions with this. First, you could use a
intermediate model for the many to many join, which would allow you to
specify extra field on the join, in this case the order. Read up on
this here:
http://docs.djangoproject.com/en/dev/topics/db/models/#extra-fields-on-many-to-many-relat
Friends,
I'm in need of an implementation which calls for using bind variables (in
Oracle sense, not generic) in my SQL in a Django application.
Any experience with that, anyone?
TIA
--
View this message in context:
http://old.nabble.com/Bind-variables-in-Oracle-backend---how-to-use-them--tp
Do you think that implementing the Router class can be helpful as well? It
might save writing some code, not sure.
Your answer is on this blog post:
http://tidbids.posterous.com/saas-with-django-and-postgresql
Good luck
--
View this message in context:
http://old.nabble.com/Programmatic
Look into the clear() method on many to many relations.
Calling .clear() before a delete will remove all relations between the
models and allow you to delete the category only. You might be
fighting the django admin on this though, so this would be best
implemented in a custom solution. Not sure if
I think it's even simpler than this. When configuring your Apache, you
specify a few different virtual hosts listening on different ports. For each
host, you give a different PYTHONPAH. And that's it.
CLIFFORD ILKAY wrote:
>
> On 08/12/2010 12:18 PM, Rick Caudill wrote:
>> Hi,
>>
>> Is it poss
That's easy as other people explained, but not too flexible.
I like putting hidden divs in my HTML and using jQuery to find this and
parse out the data.
This way, you can store complete structures id needed.
elharoussi wrote:
>
> Hi
> Is it possible to give a javascript function a django varia
On 8/13/2010 12:59 PM, Tony wrote:
> My script right now basically just reads from a csv file and puts it
> into a dictionary for me. However, when I make my own csv file (just
> the same as any I have seen), it acts inconsistently. For example,
> sometimes it starts at the second line and anothe
On 8/13/2010 1:09 PM, buddhasystem wrote:
> CLIFFORD ILKAY wrote:
>>
>> On 08/12/2010 12:18 PM, Rick Caudill wrote:
>>> Hi,
>>>
>>> Is it possible to run Django 1.1 and Django 1.2 on the same server? I
>>> have some legacy apps that I need to port to 1.2 but until then I would
>>> still like to ru
Hello there,
sure it can also be done, but it's hardly worth the effort imho. Just let
these sit on two different ports and inform the client.
If you are still compelled to redirect requests based on origin while using
one external port, it's doable from inside Django as well -- you look at the
r
On Aug 13, 11:04 am, buddhasystem wrote:
> Friends,
>
> I'm in need of an implementation which calls for using bind variables (in
> Oracle sense, not generic) in my SQL in a Django application.
>
> Any experience with that, anyone?
To use raw SQL with Django, see:
http://docs.djangoproject.com/en
Rick,
Absolutely! You'll want to take a look at installing virtualenv on
that server. By running separate Python virtual environments you can
install different modules and versions of those modules in "isolation"
and then instruct your web server to reference a specific virtualenv.
Here are a coup
Hey there,
Let's say that I have these models:
*from django.contrib.auth.models import User*
*
*
*class Publisher:*
*name = Char(x)*
*
*
*class Author:*
*publisher = FK(Publisher)*
*name = Char(x)*
*
*
*class Book:*
*user = FK(User)*
*author = FK(Author)*
*name = Char(x)*
Hello all,
I am thinking to start writing app for Matrimonial/Dating. If anyone knows
about anyone doing same project could please divert me to him/her/community.
I would appreciates if anyone would like to join for this project. I am
aiming to finish this within three month with basic fun
I'm trying to install django-lean into my application.
Open search is used in my app App.
I can reverse('opensearch') in the Python shell. However, in the test,
reverse('opensearch') * NoReverseMatch: Reverse for 'opensearch' with
arguments '()' and keyword arguments
In [47]: reverse('opense
hi all,
i use inlineformset_facotry to edit & save the additional values for
my model.
#model.py
class ListingShippingService(models.Model):
site = models.ForeignKey(Site)
is_international = models.BooleanField(default=False)
is_flat = models.BooleanField(default=False)
is_calc
Hi
in my system, i have a few predefined groups, and some custom
permissions. the predefined groups have a strictly defined set of
these permission; it's a very basic part of the specification.
so, i defined these groups and the required permissions and dumped to
a fixture file. after cleaning
I suspect that you must refrain from setting self.widget if widget is in kwargs.
On Thu, Aug 12, 2010 at 1:22 PM, omat wrote:
> Hi All,
>
> I have a custom TagField form field.
>
> class TagField(forms.CharField):
> def __init__(self, *args, **kwargs):
> super(TagField, self).__init__(*
Hi, i'm looking for python module to generate random strings used as
activation keys to being sent to newsletter subscribers in order to
activate their subscription.
Any suggestions?
--
Linux user
--
You received this message because you are subscribed to the Google Groups "Django
users" g
have a look at Django Command Extensions:
http://code.google.com/p/django-command-extensions/
sample usage:
$ ./manage.py generate_secret_key
xr7+43ak=i^2+ommc_e6xn$6vph)_$ffb$n3kp#o1!675euxdu
Greg
On Fri, Aug 13, 2010 at 3:32 PM, bagheera wrote:
> Hi, i'm looking for python module to genera
And to answer your more general question about email signups, have a look at
Django Registration. It should have everything you need.
http://bitbucket.org/ubernostrum/django-registration/wiki/Home
On Fri, Aug 13, 2010 at 3:44 PM, Greg Pelly wrote:
> have a look at Django Command Extensions:
> h
The auth module in contrib uses the make_token method of
default_token_generator in django.contrib.auth.tokens for the standard
password reset, so that sounds like a good choice.
Another good way to get a unique, random string is uuid.uuid4().
Shawn
--
You received this message because you are
The opsys is rhel AS5.2. I couldn't find "yolk" on it (that's a
program, right?).
The machine has rpms for Python 2.4 & sqlite, but I was unable to get
Django working with them. I thought Python 2.5 & later versions
included sqlite, so I started installing all the software (Python,
Django) in new
Hello,
I'm trying to order a list with aggregations. For a restaurant, I have
a visit list and i generate a customer list using
customer_list=visit_list.values('customer_no').annotate(Sum('totalbill')).order_by('totalbill_sum')
(visit class has visit no, customer no and totalbill models)
I want to
This is actually related to psycopg2, OS X and Postgres but I was
hoping someone in here has seen the same issue.
I recently installed PostgresPlus 8.4, Django dev (1.4?), and psycop2
version 2.2.0 on my imac OS X 10.6.4
When i try to run dbshell from the command line I get an error that
reads
r
Hello!
Today I have been benchmarking a Django template to PHP compilar
called Haanga http://github.com/crodas/Haanga/ a development sponsored
by meneame.net a Digg like spanish site. Ricardo has made some sort of
benchmark http://gallir.wordpress.com/2010/08/13/haanga-vs-django-vs-h2o.
With my ow
there us many ways to do so
I'd install pip from the package (rpm, right?)
and then run "pip install pysqlite3"
but the best would be o read about virtualenv and prepare djsngo
environment for the project (not globally)
zalun
On 10-08-14 00:11, Tom wrote:
The opsys is rhel AS5.2. I couldn't
Hi, I know most of you work on Linux, but I do need this to be done on
Windows for a very personal reason.
I mainly followed this tutorial here, except that I use mod_wsgi over
mod_python.
http://wiki.thinkhole.org/howto:django_on_windows
I had my python 2.7, apache, mod_wsgi and postreg all inst
On Aug 14, 11:26 am, John Yeukhon Wong wrote:
> Hi, I know most of you work on Linux, but I do need this to be done on
> Windows for a very personal reason.
>
> I mainly followed this tutorial here, except that I use mod_wsgi over
> mod_python.http://wiki.thinkhole.org/howto:django_on_windows
>
On Sat, Aug 14, 2010 at 7:40 AM, Antoni Aloy wrote:
> Hello!
>
> Today I have been benchmarking a Django template to PHP compilar
> called Haanga http://github.com/crodas/Haanga/ a development sponsored
> by meneame.net a Digg like spanish site. Ricardo has made some sort of
> benchmark http://gal
On Fri, 2010-08-13 at 20:08 +0100, Rizwan Mansuri wrote:
> I would appreciates if anyone would like to join for this project. I
> am
> aiming to finish this within three month with basic functionality.
is it to be open source?
--
regards
Kenneth Gonsalves
--
You received this message because y
Hi, Graham.
I watched the video and your pdf up until the point you ran the wsgi
successfully.
I restarted the apache and bottom of the apache monitor said "Apache/
2.2.16(Win32) mod_wsgi/3.3Python/2.7", and also I could see localhost
again. I can see the blue page.
I am sorry if I sound too stu
This is a common issue with South: it sometimes swallows some import
errors from other apps. In my case, I get this error with ImageKit
when PIL is not installed, or not compiled correctly.
About managing Django stack: the best thing you have is virtualenv +
virtualenvwrapper and PIP with requirem
According to this post
http://www.rkblog.rk.edu.pl/w/p/mod_wsgi/
I used the similar approach, and had localhost/hello.py and worked.
But what about the WSCI way that you showed us in the video?
Thank you.
--
You received this message because you are subscribed to the Google Groups
"Django use
I tried to build the Django docs and got an error.
$ cd django/docs/
$ make html
sphinx-build -b djangohtml -d _build/doctrees . _build/html
Running Sphinx v1.0.1
loading pickled environment... not yet created
building [djangohtml]: targets for 427 source files that are out of
date
updating envi
Hello list,
I customized my first dashboard like so: http://paste.pocoo.org/show/250028/,
but when I added Group, the site gets rendered weird:
http://img705.imageshack.us/img705/8148/djangositeadmin12817724.png.
Could you please help me find what have I done wrong?
Thanks!
--
You received this m
On Aug 14, 12:52 pm, John Yeukhon Wong wrote:
> Hi, Graham.
>
> I watched the video and your pdf up until the point you ran the wsgi
> successfully.
>
> I restarted the apache and bottom of the apache monitor said "Apache/
> 2.2.16(Win32) mod_wsgi/3.3Python/2.7", and also I could see localhost
>
Hi, Graham
I looked at the error log and I fully understood the problem.
I spent an hour trying different ways to understand the whole thing.
Here is the result.
f:/public/testproject/apache/django.wsgi
//code begins here
import os, sys
sys.path.append("f:/public")
os.environ['DJANGO_SETTINGS_
On 14 August 2010 15:39, John Yeukhon Wong wrote:
> I noticed that if I have two of them co-exist simultaneously
> WSGIScriptAlias / "f:/public/testproject/apache/django.wsgi"
> WSGIScriptAlias /testproject "f:/public/testproject/apache/hello.wsgi"
>
> I will get nothing but the same default blue
I haven't watched Graham's video, but here's what I typically do.
On 14 August 2010 15:39, John Yeukhon Wong wrote:
> I do plan to deploy the project on a UNIX server in the future, and I
> still do want to follow up with the previous discussion:
>
> So in general,
>
> 1. When I write a django pr
74 matches
Mail list logo