On Sat, Apr 25, 2009 at 10:34 PM, kspr wrote:
> # This is what I want: (admin.py)
> class DoctorAdmin(admin.ModelAdmin):
>list_filter = ['origin.country']
>
shouldn't it be:
list_filter = ['origin__country']
TiNo
--~--~-~--~~~---~--~~
You received this mess
Hi Djangoers!
I'm making a database system which holds information about doctors and
what universities they got their degree from. It consists of two
models, Doctor and Origin.
In Doctor, I make a field, origin, which is a ForeignKey to Origin,
surprisingly :-)
The Origin model has a name of th
Hi Djangoers!
I'm making a database system which holds information about doctors and
what universities they got their degree from. It consists of two
models, Doctor and Origin.
In Doctor, I make a field, origin, which is a ForeignKey to Origin,
surprisingly :-)
The Origin model has a name of th
On Sat, 2009-04-25 at 04:37 -0700, medhat wrote:
> Here is a small example:
>
> class Item(models.Model):
> title = models.CharField(max_length=25)
> other = models.TextField(null=True, blank=True)
> items = models.ManyToManyField('self', null=True, blank=True)
>
> def __unicode_
On Fri, 2009-04-24 at 15:32 -0300, Rubens Altimari wrote:
> Hello,
>
>
> Sorry if this is a known issue, but I didn't find anything elsewhere.
>
>
> I have these two models related by a many-to-many relationship. I'm
> using the 'default' admin application to edit data, and in order to be
> ab
On Fri, 2009-04-24 at 16:18 -0700, Joshua Partogi wrote:
>
>
> On Apr 25, 8:20 am, Konstantin S wrote:
> > Hello!
> >
> > I am planning to deploy django based site on a limited VPS and want to
> > know which database is more suitable for this ? If I've had a 'normal'
> > hardware I'd vote for t
I see 2 different django projects for porting django app to app-engine
http://code.google.com/p/app-engine-patch/
http://code.google.com/p/google-app-engine-django/
I'd like to know the preferred module to use and the relative benefits and
problems.
Thanks in advance.
--
Regards,
Lakshman
beco
On Thu, 2009-04-23 at 22:05 -0700, Avi wrote:
> is there a neat way to inform the admin interface that you want to
> limit hte number of one to many relationships ? (i..e. only allow 3
> addresse entires per person) ?
If "neat" means "just a simple option", then no, since that's not really
a prop
On Thu, 2009-04-23 at 21:23 -0700, Francis wrote:
> Hi, I'm using dojo (also tried with jquery) to send json data to my
> django application.
>
> But I can't get it working properly.
The trick to understanding is to think how are you sending the data? In
particular, what MIME type is being used?
On Sat, Apr 25, 2009 at 6:26 PM, Tim Valenta wrote:
>
> Hello all. I tried the IRC, but it's too chaotic and not enough
> people take you seriously :)
>
> Very very abbreviated example code:
>
> class Person(models.Model):
>parents = models.ManyToManyField('self', related_name='children')
>
>
Hello all. I tried the IRC, but it's too chaotic and not enough
people take you seriously :)
Very very abbreviated example code:
class Person(models.Model):
parents = models.ManyToManyField('self', related_name='children')
Now, the exact relationship is just an example, but it demonstrates
On Thu, 2009-04-23 at 13:22 -0700, Tyler Erickson wrote:
> I seem to be encountering the same or similar issue. The distinct()
> method seems to have no affect on my queryset.
Both this post and the original one don't contain enough information for
anybody to replicate the problem (since we can p
On Apr 25, 7:33 pm, zayatzz wrote:
> Hello
>
> Im trying to give enough information in first post so you could help
> me if you can or want to. For that reason this post might turn out bit
> long.
>
> I found tinymce pluggable for django -http://code.google.com/p/django-tinymce/
> - and ive been
On Thu, 2009-04-23 at 11:00 +0100, Andrew Ingram wrote:
> Hi All,
>
> I'm looking for an efficient way to solve the following problem, I'm
> happy to use custom sql if necessary.
>
> Basically I have an Order model and an OrderItem model (ecommerce
> site), structured as follows:
>
> Order(mode
On Tue, 2009-04-21 at 11:51 -0700, adrian wrote:
>
> I want to have an inclusion tag that builds a menu system, which has a
> default config.
>
> default_config = [list of dicts here]
>
> @register.inclusion_tag('_nav_leftmenu.html')
> def nav_leftmenu(menu_config=default_config):
> # build
On Tue, 2009-04-21 at 09:52 -0700, David De Sousa wrote:
> Hi! in a new project, I have the necessity of creating new models on
> the fly, and then interact with them (including writing to a new table
> in the database), is there any way of doing this?
Yes.
> I'm guessing that with a little intr
On Mon, 2009-04-20 at 22:39 +1000, Joshua Partogi wrote:
> Dear all,
>
> I have an inheritance model as such:
>
> class User(models.Model)
>
> class Staff(User)
>
> Now I already have the instance of User inside view:
>
> user = User.objects.create(name="Joe")
>
> now how do I relate this us
On Sun, 2009-04-19 at 22:24 -0700, Adrián Ribao wrote:
> Hello,
> I have a model using extra fields in M2M relationships as described
> in:
> http://docs.djangoproject.com/en/dev/topics/db/models/#extra-fields-on-many-to-many-relationships
>
> When I try to do something I get this:
>
> "psycopg2
On Fri, 2009-04-17 at 21:36 -0700, koranthala wrote:
[...]
> I understand it is done because all backends does not support it - but
> can it be supported for backends which actually support it? I am using
> postgresql - and now I have to do many non-optimal things to decrease
> this query count.
On Fri, 2009-04-17 at 03:02 -0700, forrest yang wrote:
> session would be created esaily, but could django create some
> application variable like asp.net , or provide some special function
> for the different period of server, on_server_start()
> on_application_start() or something like that?
Th
I am trying to install django-filebrowser and I followed all the steps
I thought but when I am in the admin section and I click the
filebrowser link I get this error:
OSError at /admin/filebrowser/
(2, 'No such file or directory')
Request Met
On Thu, 2009-04-16 at 23:11 -0700, Tai Lee wrote:
> I'm trying to add an extra selection to a queryset, `featured`, which
> should be True (or 1) if the primary key matches a number of known
> values.
>
> It appears to work as expected both in SQL and the ORM when matching
> against a single valu
On Thu, 2009-04-16 at 18:20 -0700, Thierry wrote:
> Let's say I have a list of words in my database:
>
> ['bbb', 'aaa', 'zzz', 'ddd']
>
> How can I retrieve a list of the above excluding the following words
> ['aaa', 'zzz'] by using __in? I can do the above with:
>
>words_list = Words.obje
Hello
Im trying to give enough information in first post so you could help
me if you can or want to. For that reason this post might turn out bit
long.
I found tinymce pluggable for django - http://code.google.com/p/django-tinymce/
- and ive been trying to implement it.
following instructions i
On Wed, 2009-04-15 at 15:42 -0700, Eddified wrote:
> Are there up-to-date java-doc style api docs like this:
> http://djangoapi.matee.net/
> anywhere on the official django site? I've looked high and low and
> can't find it...
No. They don't exist there. Intentionally.
If anybody wants that sor
Thanks James and Karen,
Yes indeed it was the problem, I updated the my.cnf to have
transaction_isolation set to READ-COMMITTED and it works fine now.
Is there any benefit of this approach of the other (connection autocommit)
i.e. performance-wise ?
-Aaron
On Sat, Apr 25, 2009 at 7:24 AM, Karen T
This doesn't seem to have been resolved at all, so a couple of questions
that might help things out...
On Tue, 2009-04-14 at 19:06 -0700, Emma F wrote:
> I feel like there must be something very elementary that I'm missing
> here, but I've been all through the documentation and can't figure it
>
On Sat, Apr 25, 2009 at 11:23 AM, Ramiro Morales wrote:
>
> On Sat, Apr 25, 2009 at 11:51 AM, RunThePun wrote:
> >
> > Howdy dj-users,
> >
> > I'm running a pinax site which is strictly in hebrew, I disabled the
> > locale middleware so my LANGUAGE_CODE would take precedence when users
> > come
yes my bad!! wrong group - apologies
On Apr 25, 4:04 pm, Karen Tracey wrote:
> On Sat, Apr 25, 2009 at 11:57 AM, Tom Howe wrote:
>
> > 'm trying to take advantage of polymodel inheritance and curious to
> > get opinion of pro/cons of using a datastore model that is essentially
> > one big table
Il giorno 24/apr/09, alle ore 17:53, Karen Tracey ha scritto:
> So where is the persistent storage of this XML data? Always in a
> file on the client (is there only one client?), and POSTed to the
> server each time a client wants to run a query on the data? If so:
> why even have a ser
On Sat, Apr 25, 2009 at 11:57 AM, Tom Howe wrote:
>
> 'm trying to take advantage of polymodel inheritance and curious to
> get opinion of pro/cons of using a datastore model that is essentially
> one big table
>
As polymodel is an Google App Engine thing and not in Django, I expect you
would ge
'm trying to take advantage of polymodel inheritance and curious to
get opinion of pro/cons of using a datastore model that is essentially
one big table
My datastore layout is starting to look like this:
class BaseModel(polymodel.PolyModel, search.SearchableModel):
created = models.Datetime
'm trying to take advantage of polymodel inheritance and curious to
get opinion of pro/cons of using a datastore model that is essentially
one big table
My datastore layout is starting to look like this:
class BaseModel(polymodel.PolyModel, search.SearchableModel):
created = models.Datetime
On Sat, Apr 25, 2009 at 10:58 AM, dartdog wrote:
>
> I'd also add that the Django project had it's last release in Aug 08
> and the App engine Patch is being actively worked on almost daily.
>
This statement is rather unclear. The "Django project" sounds like Django
itself, and it is untrue tha
Thanks, I'll give it a try.
On 25 Apr, 15:14, cschams wrote:
> You could try Thickbox, which has a modal mode, and supports iframed
> and ajax content. Its almost a drop-in replacement for links to modal
> dialogues and it degrades to simple links.http://jquery.com/demo/thickbox/
>
> On Apr 25,
On Sat, Apr 25, 2009 at 11:51 AM, RunThePun wrote:
>
> Howdy dj-users,
>
> I'm running a pinax site which is strictly in hebrew, I disabled the
> locale middleware so my LANGUAGE_CODE would take precedence when users
> come to the site.
>
> The problem is that django-admin is alot better in Engli
I'd also add that the Django project had it's last release in Aug 08
and the App engine Patch is being actively worked on almost daily.
On Apr 25, 3:13 am, Joshua Partogi wrote:
> Hi Filip,
>
> Thanks for the long explanation. It saves me time to mess around with
> App Engine :-) Based on your e
Howdy dj-users,
I'm running a pinax site which is strictly in hebrew, I disabled the
locale middleware so my LANGUAGE_CODE would take precedence when users
come to the site.
The problem is that django-admin is alot better in English, but I get
it in Hebrew. Is there any way to configure the lang
Actually you can download a sample app with App-Engine Patch and be up
and going very quickly, using non-ported apps is more problematic...
But also moving forward at a fair pace. Google's lack of support for
certain key features in the datastore are a real issue like lack of
full text search... (
> So request.user.id will give you the userid of the currently loggedin user.
aaah. thank you very much!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to djan
You can find the user object in the request:
http://docs.djangoproject.com/en/dev/ref/request-response/#django.http.HttpRequest.user
So request.user.id will give you the userid of the currently loggedin user.
Tino
On Sat, Apr 25, 2009 at 4:44 PM, Daniel Strasser wrote:
>
> Hey
>
> I have been
Hey
I have been searching for a while for this, but I didn't came to a
solution. I use the Django Authentication framework.
In a view, I have:
def settings(request):
cust = Customer.objects.get(???)
return render_to_response('useraccount/settings.html', {'loggedin':
checklogin(r
On Sat, Apr 25, 2009 at 5:07 AM, Aaron Lee wrote:
> Today I just stumble upon a very strange bug and I am not sure if that's
> Django bug or not.
>
> Here's the context:
> I have a model Job which has a status field.
>
> For debugging, I run python manage.py shell and do
>
> jobs = Job.objects.fi
Thanks. A related question - how would I tell the template to
display only one address, say the address which
has address.address_type='P'
I can do it the laborious way which is to get all, loop, and then use
{% ifequal %} to display the one I want. But then I have to pass a
variable containin
You could try Thickbox, which has a modal mode, and supports iframed
and ajax content. Its almost a drop-in replacement for links to modal
dialogues and it degrades to simple links.
http://jquery.com/demo/thickbox/
On Apr 25, 12:39 am, Chris Dew wrote:
> I'd like to use something like the jQuery
On Sat, Apr 25, 2009 at 4:30 AM, keegan3d wrote:
>
> Im building a site that uses wordpress for the blog, and django for
> everything else. I want to be able to pull in some html from the blog.
>
> So far if I get the html with urllib2 and then pass the response to
> render_to_response it gets fo
On Saturday 25 April 2009 17:07:59 Continuation wrote:
> What Postgresql driver does Django use?
psycopg
--
regards
kg
http://lawgon.livejournal.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gr
On Sat, Apr 25, 2009 at 7:37 AM, Continuation wrote:
> What Postgresql driver does Django use?
This question is answered by Django's documentation, which covers the
database adapter modules used by each of the built-in database
backends.
> And does it support the async API (
> http://www.postg
On Apr 25, 10:06 pm, Newt wrote:
> Thank you very much,
> yes, it's the only app (well I have a production and development
> version of the same application running there).
> The production version is dj 1.0.2
> The development version is dj 1.1b - with the trunk version of django-
> pyodbc - b
On Sat, Apr 25, 2009 at 5:07 AM, Aaron Lee wrote:
> So is there some InnoDB specific thing in Django that does some "smart"
> caching?
Unless you explicitly enable Django's caching system, and explicitly
make use of it, Django does no caching of any sort whatsoever.
Personally I would suspect t
Hi all,
I'm working on a Django project where I've ran into some difficulties.
I've a message archive where I (and the admins) can post a message to
the regular users of the page.
Because there come more and more messages I want to build a archive
for them, just like en blog, where it's categori
Thank you very much,
yes, it's the only app (well I have a production and development
version of the same application running there).
The production version is dj 1.0.2
The development version is dj 1.1b - with the trunk version of django-
pyodbc - but I switched to this version in desperate respo
What Postgresql driver does Django use?
And does it support the async API (
http://www.postgresql.org/docs/8.3/static/libpq-async.html
) of postgresql?
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Djang
Here is a small example:
class Item(models.Model):
title = models.CharField(max_length=25)
other = models.TextField(null=True, blank=True)
items = models.ManyToManyField('self', null=True, blank=True)
def __unicode__(self):
return self.title
def save(self, force_inse
Presuming you are only running the one web application on the server,
do things improve it you add directive:
PythonInterpreter main_interpreter
to Apache configuration.
If it doesn't, not the same issue as pyscopg2.
Graham
On Apr 25, 9:13 pm, Newt wrote:
> I'm running it as mod_python on
I'm running it as mod_python on Ubuntu 8.04 server. I connect to
external MSSQL server thru django-pyodbc, the only thing I had to
install manually was the pyodbc, the rest was installed using package
manager (unix-odbc, freetds). I'm not much a server admin and it was a
few months ago.
Ales
On
On Apr 25, 12:37 am, Newt wrote:
> Hello,
>
> in my latest application I have models with like 15 Decimal fields,
> with different decimal places.
>
> when I try to save an object of that model, I get sometimes (often,
> but not always) this error:
>
> File "/home/newt/django/1.0/sites/cdms/i
Hi,
I'm pretty sure I use it correctly, but don't understand how this
fixes the problem :(.
I looked up the reload in the documentation and all it does a module
reload - where would I place it?
I was thinking i could convert all decimals to strings prior the
saving the new object, but it would no
Hi Folks,
I have implemented a simple custom validator. Here i am pasting the
Code
model.py
---
from django.db import models
from django.contrib import admin
from django import forms
class Personal(models.Model):
firstName = models.CharField(
max_length = 20,
blank =
On Apr 25, 6:30 pm, keegan3d wrote:
> Im building a site that uses wordpress for the blog, and django for
> everything else. I want to be able to pull in some html from the blog.
>
> So far if I get the html with urllib2 and then pass the response to
> render_to_response it gets formatted to pr
Today I just stumble upon a very strange bug and I am not sure if that's
Django bug or not.
Here's the context:
I have a model Job which has a status field.
For debugging, I run python manage.py shell and do
jobs = Job.objects.filter(status__in=['A'])
*I am using MySQL 5.0 InnoDb*
Re-running t
Im building a site that uses wordpress for the blog, and django for
everything else. I want to be able to pull in some html from the blog.
So far if I get the html with urllib2 and then pass the response to
render_to_response it gets formatted to print as a string, ->
.
Is there a way to t
Hi Filip,
Thanks for the long explanation. It saves me time to mess around with
App Engine :-) Based on your explanation, it seems that using django
on Appengine doesn't really get you anywhere.
Thanks again.
On Apr 24, 7:06 pm, kRON wrote:
> Basically, you can't use Django models on Google Ap
I have (essentially) the following models:
class AttendanceRelation(models.Model):
event = models.ForeignKey('swingtime.Occurrence')
attendee = models.ForeignKey('AttendeePerson')
class AttendeePerson(models.Model):
first_name= models.CharField(blank=False, max_length=100)
64 matches
Mail list logo