On Oct 7, 3:34 pm, hcarvalhoalves wrote:
> I recently found this web server (http://www.cherokee-project.com/)
> that claims to be "the fastest web server". I'm not sure that holds
> true for *CGI, but at least for static content they have some
> impressive
On Wed, Oct 7, 2009 at 1:13 PM, Paddy Joy wrote:
>
> Can anyone help out with the following aggregation clause? I have an
> invoice and invoice_item models as shown.
>
> class Invoice(models.Model):
>
> customer = models.ForeignKey(Customer)
> payments_received =
Can anyone help out with the following aggregation clause? I have an
invoice and invoice_item models as shown.
class Invoice(models.Model):
customer = models.ForeignKey(Customer)
payments_received = models.FloatField(default=0)
class Invoice_Item(models.Model):
invoice =
On 7 out, 01:23, robinne wrote:
> I have my model setup with foreign key relationships. I can read one
> table's data to the UI. But I cannot figure out how to read child
> records onto template. I know it is (in the case of Blog, Author, and
> Entry)
I recently found this web server (http://www.cherokee-project.com/)
that claims to be "the fastest web server". I'm not sure that holds
true for *CGI, but at least for static content they have some
impressive benchmarks. Despite the claimings, it's an interesting
alternative for what it supports
I have my model setup with foreign key relationships. I can read one
table's data to the UI. But I cannot figure out how to read child
records onto template. I know it is (in the case of Blog, Author, and
Entry) b.entry_set.all(). But I don't know where this code goes. It
won't work in the
I know it's possible to combine filter parameters, so as to return a
queryset of objects that meet all the conditions. And it's also
possible to perform filters on related models.
Is it possible to do both at once? ie. Return a list of objects that
have a related object meeting both of two
Dear Django developers,
Here is my problem:
author_A = [['book_x',1,10],['book_y',2,20],['book_z',3,30]]
author_B = [['book_s',5,10],['book_t',2,20],['book_z',3,30]]
author_A AND author_B = ['book_z',3,30]
author_A = [['book_x',1,10],['book_y',2,20]]
author_B =
Suppose I have 4 models as below:
class Hub(models.Model):
name = models.CharField("Name", )
something-else = models.CharField("Something", )
class HubPlug(model.Model):
hub = models.ForeignKey(Hub)
plug_id = models.CharField("Plug Id (A, B, C, etc)", )
class Link(model.Model):
On Tue, Oct 6, 2009 at 9:15 PM, Robert Field wrote:
>
> On Oct 6, 10:09 am, Karen Tracey wrote:
> >
> > Personally I'd look pretty closely at the need to store a value dependent
> on
> > the primary key in some other field of the model. Is this
On Oct 6, 10:09 am, Karen Tracey wrote:
>
> Personally I'd look pretty closely at the need to store a value dependent on
> the primary key in some other field of the model. Is this really absolutely
> necessary?
>
> Karen
In relational models it's pretty standard to use
It seems that django's comments system isn't exactly what your want.
It is quity easy to write your specialised comments app, one solution
is to just write your own.
Second solution solution is:
1. Attach comments to your page model, not paragraph.
2. Add paragraph_id field to comment model.
3.
On Oct 7, 2:44 am, Chris McComas wrote:
> We've been running our Django app with mod_python and Apache to serve
> static files, along with MySQL as the database of choice. We're in the
> process of making a few changes because we've had some stability and
> performance
Solved this problem using JQuery.
On Oct 6, 2:26 pm, Sonal Breed wrote:
> Hi all,
>
> I am using a formset in my template. I want to invoke a javascript
> function as you click a key in any of the text-fields in this formset.
> How do I accomplish this? I did not find any
Brilliant! Just what I needed to hear. :-)
Thanks, Kevin.
-Carlos.
On Tue, Oct 6, 2009 at 3:56 PM, Kevin Teague wrote:
>
>
>
> On Oct 6, 12:02 pm, Carlos Gustavo wrote:
> > Thanks Kevin,
> >
> > I would give it a shot. Doesn't sound as easy as I had
2009/10/7 StevenC :
>
> Thank you all for your feedback.
>
> Python is not going to be the best interface to use and i have chosen
> to go with C#, something i want to learn and much more achievable.
As for .NET, if you're used to something like Django or most PHP
frameworks,
Hi all,
I am using a formset in my template. I want to invoke a javascript
function as you click a key in any of the text-fields in this formset.
How do I accomplish this? I did not find any documentation in this
scenario.
{% for data in formset.forms %}
Given a path and a urlconf, how would one go about fetching the name
(NOT the view) corresponding to the current path? I've poked around
Google a bit, but everything I could find looked really fragile.
Thanks!
--~--~-~--~~~---~--~~
You received this message
Karen Tracey wrote:
> On Tue, Oct 6, 2009 at 1:32 PM, Mat wrote:
>
>> Okay so here is my code:
>>
>> **This way works and does not error**
>> rs = BadActor.objects.filter(addr__iregex='^(192\.188\.)(.*)(\.20)$');
>> print len(rs);
>> print rs[0].addr
>>
>>
On Oct 6, 12:02 pm, Carlos Gustavo wrote:
> Thanks Kevin,
>
> I would give it a shot. Doesn't sound as easy as I had hoped. :-)
>
To make things even harder, keep in mind that any data gotten from the
HTTP request which is passed on to a shell call as an argument must
Has anyone used django wikiapp in production.
Any reviews of this app - Features you liked?
Any major issues or shortcomings one should be aware of?
Any alternatives you can recommend, I should evaluate as well.
--~--~-~--~~~---~--~~
You received this
On Tue, Oct 6, 2009 at 3:31 PM, Aaron wrote:
>
> On Oct 6, 4:20 pm, Karen Tracey wrote:
> > On Tue, Oct 6, 2009 at 2:49 PM, Aaron wrote:
> >
> > > Just tried it, like this:
> >
> > > class MyModel(models.Model):
> > >myfield =
On Oct 6, 4:20 pm, Karen Tracey wrote:
> On Tue, Oct 6, 2009 at 2:49 PM, Aaron wrote:
>
> > Just tried it, like this:
>
> > class MyModel(models.Model):
> > myfield = models.CharField(unique = True, blank = True, null =
> > True)
>
> That can't be
On Tue, Oct 6, 2009 at 2:49 PM, Aaron wrote:
>
> Just tried it, like this:
>
> class MyModel(models.Model):
>myfield = models.CharField(unique = True, blank = True, null =
> True)
>
>
That can't be right because this field is missing max_length.
>def save(self,
Thanks Kevin,
I would give it a shot. Doesn't sound as easy as I had hoped. :-)
-Carlos.
On Tue, Oct 6, 2009 at 2:55 PM, Kevin Teague wrote:
>
> Use the os.subprocess module in the python standard library to invoke
> the bash script from your django view code:
>
>
Just tried it, like this:
class MyModel(models.Model):
myfield = models.CharField(unique = True, blank = True, null =
True)
def save(self, force_insert = False, force_update = False):
if self.myfield == '':
self.myfield = None
super(MyModel,
Use the os.subprocess module in the python standard library to invoke
the bash script from your django view code:
http://docs.python.org/library/subprocess.html
Although in my experience, when there is a bash script wrapping a
number of calls to other programs, I tend to find it easier to work
hello,
I look for email alert functionality, where readers sign up to get
notifications when news happens. But I can't find any suitable django
app.
So where can I find something like this?
Any snippet or source code?
regards, nomanek
--~--~-~--~~~---~--~~
You
Hi Daniel,
Thanks for the response to my mail.
These input values are used by a bash script containing various C programs
and the processing results in graph that needs to be displayed as an image
plot on the response form.
Thanks again.
-Carlos
On Tue, Oct 6, 2009 at 2:01 PM, Daniel Roseman
On Tue, Oct 6, 2009 at 1:32 PM, Mat wrote:
>
> Okay so here is my code:
>
> **This way works and does not error**
> rs = BadActor.objects.filter(addr__iregex='^(192\.188\.)(.*)(\.20)$');
> print len(rs);
> print rs[0].addr
>
> ***This way errors
> q =
Yes, I intend to write ORM code that will create views and triggers in the
database?
Many Thanks
Isoscale
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
Okay so here is my code:
**This way works and does not error**
rs = BadActor.objects.filter(addr__iregex='^(192\.188\.)(.*)(\.20)$');
print len(rs);
print rs[0].addr
***This way errors
q = Q({'addr__iregex':'^(192\.188\.)(.*)(\.20)$'});
rs = BadActor.objects.filter(q);
print
On Oct 6, 4:49 pm, Geobase Isoscale wrote:
> Hi all,
> Firstly, I'm looking for modules and folders that supports ORM (object
> relation mapper ) that will enable me to extend the functionality of Django
> to enable me wrap SQL statements to result with database triggers and
On Oct 6, 2:56 pm, Daniel Roseman wrote:
> Does that field need to be unique on its own?
Yes it does. And I also don't want the clients of this model to know
that they could be accessing the model's ID when they access the field
in question.
I suppose what I could do is
On Oct 6, 6:01 pm, Carlos Gustavo wrote:
> Hi Everyone,
>
> I am Django newbie and the experience has been exciting.
>
> I want some help with the ff. challenge I am now facing:
>
> How can I get a Django form to process a bash script executing a bunch of C
> programs
On Oct 6, 6:28 pm, Aaron wrote:
> On Oct 6, 2:09 pm, Karen Tracey wrote:
>
> > Yes, you'll have to save the change to the DB. But note if you were called
> > with force_insert=True you do not want to call the superclass save with
> > force_insert=True
On Oct 6, 2:09 pm, Karen Tracey wrote:
> Yes, you'll have to save the change to the DB. But note if you were called
> with force_insert=True you do not want to call the superclass save with
> force_insert=True twice.
OK. Would calling "super(MyModel, self).save(False,
On Tue, Oct 6, 2009 at 12:57 PM, Aaron wrote:
>
> On Oct 6, 1:30 pm, Karen Tracey wrote:
> > The only sure way to know what primary key is going to be assigned by the
> DB
> > is to actually save the object to the DB and see what got assigned.
>
> O.K.
Hi Everyone,
I am Django newbie and the experience has been exciting.
I want some help with the ff. challenge I am now facing:
How can I get a Django form to process a bash script executing a bunch of C
programs running on linux.
Any pointers or suggestions would be deeply appreciated.
Thanks
On Oct 6, 2009, at 8:44 AM, Chris McComas wrote:
> Is there an easy way for us
> to take all of our data from our MySQL and move it over to PostgreSQL?
Welcome to PostgreSQL! I think you'll find it a very convivial
environment. :)
Here's a blog entry that describes one migration path:
On Oct 6, 1:30 pm, Karen Tracey wrote:
> The only sure way to know what primary key is going to be assigned by the DB
> is to actually save the object to the DB and see what got assigned.
O.K. Now, when I get the ID after saving the object and perform some
logic on it, I'll
ok, thanks!
On Oct 5, 12:09 pm, Russell Keith-Magee
wrote:
> On Mon, Oct 5, 2009 at 6:31 PM, anentropic wrote:
>
> > So I just have to hard-code the feed urls in my templates?
>
> In short, yes.
>
> The feeds framework predates the introduction of
On Tue, Oct 6, 2009 at 12:05 PM, Aaron wrote:
>
> When saving a model, I need to be able to access its ID field like
> this:
>
> class MyModel:
>...
>def save(self, force_insert = False, force_update = False):
>v = self.id
># Do something with v
>
>
On Tue, Oct 6, 2009 at 11:44 AM, Michiel wrote:
>
> Hi,
>
> I'm getting an unhandled IntegrityError after setting a
> unique_together over a DateField and a SlugField, is that considered a
> bug or not?
>
> I expected it to show a nice error message informing the
You could do something like this:
def save(self, force_insert=False, force_update=False):
# first save the model using the base class save method
super(MyModel, self).save(force_insert, force_update)
# then self will have an id set
v = self.id
On Tue, 2009-10-06 at
When saving a model, I need to be able to access its ID field like
this:
class MyModel:
...
def save(self, force_insert = False, force_update = False):
v = self.id
# Do something with v
super(MyModel, self).save(force_insert, force_update)
However, if the model
Hi,
I'm getting an unhandled IntegrityError after setting a
unique_together over a DateField and a SlugField, is that considered a
bug or not?
I expected it to show a nice error message informing the user that he
should pick something else for either Date or Slug. I does do that
when I set the
Hi all,
Firstly, I'm looking for modules and folders that supports ORM (object
relation mapper ) that will enable me to extend the functionality of Django
to enable me wrap SQL statements to result with database triggers and
views.
Secondly, how can I use RAW SQL statements with Django.
Many
Media seems to come in several flavors (admin, non-admin read only,
uploadable to, maybe more). We have MEDIA_URL and
ADMIN_MEDIA_PREFIX available in settings.py for configuring where our
projects will look for their media.
I've seen '/media/' and MEDIA_URL+'admin/', but I've also seen
We've been running our Django app with mod_python and Apache to serve
static files, along with MySQL as the database of choice. We're in the
process of making a few changes because we've had some stability and
performance issues, so we're moving to mod_wsgi/nginx, but we also
want to switch from
When I ran through this problem, there were a couple of things I was doing
wrong, none of which had to do with jpeg support.
Eventually, I found that my major problem was that my media directory (where
the upload directory resides) was not set properly in Apache. It was not
writeable. In my
Hello,
I'm trying to get django working through WSGI with modjy using
(embedded) Jetty as the web server.
The problem is that django does not like that the url path is prefixed
with the web application's name. By "web application" I mean the
complete tree (or a war file) with the WEB-INF
On Tue, Oct 6, 2009 at 7:52 AM, Thomas Steinmaurer wrote:
>
> Hello,
>
> I have the following model:
>
> [snip]
> class RelationalDatabaseAdmin(admin.ModelAdmin):
> list_display =
>
> ('data_package_id','physical_name','database_instance_name','model_version')
>
just for your knowledge :
Python implementation under .NET
http://www.codeplex.com/Wiki/View.aspx?ProjectName=IronPython
Kristaps Kūlis
BOFH excuse #371: Incorrectly configured static routes on the
Thank you all for your feedback.
Python is not going to be the best interface to use and i have chosen
to go with C#, something i want to learn and much more achievable.
Cheers all though
--~--~-~--~~~---~--~~
You received this message because you are subscribed
We have an existing app written in perl with Postgre as DB.
I want to add the django admin as the interface to this existing DB.
The main app is in constant development, so the DB scheme may change
in the future.
I have checked the inspectdb output and it is quite good (I do also do
some
Daniel,
Thanks for your reply. I believe template tags are part of the
answer, namely in the example I gave below about the "Ads". They can
grab some context right from the template, call functions from the
app, etc. But they can't "pass data" to themselves... And the tag has
to be hard-coded
You can write auth backend to LDAP, so it will auth against LDAP
See http://code.djangoproject.com/ticket/11526
About sessions: you can write custom session backend, with talks to OpenSSO
server
Kristaps Kūlis
BOFH excuse #371: Incorrectly configured static routes on the
Thomas Steinmaurer wrote:
> Hello,
>
> I have the following model:
>
> class ModelVersion(models.Model):
> model_version_id = models.AutoField(primary_key=True)
> major_version = models.IntegerField(null=True, blank=True)
> minor_version = models.IntegerField(null=True,
Hello,
I have the following model:
class ModelVersion(models.Model):
model_version_id = models.AutoField(primary_key=True)
major_version = models.IntegerField(null=True, blank=True)
minor_version = models.IntegerField(null=True, blank=True)
class Meta:
db_table =
Hallöchen!
Torsten Bronger writes:
> [...]
>
> I did some research on this two weeks ago and my impression was
> that there are no guidelines at all to create portable apps. On
> the contrary, the template path in the official Django tutorial is
... not a good example.
Tschö,
Torsten.
--
I have been test it, but it's seem not to be clear to involve into the real
project. Could you let me know the other example?
On Tue, Oct 6, 2009 at 6:01 PM, Daniel Roseman wrote:
>
> On Oct 6, 11:55 am, veasna bunhor wrote:
> > Do you know how to
On Oct 6, 11:55 am, veasna bunhor wrote:
> Do you know how to use unit testing in django ? Could you please give me an
> example?
>
> Thanks in advanced,
http://docs.djangoproject.com/en/dev/topics/testing/
--
DR
--~--~-~--~~~---~--~~
You
On Tue, Oct 6, 2009 at 6:55 PM, veasna bunhor wrote:
> Do you know how to use unit testing in django ? Could you please give me an
> example?
There's a link to docs labled "Testing: Overview" on the homepage of
the documentation.
Do you know how to use unit testing in django ? Could you please give me an
example?
Thanks in advanced,
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
Hey,
If you prefer cleaner way, then you can run django on iropython
http://stackoverflow.com/questions/425990/django-on-ironpython
and use .NET Powershell SDK for this purpose
Kristaps Kūlis
BOFH excuse #371: Incorrectly configured static routes on the
2009/10/6 StevenC :
>
> Hey all.
>
> I have been set a massive project and one of the fundimentals is to
> create a Mailbox in Microsoft Exchange 2007. My choice of language is
> going to be Django/Python rather than PHP because i want to move away
> from PHP.
>
> Soo, my
Hallöchen!
Johan writes:
> Thanks for all the feedback. By nature I prefer NOT to use a to
> deep framework stack. So although django-harness could work I
> would prefer to keep my dependencies simple. I would probably go
> with managing the python path. It seems to be the simplest way and
>
Ok, I think your answer is here on creating permissions:
http://docs.djangoproject.com/en/dev/topics/auth/#id1
in the ModelAdmin, override the `save_model` method and check the
current user permission:
request.user.has_perm('permission_name')
for more on checking permission see
Thanks for all the feedback. By nature I prefer NOT to use a to deep
framework stack. So although django-harness could work I would prefer
to keep my dependencies simple. I would probably go with managing the
python path. It seems to be the simplest way and most transparent way
of handling the
Another way is to use a settings wrapper such as django-harness[1],
which:
* helps organize apps (by name, without the notion of project) and
eliminates the need to write absolute paths for templates, sqlite
database and such stuff stored in the project directory;
* simplifies version control of
not exactly,
for example I want to make custom permission which enables user to
change one field in model but only to 5 letter length word while other
users may change that field to 6 letters length word. Thats sily
example but in some cases it may be useful.
On Oct 6, 10:19 am, "Bogdan I.
i think you want to create a group.
On Tue, 2009-10-06 at 01:05 -0700, elminio wrote:
> Hi,
> In admin Panel I can choose groups and give them specified
> permissions. For example
>
> admin | log entry | can add log entry
>
> And I would like to create my own type of permission which for
Hi,
How to ignore case sensitivity in admin search box ?
In model I have one search field set but case sensitivity isn't
ignored
thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to
Hi,
In admin Panel I can choose groups and give them specified
permissions. For example
admin | log entry | can add log entry
And I would like to create my own type of permission which for example
is called all and gives to the specified user permission to do
whatever he likes, and other
Hey all.
I have been set a massive project and one of the fundimentals is to
create a Mailbox in Microsoft Exchange 2007. My choice of language is
going to be Django/Python rather than PHP because i want to move away
from PHP.
Soo, my question to everyone is.. Does anyone know if you can
76 matches
Mail list logo