AttributeError: 'QuerySet' object has no attribute 'remove'

2010-03-10 Thread Hugh Zhang
Hi there, i have occured an error bellow with django 1.1: *Traceback (most recent call last): File "", line 1, in AttributeError: 'QuerySet' object has no attribute 'remove'* The whole code about this error is: *>>> b = Blog.objects.get(id=1) >>> e = Entry.objects.get(id=234) >>> b.entry_set.re

How to make django use a different python interpreter located at some random location.

2010-03-10 Thread Abhinov
Hi All, How to make my django use a different python interpreter located at some random location ? Any help will be of great help. Regards, Abhinov -- 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.

Re: Database redesign for "user" table

2010-03-10 Thread derek
On Mar 8, 6:00 pm, Daniel Roseman wrote: > On Mar 8, 3:01 pm, Derek wrote: > > > I am working with a legacy database and would appreciate some advice. > > > I have an existing "user" table, with some fields that overlap with the > > design of Django's "user" table, and some fields that are "extra

Re: ModelAdmin

2010-03-10 Thread Praveen
I know i can not directly register a form but i do not have any model for Email. i just have plain form *forms.Form* is there any other way to register Form with admin. Thanks On Mar 11, 3:03 am, Beres Botond wrote: > You cannot directly register a form with admin, you should be > registering mod

Re: ModelAdmin

2010-03-10 Thread Praveen
On Mar 11, 3:03 am, Beres Botond wrote: > You cannot directly register a form with admin, you should be > registering models I know i can not directly register a form but i do not have any model for Email. i just have plain form *forms.Form* is there any other way to register Form with admin. Th

Validating a specific model field

2010-03-10 Thread Julien Phalip
Hi, It's the first time I'm playing with model validation, and I'm a bit stuck with something. I couldn't find any help on this mailinglist or in the doc, but if there is please let me know where :) Basically I'd like to validate a model field in the context of its instance. First I assumed it wo

Re: Filtering by another object's ManyToMany properties

2010-03-10 Thread Laereom
Hey, thanks. EXACTLY what I needed. On Mar 10, 3:03 pm, Daniel Roseman wrote: > On Mar 10, 10:38 pm, Laereom wrote: > > > > > > > I have two models, we'll call them 'Question' and 'Search'. > > > Search has a many to many field called 'questions' which contain, > > naturally, a set of questions

Re: templates?

2010-03-10 Thread lalla
Hello jirka, i could not get through the error. But when i run python manage.py shell.. and do the same.i aint getting any errors. what should i put in PYTHONPATH? to make it run through only python.How to configure the things manually. Thanx in advance On Mar 11, 2:41 am, Jirka Vejrazka wrote: >

Re: need help in multi db

2010-03-10 Thread lakshmi silaja
thanks for ur suggestion jirka On Thu, Mar 11, 2010 at 3:01 AM, Jirka Vejrazka wrote: > Hi Silaja, > > first, I'm going to guess that no one will be able to solve your > problem. There are multiple reasons for it: > > - Multiple database support is in Django 1.2. You insist on using it > on Dja

Re: /admin/auth/user/ trouble after doing the tutorial

2010-03-10 Thread John Griessen
John Griessen wrote: http://127.0.0.1:8080/admin/auth/group/ shows zero groups. is that a problem? I tried adding a group with many permissions and rights and it just resulted in an error message: "Table 'django_server.auth_group_permissions' doesn't exist" Should I be logging into mysql to

/admin/auth/user/ trouble after doing the tutorial

2010-03-10 Thread John Griessen
I have gone through the tutorials and get an error when using the admin UI about users and authorizations. Exception Value: (1146, "Table 'django_server.auth_user_groups' doesn't exist") I found this "Note that the default settings.py file created by django-admin.py startproject includes

Re: 1.1.2

2010-03-10 Thread brad
Thanks both. We'll use the 1.1 branch head then On Mar 11, 4:22 pm, James Bennett wrote: > On Wed, Mar 10, 2010 at 9:16 PM, brad wrote: > > When can we expect a release of 1.1.2? Specifically I'm hoping to get > > a test bug fixed -http://code.djangoproject.com/ticket/12720 > > Barring unfores

Re: 1.1.2

2010-03-10 Thread James Bennett
On Wed, Mar 10, 2010 at 9:16 PM, brad wrote: > When can we expect a release of 1.1.2? Specifically I'm hoping to get > a test bug fixed - http://code.djangoproject.com/ticket/12720 Barring unforeseen circumstances, a 1.1.2 release will probably accompany the release of Django 1.2. In the meantim

Re: 1.1.2

2010-03-10 Thread Russell Keith-Magee
On Thu, Mar 11, 2010 at 11:16 AM, brad wrote: > Hi all > > When can we expect a release of 1.1.2? Specifically I'm hoping to get > a test bug fixed - http://code.djangoproject.com/ticket/12720 The most likely scenario is that we will cut 1.1.2 at the same time we cut 1.2-final. The exact date dep

1.1.2

2010-03-10 Thread brad
Hi all When can we expect a release of 1.1.2? Specifically I'm hoping to get a test bug fixed - http://code.djangoproject.com/ticket/12720 Thanks Brad -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django

Re: Multi Queryset one Paginator

2010-03-10 Thread felix
post the code that chains them together probably the problem is that paginator needs to slice the query set, and the chain you have isn't capable of doing that. either write a fancier chain that can count the length of both queries and then figure out how it has to slice them or do it in the vi

def reload(model): model.__dict__ = model.__class__.objects.get(pk=model.pk).__dict__ ; return model

2010-03-10 Thread Phlip
Djangoists: If I have a Frob model object, and I need it to reload itself out of the database (for example it's dirty and the DB is clean), I want reload(frob) -style convenience. This time, the sample code's so short it's in the Subject line. But is it healthy? Does Python support (or fail to p

Re: send_mass_mail()

2010-03-10 Thread CLIFFORD ILKAY
On 03/10/2010 06:22 PM, onoxo wrote: hi! I know about Mailman but i have to send unique mail to each user, kind of confirmation with system generated url. -- Regards, Clifford Ilkay Dinamis 1419-3266 Yonge St. Toronto, ON Canada M

Django query with related models

2010-03-10 Thread aurphir
For the below models: class Customer(models.Model): id = models.IntegerField(primary_key=True) class OrderA(models.Model): name = models.CharField(max_length=20) foo = models.FloatField() customer = models.ForeignKey(Customer) type = models.IntegerField() class OrderB(models.

Re: custom authentication for admin

2010-03-10 Thread David
If you are authenticating at the web server level (eg. HTTP Basic Auth) then you can use the RemoteUserMiddleware and RemoteUserBackend. http://docs.djangoproject.com/en/dev/howto/auth-remote-user/ If you aren't, you probably need to duplicate what they're doing except authenticating against a re

Re: hi help regarding sharding

2010-03-10 Thread David
Chiranjeevi, You might try looking at Django's multidb support if you are using Django 1.2. I don't want to say it has built-in sharding support, but it will probably make life easier. http://docs.djangoproject.com/en/dev/topics/db/multi-db/#an-example In general, you'll probably be writing a cu

Re: send_mass_mail()

2010-03-10 Thread felix
I have a site that sends 40k in a day. take a look at http://code.google.com/p/django-mailer/ I'm using that, though I've now modified it and not had a chance to release my version. mails are put into a queue and the queue is fed by a background daemon loop I've added html support and actually

Re: send_mass_mail()

2010-03-10 Thread onoxo
@CLIFFORD ILKAY how did you handle so much mails? On Mar 11, 12:22 am, onoxo wrote: > hi! > > I know about Mailman but i have to send unique mail to each user, kind > of confirmation with system generated url. > > On Mar 11, 12:16 am, CLIFFORD ILKAY > wrote: > > > > > On 03/10/2010 02:19 PM, ono

Re: send_mass_mail()

2010-03-10 Thread onoxo
hi! I know about Mailman but i have to send unique mail to each user, kind of confirmation with system generated url. On Mar 11, 12:16 am, CLIFFORD ILKAY wrote: > On 03/10/2010 02:19 PM, onoxo wrote: > > > how much mails can i send with send_mass_mail() > > i have like 7000 users and i have send

Re: send_mass_mail()

2010-03-10 Thread CLIFFORD ILKAY
On 03/10/2010 02:19 PM, onoxo wrote: how much mails can i send with send_mass_mail() i have like 7000 users and i have send mail to all of them. I've done large mailshots before. It's not fun if you don't have some method of bounce handling because even if you have a very clean list, with a l

Re: Thread safe language switching?

2010-03-10 Thread Jens Rantil
Hi Michal, I'm not sure, but I would write the verbose names manually for each field, wrapping each string inside a ugettext(...) function call like so: class Poll(models.Model): ... field = models.CharField(ugettext("My verbose name"), max_length=40) ... Thay way I could just use the norma

Re: ValueError, The view django_bookmarks.bookmarks.views.user_page didn't return an HttpResponse object.

2010-03-10 Thread Daniel Roseman
On Mar 8, 4:24 pm, Naveen Reddy wrote: > def user_page(request, username): >     try: >         user = User.objects.get(username=username) >     except: >             raise Http404('Requested user not found.') >         bookmarks = user.bookmark_set.all() >         template = get_template('user_p

Re: send_mass_mail()

2010-03-10 Thread onoxo
thanks! i'm talking with people from webfaction about smtp limit, i'll post result... On Mar 10, 9:04 pm, Jirka Vejrazka wrote: > > how much mails can i send with send_mass_mail() > > i have like 7000 users and i have send mail to all of them. > > Hi, > >   I have never used it myself, but a qui

Re: Filtering by another object's ManyToMany properties

2010-03-10 Thread Daniel Roseman
On Mar 10, 10:38 pm, Laereom wrote: > I have two models, we'll call them 'Question' and 'Search'. > > Search has a many to many field called 'questions' which contain, > naturally, a set of questions. > > I want to retrieve a Question which is associated with a particular > Search through that man

Re: How to use pre-built HTML forms in Django

2010-03-10 Thread esatterwh...@wi.rr.com
I would build a form using the forms library - subclass forms.Form and let django do the validation for you and return the errors. Once you have that bit in place, you can add your javascript enhancements and logic ontop of it. if need js funcionality for specific fields that Django doesn't suppl

Re: Filtering by another object's ManyToMany properties

2010-03-10 Thread Nick
try search__questions.id the __ spans the many to many relationship On Mar 10, 4:38 pm, Laereom wrote: > I have two models, we'll call them 'Question' and 'Search'. > > Search has a many to many field called 'questions' which contain, > naturally, a set of questions. > > I want to retrieve a Que

Re: overriding saving fails in loop

2010-03-10 Thread Ali Rıza Keleş
El mié, 10-03-2010 a las 17:28 -0500, Shawn Milochik escribió: > I think you missed my point, or I explained it badly. > > 1. In makeOrder, change i.save() to i.save(reorder = False). > > 2. Change the save function to something like the following > (untested): > > def save(self, *args, **kwargs

Filtering by another object's ManyToMany properties

2010-03-10 Thread Laereom
I have two models, we'll call them 'Question' and 'Search'. Search has a many to many field called 'questions' which contain, naturally, a set of questions. I want to retrieve a Question which is associated with a particular Search through that many to many field. It seemed straightforward -- I

Re: if statement with url

2010-03-10 Thread Nick
Just pop this into your template: {% url Path.to.a.view.for.this.template as the_url %} # you are importing a view's url structure right here and then storing it as "the_url". Since you're not looking for anything dynamic we can end that definition here (more here http://docs.djangoproject.com/en

Re: why is __exact filter really doing an inexact match?

2010-03-10 Thread Margie Roginski
Ah yes - I am using mysql. Thanks for that pointer. Margie On Mar 10, 1:34 pm, Karen Tracey wrote: > Are you using MySQL? See the note about MySQL here: > > http://docs.djangoproject.com/en/dev/ref/models/querysets/#exact > > Karen -- You received this message because you are subscribed to th

Re: overriding saving fails in loop

2010-03-10 Thread Shawn Milochik
I think you missed my point, or I explained it badly. 1. In makeOrder, change i.save() to i.save(reorder = False). 2. Change the save function to something like the following (untested): def save(self, *args, **kwargs): do_ordering = kwargs.pop('reorder', True) super(Subject, s

SNIPPET: assert_model_changes(record, 'field', 41, 42, lambda: money_line())

2010-03-10 Thread Phlip
Djangoids: This is from Cuker's fork of django-test-extensions: def assert_model_changes(self, mod, item, frum, too, lamb): source = open(lamb.func_code.co_filename, 'r').readlines() [lamb.func_code.co_firstlineno - 1] source = source.replace('lambda:', '').strip() mod

Re: overriding saving fails in loop

2010-03-10 Thread Ali Rıza Keleş
El mié, 10-03-2010 a las 15:37 -0500, Shawn Milochik escribió: > Every time you save(), you call makeOrder(). Every time you run > makeOrder(), you call save(). You've introduced an infinite loop. > Well, infinite until Python decides enough is enough. > Yes right. But I need to reorder them all

Re: Generic create_update with inline many-to-many

2010-03-10 Thread Beres Botond
Please copy and paste here the Model definitions for Recept, ingredient and 'verhouding' (I'm assuming this is explicitly defined, given the non-standard name) On Mar 10, 11:07 am, Marout wrote: > Hi there, > > I'm relatively new tio django and I can't get to grips with my many-to-many > relation

Re: ModelAdmin

2010-03-10 Thread Beres Botond
You cannot directly register a form with admin, you should be registering models from myapps.forms import MyModelForm from myapps.models import MyModel class MyModelAdmin(admin.ModelAdmin): form = MyModelForm admin.site.register(MyModel, EmailAdmin) Also the form should be a ModelForm for

Re: overriding saving fails in loop

2010-03-10 Thread Beres Botond
Or more specifically, why exactly do you want to reorder them all at every Subject .save()? And what exactly do you use the values in 'order' field for? On Mar 10, 11:46 pm, Beres Botond wrote: > Even if we ignore the infinite loop, selecting and updating every > single instance of Subject at eve

Re: overriding saving fails in loop

2010-03-10 Thread Beres Botond
Even if we ignore the infinite loop, selecting and updating every single instance of Subject at every save() of a Subject, is horribly wrong and inefficient on many levels. Exactly what kind of functionality/logic were you trying to implement? On Mar 10, 10:32 pm, Ali Rıza Keleş wrote: > Hi all,

Re: if statement with url

2010-03-10 Thread HARRY POTTRER
maybe try request.path? On Mar 10, 1:51 pm, Daxal wrote: > Hey, > > I wanted to use a if statement with a url like ... > > if you are on "/cm/add/" > .. > endif > . > option 1: > I was wondering if anyone knows how to code that statement. if can > compare string variables like {% ifequal some

Re: templates?

2010-03-10 Thread Jirka Vejrazka
> DJANGO_SETTINGS_MODULE=C:/django/Django-1.1.1/djangotest/mysite/settings Oops - I take it back (it's been a long day). You need to supply Python path, i.e just "mysite.settings" if you PYTHONPATH is already set to PYTHONPATH=C:\django\Django-1.1.1\djangotest and mysite is a directory there.

Re: templates?

2010-03-10 Thread Jirka Vejrazka
Hi Nadeesh, you need to use forward slashes, even on Windows (or double-backslashes). So, changing to: DJANGO_SETTINGS_MODULE=C:/django/Django-1.1.1/djangotest/mysite/settings might solve your problem, assuming everything else is OK. Cheers Jirka -- You received this message becaus

Re: why is __exact filter really doing an inexact match?

2010-03-10 Thread Karen Tracey
Are you using MySQL? See the note about MySQL here: http://docs.djangoproject.com/en/dev/ref/models/querysets/#exact Karen -- 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 u

Re: why is __exact filter really doing an inexact match?

2010-03-10 Thread Shawn Milochik
What database are you using? 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-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For

Re: need help in multi db

2010-03-10 Thread Jirka Vejrazka
Hi Silaja, first, I'm going to guess that no one will be able to solve your problem. There are multiple reasons for it: - Multiple database support is in Django 1.2. You insist on using it on Django 1.1, without mentioning why you can't upgrade (the upgrade would make sense for any reader not

why is __exact filter really doing an inexact match?

2010-03-10 Thread Margie Roginski
When I do a filter like this Task.objects.filter(name__exact="test") I seem to be getting an inexact match. IE, I get tasks whose name is "test" as well as tasks whose name is "Test". Same thing if I do: Task.objects.filter(name="test") For example: (Pdb) for t in Task.objects.filter(name__

Re: ifequal issue

2010-03-10 Thread wolle
Hi Tom, really cool idea, but it does not work... -- Bitte Berufsgruppe wählen -- {% for item in berufe %} {{item.name}} {% endfor %}

Re: Testing if a file has changed while saving the class

2010-03-10 Thread Beres Botond
Just a quick idea off the top of my head before going to bed :) def save(self, *args, **kwargs): super(MyModel, self).save(*args, **kwargs) # Call the "real" save() method. timestamp = os.path.getmtime(self.my_image_field.path) if datetime.datetime.now() - timestamp < VERY_

templates?

2010-03-10 Thread Nadeesh Kumar
I've setup an environmental variable DJANGO_SETTINGs_MODULE=C:\django\Django-1.1.1\djangotest\mysite\settings and PYTHONPATH=C:\django\Django-1.1.1\djangotest I also edited the registry key value for PYTHONPATH I've got these errors. Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001

Re: overriding saving fails in loop

2010-03-10 Thread Shawn Milochik
Every time you save(), you call makeOrder(). Every time you run makeOrder(), you call save(). You've introduced an infinite loop. Well, infinite until Python decides enough is enough. One simple possibility is to add an optional argument with a default of True to the save() override that determ

overriding saving fails in loop

2010-03-10 Thread Ali Rıza Keleş
Hi all, I want to override saving of one of my models. After saving any record, I am trying to reorder them all. class Subject(models.Model): slug = models.SlugField(db_index=True, unique=True) name = models.CharField(max_length="120") order = models.CharField(blank = True, max_leng

ModelAdmin

2010-03-10 Thread Praveen
Hi I have one form in forms.py class EmailForm(forms.Form): recipient = forms.CharField(max_length=14, min_length=12, widget=forms.TextInput(attrs=require)) message = forms.CharField(max_length=140, min_length=1, widget=forms.Textarea(attrs={'cols': 30, 'rows': 5})) and my site url is adm

unique_together - related Model field.

2010-03-10 Thread Daniel S
#models.py class Item(models.Model): parte = models.ForeignKey('Parte') cantidad = models.PositiveIntegerField() class Parte(models.Model): num_parte = models.CharField(max_length=14, primary_key=True) descripcion = models.CharField(max_length=40, blank=True) class Item_Carrito(mo

Re: ModelForm+datepicker

2010-03-10 Thread Shawn Milochik
The widget has nothing to do with the model. It needs to be specified in your forms.Form or forms.ModelForm. Remember that the model is all about the database table and the form is all about the HTML form. Shawn -- You received this message because you are subscribed to the Google Groups "Dj

Re: ModelForm+datepicker

2010-03-10 Thread H . İbrahim Yılmaz
Hi, I've already checked that and i got nothing :) I did in my model.py that: from django.forms.extras.widgets import SelectDateWidget date = forms.DateField(widget=SelectDateWidget()) But did not see the datepicker :S I got name error (forms) blabla? Is there any complete reference for "how to in

Re: send_mass_mail()

2010-03-10 Thread Jirka Vejrazka
> how much mails can i send with send_mass_mail() > i have like 7000 users and i have send mail to all of them. Hi, I have never used it myself, but a quick glance at the source code does not show any reason why this would not work. However, keep two things in mind: - the emails are first al

send_mass_mail()

2010-03-10 Thread onoxo
how much mails can i send with send_mass_mail() i have like 7000 users and i have send mail to all of them. thanks, vedran -- 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 un

Re: need help in multi db

2010-03-10 Thread lakshmi silaja
Hi avinash thanks for ur reply.. i want that in Django1.1.1 as specified in this link http://www.eflorenzano.com/blog/tag/multiple-databases/ i think there is one way to get multiple db concept in django 1.1.1. but i cont able to get the right way to do. if u know please reply. thank u. On Thu,

Re: need help in multi db

2010-03-10 Thread Avinash Prasad
Hi silaja, The best place to get a clear idea is to go to http://www.djangoproject.comand look for its documentation under multiple databases section. The support for multiple databases is there only in django's latest version. In settings.py file the DATABASES dictionary now has multiple keys wher

if statement with url

2010-03-10 Thread Daxal
Hey, I wanted to use a if statement with a url like ... if you are on "/cm/add/" .. endif . option 1: I was wondering if anyone knows how to code that statement. if can compare string variables like {% ifequal somevariable url %} where "url" can be hard coded like "/cm/add" and somevariable w

Re: need help in multi db

2010-03-10 Thread lakshmi silaja
hi swawn, thanks for ur reply. i tried in django2.1. but i want that in Django 1.1.1. i tried as shown in this url. http://www.eflorenzano.com/blog/tag/multiple-databases/ but i dont want to do like that. i want to seperate tables. i.e some of rows in some "x" table in one database and some of rows

entering text+images into a textfield

2010-03-10 Thread HARRY POTTRER
I have a project where I'm taking a bunch of articles originally written for a on a tripod page, and putting them into a database so they can be served up by django. Right now I have it all set up and working, but theres one problem. A lot of these articles are very image heave. Each one has an av

Re: tutorial --> deploy snag

2010-03-10 Thread John Griessen
John Griessen wrote: Next, I'm looking for why in my settings.py TEMPLATE_DIRS = ( "/home/john/djangotemplates" ) is not being used. I found the trouble and fixed already -- That above wasn't a good descr. of the symptom: /home/john/djangotemplates is not on the python path, but is inthe

Re: need help in multi db

2010-03-10 Thread Shawn Milochik
Go to google.com. Search for this: multi-database support in django You will find that the first result is from a page on code.djangoproject.com which directly discusses this and links to the usage documentation. Note that this feature is currently in beta, and will be officially released as p

Re: tutorial --> deploy snag

2010-03-10 Thread Daniel Roseman
On Mar 10, 6:11 pm, John Griessen wrote: > Joakim Hove wrote: > >> What have I left out of this Virtualhost configuration? > >    Alias /media/ "/usr/local/django/django/contrib/admin/media/" > > HTH - Joakim > > Thanks Joakim, > > I found the corresponding place on my debian system and got admin

Re: dotted path name requirements for WSGI os.environ['DJANGO_SETTINGS_MODULE'] =

2010-03-10 Thread John Griessen
Daniel Roseman wrote: On Mar 10, 3:44 pm, John Griessen wrote: Is this line OK? os.environ['DJANGO_SETTINGS_MODULE'] = 'industromatic.com.settings' The DJANGO_SETTINGS_MODULE setting is a Python module, so it must be a valid Python path. "industromatic.com" is already not a valid Python na

need help in multi db

2010-03-10 Thread lakshmi silaja
Hi, i'm silaja, in my django project i want to work with multiple database. i'm new to django. if any one know about multiple databases concept please reply me. even u have any links regarding this concept please reply. thank you. -- You received this message because you are subscribed to the Goo

Re: tutorial --> deploy snag

2010-03-10 Thread John Griessen
Joakim Hove wrote: What have I left out of this Virtualhost configuration? Alias /media/ "/usr/local/django/django/contrib/admin/media/" HTH - Joakim Thanks Joakim, I found the corresponding place on my debian system and got admin templates. Next, I'm looking for why in my settings.

Re: dotted path name requirements for WSGI os.environ['DJANGO_SETTINGS_MODULE'] =

2010-03-10 Thread Daniel Roseman
On Mar 10, 3:44 pm, John Griessen wrote: > I am serving up sites named after their domains with .com in the name > but when I saw the os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings' > specified in tutorials it seemed like putting a .com might be interpreted > wrong. > > Can the WSGI file

Re: ModelForm+datepicker

2010-03-10 Thread Shawn Milochik
Here you go: http://docs.djangoproject.com/en/1.1/ref/forms/widgets/ (Try searching http://docs.djangoproject.com/ before Google. It's really a great reference.) Shawn -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, s

Re: django+modelform+Foreignkey

2010-03-10 Thread H . İbrahim Yılmaz
Thanks! "It Works!" ;) 2010/3/7 Kev Dwyer : > On Sat, 06 Mar 2010 23:39:59 +0200, Arkeoloji.web.tr wrote: > >> Hi all, >> I have some ModelForms.. This ModelForms based some ForeignKey included >> models. When i want to create a ModelForm I got these ForeignKey fields >> something like (in a dropdo

ModelForm+datepicker

2010-03-10 Thread H . İbrahim Yılmaz
Hi I have some ModelForm. I want to use in my templates (or views not sure cause i am a newbie) date selector. I search about that in google but there is not very clear information. Some of thems were for old old versions of dango. Regards... -- http://www.arkeoloji.web.tr -- You received this

Re: tutorial --> deploy snag

2010-03-10 Thread Joakim Hove
> What have I left out of this Virtualhost configuration? Warning: This is a the very limit of my understanding of Django; but I have the following section in my apache configuration file; I see you have already aliased media to point somewhere else. Alias /media/ "/usr/local/django/django/c

Re: making query using filter()

2010-03-10 Thread Nick
Sounds like what you want is something like: MyCategories = Category.objects.exclude(name!='mycateogry') only problem is, django doesn't support the != operator so you're going to have to go with a query object: add this to your view from django.db.models import Q (importing the Q object http:/

Re: django-test-coverage gcc error

2010-03-10 Thread Karen Tracey
On Wed, Mar 10, 2010 at 11:13 AM, filias wrote: > I am trying to use a test coverage tool for django. > > I tried http://pypi.python.org/pypi/django-test-coverage/0.1. First > with easy_install and after with setup.py install and I get the > following error stack: > > Searching for django-test-co

Re: ifequal issue

2010-03-10 Thread Bill Freeman
On Wed, Mar 10, 2010 at 11:13 AM, Tom Evans wrote: > {% ifequal item.id|stringformat:"s" berufe_id %} Cool. I spend my filter investigation time looking for one that would convert berufe_id to an int (no joy). -- You received this message because you are subscribed to the Google Groups "Djan

django-test-coverage gcc error

2010-03-10 Thread filias
I am trying to use a test coverage tool for django. I tried http://pypi.python.org/pypi/django-test-coverage/0.1. First with easy_install and after with setup.py install and I get the following error stack: Searching for django-test-coverage Best match: django-test-coverage 0.1 Processing django_

Re: ifequal issue

2010-03-10 Thread Tom Evans
On Wed, Mar 10, 2010 at 3:37 PM, Bill Freeman wrote: > That would be my guess.  I presume that item.id is an int, so it's > likely that you're passing berufe_id as a string.  All the stuff that > comes from the GET or POST attributes or request, and any > arguments garnered by the url pattern are

Re: How can I manually use RelatedFieldWidgetWrapper around a custom widget?

2010-03-10 Thread justind
Hello, I have this working now, but it seems so convoluted I know it must be backwards or just plain dumb. I hope someone comes along and shows me how easy this is. First, I add the admin_site to the form field of my ModelAdmin object class ResourceAdmin(admin.ModelAdmin): form = EasyResourc

dotted path name requirements for WSGI os.environ['DJANGO_SETTINGS_MODULE'] =

2010-03-10 Thread John Griessen
I am serving up sites named after their domains with .com in the name but when I saw the os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings' specified in tutorials it seemed like putting a .com might be interpreted wrong. Can the WSGI file os.environ['DJANGO_SETTINGS_MODULE'] = deal with a d

Re: tutorial --> deploy snag

2010-03-10 Thread John Griessen
Joakim Hove wrote: Hello, I __think__ you must add the path industtromatic_com in your wsgi settings file, i.e. something like: import sys sys.path.append( "/home/john/WEBprojects/industromatic_com" ) Yes, adding the dir above project and project dir to the sys.path let apache2 function to se

Re: ifequal issue

2010-03-10 Thread Bill Freeman
That would be my guess. I presume that item.id is an int, so it's likely that you're passing berufe_id as a string. All the stuff that comes from the GET or POST attributes or request, and any arguments garnered by the url pattern are strings. If you're not converting it yourself, berufe_id will

Re: ifequal issue

2010-03-10 Thread wolle
Already tried this several times. Here is a result of your code item.id = 1 with berufe_id = 1 item.id = 2 with berufe_id = 1 Not sure if this a type (int vs. string) error? On Mar 10, 4:18 pm, Bill Freeman wrote: > Try adding code to render the values that you are trying to compare, > so that

Re: ifequal issue

2010-03-10 Thread Bill Freeman
Try adding code to render the values that you are trying to compare, so that you can see in what way they are not equal. They it will probably become obvious in what way the conversion through the GET or POST data and view isn't quite what you want. E.g.; before the select: berufe_id: {{ berufe_

Re: Django editor for Debian

2010-03-10 Thread Shawn Milochik
I did a little looking into this, and it seems like SPE (Stani's Python Editor) is the best pick for Ubuntu. It has been around for years and has remained popular. It's also specifically designed (obviously) for Python. Shawn -- You received this message because you are subscribed to the Googl

ifequal issue

2010-03-10 Thread wolle
Hi everybody, I have a question on the ifequal template tag. I have an HTML select where people can filter the database entries. On change of the selection I reload the page (new URL) and filter the results. I append the selected value from the option to the request (as berufe_id) and want to pre

Re: Django editor for Debian

2010-03-10 Thread Abdel Bolaños Martí­nez
Can i suggest you? Eclipse + Aptana + Pydev In the company i work for, our developer team has acquired very good results Paul Menzel wrote: Dear Nicolae, Am Dienstag, den 15.12.2009, 23:58 -0800 schrieb NMarcu: Can you tell me a good Django editor for Debian? Something more pretty t

Re: Django editor for Debian

2010-03-10 Thread Paul Menzel
Dear Nicolae, Am Dienstag, den 15.12.2009, 23:58 -0800 schrieb NMarcu: >Can you tell me a good Django editor for Debian? Something more > pretty then default text editor. Something to can edit templates also. what did you end up with? Thanks, Paul signature.asc Description: Dies ist ein

Re: Not able to view the admin page through the browser

2010-03-10 Thread Newbie
Found the problem missed to specify the admin entry in INSTALLED_APPS variable in the settings.py file Thanks for the help. On Mar 9, 8:01 pm, Shawn Milochik wrote: > Something is broken in your code. If you set DEBUG = True, you'll find > out what. But since it's False, it is hiding that info

Re: Not able to view the admin page through the browser

2010-03-10 Thread Newbie
Set the Debug=True and got the error as TemplateDoesNotExist at /admin/ What is the reason? On Mar 9, 8:01 pm, Shawn Milochik wrote: > Something is broken in your code. If you set DEBUG = True, you'll find > out what. But since it's False, it is hiding that information for > security reasons.

Re: circular import in two models.py

2010-03-10 Thread rebus_
On 10 March 2010 11:31, Viktor wrote: > Hi, > > I have two django applications, an issue tracker where an Issue is > related to a Partner > and a Partner model where partners can be grouped, etc > I would like to add an issue to every group to provide an easy > messaging for groups, so I don't hav

Re: making query using filter()

2010-03-10 Thread rebus_
On 10 March 2010 12:06, jimgardener wrote: > Hi > I need to make a query as follows > Select all entries where categories=mycategory > > In the db there are entries and categories as follows > Category.objects.all() -->[ , hiscategory>,] > > MyEntry.objects.all() --> [ , [u'mycategory',u'hiscateg

Re: Newbie question: upgrade to python 2.6: cannot (re)connect to Django?

2010-03-10 Thread BobAalsma
YES! Thank you very much. Amazing how simple things can be blocking if the context is missing ;-) Regards, Bob On Mar 10, 11:12 am, Jirka Vejrazka wrote: > Hi Bob, > > > MacPro1:Downloads$ ls > > Django-1.1.1.tar > >   You have not unpacked the Django archive. You need to run: > $ tar xf Django

making query using filter()

2010-03-10 Thread jimgardener
Hi I need to make a query as follows Select all entries where categories=mycategory In the db there are entries and categories as follows Category.objects.all() -->[ ,,] MyEntry.objects.all() --> [ ,, ] I tried like this mycategory=Category.objects.get(name='mycategory') MyEntry.objects.filter

hi help regarding sharding

2010-03-10 Thread chiranjeevi muttoju
Hi, i want to use *Sharding* concept in for my project. i requirement is, i have one user model, and i want to save users by selecting the random databases. ie. i have two tables db1 and db2, in both databases i have user table. based on the userid i want to select the database in which that user o

Re: is it uses the memcache..?

2010-03-10 Thread chiranjeevi muttoju
ok janusz thanks for ur reply. On Wed, Mar 10, 2010 at 3:56 PM, Janusz Harkot wrote: > Django documentation is very clear in this matter. > > All standard cache functions/decorators are using cache backend > specified in the settings, > defaults to local memory, with an option to use memcache. >

circular import in two models.py

2010-03-10 Thread Viktor
Hi, I have two django applications, an issue tracker where an Issue is related to a Partner and a Partner model where partners can be grouped, etc I would like to add an issue to every group to provide an easy messaging for groups, so I don't have to write the message sending logic again could so

  1   2   >