Re: Django3 runserver error

2020-07-30 Thread Thierry DECKER
The resolve() method dose not have the strict parameter anymore. Regards Le jeu. 30 juil. 2020 à 11:25, Mira a écrit : > Hi All, > I recently upgraded Django from 2.2 to 3 on my MacOS10.13. > I am using Python 3.6 and My Application was working fine with Django 2.2 > but now i am getting below

Model uniqueness constraint with date extraction

2020-02-18 Thread Thierry Backes
Hey, I have a model which has a date and a foreign key field. I want a uniqueness constraint that each fk can only be used once per month, so Unique(date__year, date__month, fk). However, when I use this in my model’s metadata: models.UniqueConstraint(fields=['date__year', 'date__month',

Using Django as dependency in an API

2015-09-17 Thread Thierry
or define the database backend for a module. Cheers, Thierry. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@google

Re: use apache instead of server by default

2015-02-10 Thread Thierry Granier
peraps but i have no choice and i must use apache. I don't understand the different docs tu use apache. Help please Thanks Le dimanche 8 février 2015 23:20:31 UTC+1, Thierry Granier a écrit : > > Hello > > i have installed python3.4 and django1.7 on debian jessie. > > runserve

use apache instead of server by default

2015-02-08 Thread Thierry Granier
Hello i have installed python3.4 and django1.7 on debian jessie. runserver works with mysql-connector and mysql databases. I'd like to use apache instead of this server. So i have installed via sysaptic the module libapache2-mod-wsgi why can't i install my website root in the document/root of

Re: Multiple TaggableManager() on model [django-taggit]

2013-06-27 Thread Thierry Ballzac
This solution did the business for me nicely! https://neutron-drive.appspot.com/blog/multiple-tags On Tuesday, July 17, 2012 12:52:55 PM UTC+1, Alir3z4 wrote: > > Hi > This question is about having more than one > taggit >

Transifex - django 1.3

2010-12-20 Thread Thierry
Whats the best way to currently setup transifex with django 1.3 The announcement says that people are working on this. Dont want to duplicate their efforts, where can i find information on this? -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: Problem in Django App Part 1 Tutorial

2010-06-16 Thread Thierry
I noticed you are importing your project name, are you invoking your "python manage.py shell" from within your project folder? If you are, try the following: project_folder/python manage.py shell >>> from polls.models import Poll >>> dir(Poll) The above should show you that

testing the comment framework using the test client

2010-05-25 Thread Thierry
How do you guys test implementations of the django comment framework? A regular post doesnt seem to work because it depends on data from a previous get. An thoughts? def test_comment(self): item_url = reverse('item', args=['4558']) self.client.login(username=self.username,

Ordering a QuerySet by a Python property ?

2010-05-19 Thread thierry
Hi all, The order_by method makes possible to sort objects relatively to a specified field. But how can I sort a QuerySet relatively to a Python property ? Thanks, Thierry. -- You received this message because you are subscribed to the Google Groups "Django users" grou

Re: Specifying an order_with_respect_to for a self referential one to many relationship (still) fails

2010-05-11 Thread thierry
This bug is 4 years old. Weird that It was not corrected yet because it seems to be a core functionality of the ORM. Do django developpers have planned something before 1.2 stable release ? Regards, Thierry. -- You received this message because you are subscribed to the Google Groups "D

Re: Subclassing models.Model to extend base functionalities and attributes

2010-05-11 Thread thierry
it forces directly to a database model inheritance. Consequently, I will abadon this way and focus on signal dispatcher because it seems possible to trigger homemade functions happening before or after models.Model methods execution. But I stay tuned if somebody has got a solution. Regards

Subclassing models.Model to extend base functionalities and attributes

2010-05-07 Thread thierry
, Thierry. -- 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 more options, visit

Django ORM and multidimensional data

2010-05-07 Thread thierry
the scientific community where Python and databases are more and more popular to store experimental and analyses data. Thanks, Thierry. -- 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...@google

Specifying an order_with_respect_to for a self referential one to many relationship (still) fails

2010-05-07 Thread thierry
Hi all, I'd like to know if this problem, described in this post http://www.google.com/url?sa=D=http://groups.google.com/group/django-updates/browse_thread/thread/e247ff8079eda192=AFQjCNHKyZDdY0P7z3TnSKg92GnTnlNz0Q, will be solved in the next stable release of Django. Thanks. -- You received

Re: code repetition in views

2010-04-18 Thread Thierry Chich
leware. This works if you really want to do the same thing for EVERY page. Carl On Apr 10, 11:38 pm, Thierry Chich<thierry.ch...@gmail.com> wrote: I have written my functions as méthods of classes. Then it allow to use inheritance. Le 11 avr. 2010 à 05:58, ydjango<neerash...@gmail.com&g

Re: how to install django in ubuntu .........

2010-04-18 Thread Thierry Chich
What is the point ? Why aren't you using the apt-get ? Le 16 avr. 2010 à 23:38, ChrisR a écrit : Download this: http://www.djangoproject.com/download/1.1.1/tarball/ or wget http://www.djangoproject.com/download/1.1.1/tarball/ tar xzvf Django-1.1.1.tar.gz cd

Re: Request to the list owner

2010-04-12 Thread Thierry CHICH
> On Mon, Apr 12, 2010 at 1:58 PM, Omer Barlas wrote: > > Can you please add a prefix to the email subject? I am reading my mail > > mostly from my BB Bold, but I cannot filter mail like Thunderbird > > does, it would be much simpler if there was a prefix like [django] or

Re: code repetition in views

2010-04-11 Thread Thierry Chich
I have written my functions as méthods of classes. Then it allow to use inheritance. Le 11 avr. 2010 à 05:58, ydjango a écrit : I find all my view method have identical code in start and in end: anyway to avoid repetition...? Example: def

Re: set up database engine

2010-04-08 Thread Thierry Chich
, yangyang <juz...@gmail.com> a écrit : Hi Thierry, Thanks for the reply. I understand what SQLight is but I don't know how to write the code in my Mac shell... This is what I wrote: yang-wangs-computer:~/applications/mysite yangwang$ database_engine='sqlite3' yang-wangs-computer:~/applications/

Re: set up database engine

2010-04-08 Thread Thierry CHICH
Perhaps are you confused because of SQLlite. You need to know that SQLite is not a classical database with a server that you need to install. An sqlite database is only a file stored where do you want. Thierry > I mean the tutorial only tells you "edit settings" but doesn't t

Middlewares disable for specific views

2010-04-06 Thread Thierry
Is it possible to disable a middleware such as the authentication one for specific views where they are not needed? The constant querying for messages annoys me a bit :) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Tricky problem: database tables are not created

2010-04-05 Thread Thierry Chich
Is manage.py sqlall working ? Le 5 avr. 2010 à 14:03, Torsten Bronger a écrit : Hallöchen! Torsten Bronger writes: [...] But it gets even more strange: The models module of "chantal_ipv" imports models from "samples". I think this is the problem. If I

Re: Model inheritance foreign key user

2010-04-04 Thread Thierry Chich
You are right but it would not change his problem. If 2 or more classes inherit from a class with a foreignkey or a manytomany, there will be a conflict in the related name Le 4 avr. 2010 à 14:11, Daniel Roseman a écrit : On Apr 3, 10:37 pm, Fredrik

Re: Model inheritance foreign key user

2010-04-04 Thread Thierry Chich
could fit yours ?). Now it work with a simple authorization function applied on the queryset when i populate my forms. Thierry Fredrik On Apr 3, 10:48 pm, Thierry Chich <thierry.ch...@gmail.com> wrote: I think that if you want make inheritance it is because you want to

Re: Model inheritance foreign key user

2010-04-03 Thread Thierry Chich
. It is documented, but i don't remember where exactly. Thierry Le 3 avr. 2010 à 20:38, Fredrik <frecarl...@gmail.com> a écrit : Hi, I want to use it like this: """ class PersistentModel(models.Model): deleted = models.BooleanField(default = False) date_created =

User and additionnal fields

2010-04-02 Thread Thierry Chich
UtilisateurModelForm(UserModelForm,UtilisateurOnlyModelForm): pass This a little bit boring because it will avoid me to rewrite some of my generic model view if I could have all the data I need in just one Form. Is it a simple way to do that ? Thierry, -- You received this message becaus

Re: Chained select boxes--what's my best strategy?

2010-04-02 Thread Thierry Chich
. For instance, i use the powerfull plugin datatables in order to have sortable, paginable, themable and filterable tables. I never have to use Ajax for that. I just to put some configurations, give an id to my table, and it's enough. Thierry Le 2 avr. 2010 à 07:22, Daniel <unagi

Re: How do I properly unit test a Django session?

2010-03-31 Thread Thierry Chich
am explicitely using informations stored in a session. (However, I have searched a long time before I understand that some variables was set in the accounts/accueil/ page :-( ) Thierry -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: Initializing a ModelForm don't work - BUG ?

2010-03-29 Thread Thierry Chich
tting it by modifying the post > data. > > Peter > You would say : if i use an hidden form. If I exclude the field from my ModelFrom, a corrupted POST can not have an effect. I just have to set the field value in the model, and it is done, isn't it ? Thierry -- You received this m

Re: Using ModelForm to edit ManyToMany in both directions?

2010-03-29 Thread Thierry Chich
Nice idea ! It will simplify my work. Thanks to share it ! Le 28 mars 2010 à 22:29, "pjrhar...@gmail.com" a écrit : See this snippet: http://www.djangosnippets.org/snippets/1295/ Peter On Mar 27, 6:02 am, jwils2...@gmail.com wrote: I believe the answer is to

Re: Probably a very basic data modeling question

2010-03-28 Thread Thierry Chich
questions, you'll see that the conception of the django models is easy. Thierry Le 28 mars 2010 à 03:28, Daniel <unagimiy...@gmail.com> a écrit : Hi all, I'd appreciate it if you could help me out with something. I am trying to build a way to use faceted browsing through a da

Re: Initializing a ModelForm don't work - BUG ?

2010-03-27 Thread Thierry Chich
Le samedi 27 mars 2010 19:23:04, Daniel Roseman a écrit : > On Mar 27, 4:34 pm, Thierry Chich <thierry.ch...@gmail.com> wrote: > > I think I get the point. > > > > If I write > > obj=MyModel() > > obj.domaine=request.session.get("domaine

Re: Initializing a ModelForm don't work - BUG ?

2010-03-27 Thread Thierry Chich
ed in data=request.POST are overwriting my domaine field. It is really curious, because request.POST doesn't contain any reference to my field domaine It's look like a bug, isn't it ? Le samedi 27 mars 2010 15:54:53, Thierry Chich a écrit : > Le samedi 27 mars 2010 14:39:40, Thierry Chich a écrit :

Re: Initializing a ModelForm don't work

2010-03-27 Thread Thierry Chich
Le samedi 27 mars 2010 14:39:40, Thierry Chich a écrit : > Hello all > > I have a problem to understand something. I could find some workaround > easily, but I don't want it. I want to understand. > > So this if the situation. I have a modelForm (MyModelForm) that is b

Initializing a ModelForm don't work

2010-03-27 Thread Thierry Chich
m.is_valid(): form.save() If some of you have an idea, I would be thanksfull. Thierry -- 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 f

Re: New User - Writing your first Django app part 1 crashed

2010-03-27 Thread Thierry Chich
Are you sure that the postgres driver of your jython is installed ? Le 27 mars 2010 à 01:52, Paul Harouff a écrit : On Fri, Mar 26, 2010 at 6:26 PM, Karen Tracey wrote: On Fri, Mar 26, 2010 at 5:58 PM, Paul Harouff wrote: I

Re: Let Django form render field's with custom attributes (e.g CSS)?

2010-03-26 Thread Thierry
/lazy ways to customize attributes on a Field's , e.g for common CSS patterns where the automatically gets "required" or "error" CSS classes depending on the Field's validation options. On 26 mar, 15:28, David De La Harpe Golden <david.delaharpe.gol...@ichec.ie> wrote

Let Django form render field's with custom attributes (e.g CSS)?

2010-03-26 Thread Thierry
Hi, I want to differentiate CSS style of fields from the style of RadioSelects elements (as rendered through RadioFieldRenderer). Immediate action: I could create my RadioFieldRenderer/RadioInput classes to display inner labels as . But (and this is mostly my point of raising the issue), I was

Re: ForeignKeyField

2010-03-26 Thread Thierry Chich
Le vendredi 26 mars 2010 04:14:51, Asim Yuksel a écrit : > I have a question about model.ForeignKey field.Foreign key fields are > shown as object in admin page. How can I show them in other types like > integer type > for example I have a Model like this: > > class Advisor(models.Model): > >

Re: Altering the auth_user model?

2010-03-24 Thread Thierry Chich
Le mercredi 24 mars 2010 16:53:12, Sandman a écrit : > Hi Derek, > > One way to do this would be to create a proxy model that can be used > throughout your project. > > Check out > http://docs.djangoproject.com/en/dev/topics/db/models/#proxy-models for > more info. Hi, This is what is said in

Re: Forms with read only fields

2010-03-20 Thread Thierry Chich
rights, you could put a condition in the template I don't know if it answer to your question or if you think at something more complex. Thierry > Thanks & have a nice weekend > Peter > -- You received this message because you are subscribed to the Google Groups "Dja

Django javascript includes

2009-11-17 Thread Thierry
Other frameworks (Symfony) offer simple hooks for managing js includes. In Django its simply a line of template code. This is annoying for managing JS dependencies. Did anyone write a nice little framework for managing js? -- You received this message because you are subscribed to the Google

Re: Please help: {% url ... %} path resolve issue

2009-10-17 Thread Thierry
Hi, Could it be that you are missing trailing slashes in customer add/edit/ delete url patterns? E.g try: (r'^customer/(?P\d+)/edit/$', 'customer_edit'), instead of: (r'^customer/(?P\d+)/edit$', 'customer_edit'), Thierry. On 17 oct, 14:12, Gerard <lijss...@gp-net.nl> wrote: > H

How to attach managers to models (outside model definition)?

2009-10-17 Thread Thierry
any similar message request or any ticket filled in against documentation. Thierry. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@goo

Re: Complex annotated/aggregated QuerySet ?

2009-10-17 Thread Thierry
Thanks Javier, This is the perfect translation of the SQL I came up with. I was almost there, but just afraid of having to play with 'extra' and raw SQL. Thierry. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Complex annotated/aggregated QuerySet ?

2009-10-16 Thread Thierry
Hi, Considering the following models (simplified time-tracking app): - class Objective(models.Model): pass class Task(models.Model): status = models.IntegerField() objective = models.ForeignKey(Objective, related_name='tasks')

Re: QuerySet cache

2009-09-06 Thread Thierry
10:14 AM, Thierry<thierryschellenb...@gmail.com> wrote: > > > QuerySet cache is usually quite great. > > However when you are looping through a very large result set it would > > be great if I could turn it off. > > So here the question, how do I turn off t

QuerySet cache

2009-09-06 Thread Thierry
QuerySet cache is usually quite great. However when you are looping through a very large result set it would be great if I could turn it off. So here the question, how do I turn off the queryset cache? --~--~-~--~~~---~--~~ You received this message because you are

Re: Seamless integration of customized forms in my project

2009-08-18 Thread Thierry
You sold me on "this construction is unclear" and the "happy debugging" is scaringly convincing. I will stick with different classnames approach, with maintenance and portability (reusing apps) in mind. Thank you for your time. --~--~-~--~~~---~--~~ You received

Seamless integration of customized forms in my project

2009-08-18 Thread Thierry
I stick with custom class names and refer to them throughout my project instead? Thanks for any feedback, Thierry. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gro

How do I sort a ManyToManyField in Django admin?

2009-08-10 Thread Thierry
I currently have the following models: class Image(models.Model): alt_name = models.CharField(max_length=200) def __unicode__(self): return self.alt_name class Album(models.Model): images = models.ManyToManyField(Image, blank=True) class AlbumAdmin(admin.ModelAdmin):

Re: Django documentation site is SLOW

2009-08-08 Thread Thierry
Hi, Just wanted to add my own testimony: I too, noticed serious performance issues with Firefox when consulting Django documentation. So far it is the only website where I experience this. I am home, using Firefox 3.5.2 on Ubuntu 9.04 (officially installed package 'firefox-3.5'), and have

Re: Model field option "max_length" is not respected (Sqlite backend)?

2009-08-07 Thread Thierry
Indeed, I had been confused by this documentation excerpt ([1]): "CharField.max_length: The maximum length (in characters) of the field. The max_length is enforced at the database level and in Django's validation." Now your clear and quick explanation makes sense. Fortunately most of my data is

Model field option "max_length" is not respected (Sqlite backend)?

2009-08-07 Thread Thierry
Hi, I have a model roughly defined as such (FK fields do not appear for simplicity): class FieldChange(models.Model): old_value = models.CharField(max_length=50) new_value = models.CharField(max_length=50) Using SQLite, the table definition roughly translates to: CREATE TABLE

Improve the django-contrib webdesign helpers ... for developers?

2009-07-09 Thread Thierry
Hi, The "webdesign" django.contrib add-on [1] currently implements only 1 templatetag, supposed to help web designers. I think Django could benefit from built-in elements that could be useful to web developpers too, out of the box. Some disorganized ideas that lead me to write this message: *

Will future Django releases support multiple databases?

2009-06-25 Thread Thierry
Right now, Django doesn't seem to support the multiple databases on the same server or different servers. Will that feature be available out of the box for future releases? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Installing Django on Windows XP

2009-05-29 Thread Thierry
Try to unpack django from a directory with no white space in the name, for instance: C:\downloads\Django-1.0.2-final Make sure that you use a suitable unzip package. There is an issue with some version of winzip where empty __init__.py files are not extracted. On May 29, 12:54 pm, athick2

Re: MultiValueField with required=True problem

2009-05-18 Thread Thierry
Isn't required the default behaviour of Field: http://docs.djangoproject.com/en/dev/ref/forms/fields/ From the above code, TextInput is required: forms.TextInput(), On May 18, 1:15 pm, "[CPR]-AL.exe" wrote: > class CheckboxSelectWithTextInputWidget(forms.MultiWidget): >

Re: How to save the data from a form to my db.

2009-05-18 Thread Thierry
Check this example, but they are using a customized form for models: http://www.djangobook.com/en/2.0/chapter14/#cn176 If your form is not derived from your model, you'll want to explicitly create the model object: def yourview(request): if request.method == 'POST': form =

What's the recommended way to use ForeignKey?

2009-05-17 Thread Thierry
In the Django doc at http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.ForeignKey, it mentions explicitly specifying the application label in 1.0: class Car(models.Model): manufacturer = models.ForeignKey('production.Manufacturer') The above is using a string for the

How do I override __unicode__ for User?

2009-05-17 Thread Thierry
I currently have a blog model: class BlogPost(models.Model): title = models.CharField(max_length=150) body = models.TextField() author = models.ForeignKey(User) timestamp = models.DateTimeField() Right now, author is returning the default User.username. I have other models who

How do I override the __unicode__ of User?

2009-05-17 Thread Thierry
I currently have a blog model: class BlogPost(models.Model): title = models.CharField(max_length=150) body = models.TextField() author = models.ForeignKey(User) timestamp = models.DateTimeField() Right now, author is returning the default User.username. How can I customize the

Re: Form errors manipulation - autofill values in case of error

2009-05-13 Thread Thierry
I was able to get the user input back if there are errors but I have a customized form class which extends the UserCreationForm. I was following the example at: http://www.djangobook.com/en/2.0/chapter14/#cn176 You will notice that if the user inputs are not valid, the view re- initialize the

Re: Does the objects.get method automatically escape single quote?

2009-05-13 Thread Thierry
Thanks for the tip on the raw sql, I'll read the faq in more details. On May 13, 5:53 am, Daniel Roseman <roseman.dan...@googlemail.com> wrote: > On May 13, 2:25 am, Thierry <lamthie...@gmail.com> wrote: > > > My table has the following entry: > > > id    

Does the objects.get method automatically escape single quote?

2009-05-12 Thread Thierry
My table has the following entry: id name 1 foo's I'm currently trying the following: value = "foo's" MyModel.objects.get(name = value) The above is raising the exception DoesNotExist. Doesn't the get function automatically escape the single quote? Is there also a way to output

How do you handle apostrophe and spaces in dynamic url?

2009-05-12 Thread Thierry
I have a table with the following names: id name 1 Foo 2 Foo goo 3 Foo's goo I want to use the name to construct my url. I don't have a problem constructing Foo: localhost/foo But how am I supposed to handle "Foo goo" and "Foo's goo"? Will I need to create a 3rd

Re: How do I handle urls with different names?

2009-05-12 Thread Thierry
to the retrieving a pet by id? How is this kind of situation handle in some of the Django web application out there? On May 11, 11:00 pm, Mike Ramirez <gufym...@gmail.com> wrote: > On Monday 11 May 2009 07:35:37 pm Alex Gaynor wrote: > > > > > On Mon, May 11, 2009 at 10

How do I handle urls with different names?

2009-05-11 Thread Thierry
Let's say I have a pet table: TABLE: Pet id nametype -- 1 Plutodog 2 Foo cat 3 Goo fish I can access the pet page of each of the above by the following url: Pluto: localhost/pets/1/ Foo: localhost/pets/2/ Goo:

Re: Overriding save method in model

2009-05-06 Thread Thierry
conversion to Django. On May 6, 2:59 am, Daniel Roseman <roseman.dan...@googlemail.com> wrote: > On May 5, 10:15 pm, Thierry <lamthie...@gmail.com> wrote: > > > How can I set picture to the image extension?  I don't think > > "instance.picture = ext" works

Re: Overriding save method in model

2009-05-05 Thread Thierry
pm, Daniel Roseman <roseman.dan...@googlemail.com> wrote: > On May 5, 8:00 pm, Thierry <lamthie...@gmail.com> wrote: > > > > > I have the following model: > > > class Pet(models.Model): > >     name = models.CharField(max_length=64) > >

Overriding save method in model

2009-05-05 Thread Thierry
I have the following model: class Pet(models.Model): name = models.CharField(max_length=64) picture = models.ImageField(upload_to='/usr/django/images/') def save(self, force_insert=False, force_update=False): // override the picture values super(Pet,

How do I set a foreign key as a primary key?

2009-05-03 Thread Thierry
I have the following model: class Person(models.Model): person = models.ForeignKey(User) age = models.IntegerField() How can I set the above foreign key to be my primary key so that my Person table only contains two columns (person, age)?

urlconf {{ app }}/{{ view }}

2009-04-24 Thread Thierry
what if u want to have an urlconf as such /{{ app }}/{{ view }}/ so without specifying the view, it will dynamically load the app with the variable input and the view...? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

How do I exclude a list from my search?

2009-04-17 Thread Thierry
Can someone tell me the equivalent QuerySet for the following sql: select city_name from city where city_name not in ('Toronto', 'Richmond', 'Montreal') >From the python code, I will like to store the above 3 cities in a list. --~--~-~--~~~---~--~~ You received

Query exclude in and selective sort questions

2009-04-16 Thread Thierry
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.objects.exclude( Q(word_name = 'aaa') | Q(word_name = 'zzz')

Re: Target WSGI script cannot be loaded as Python module

2009-04-14 Thread Thierry
Hello world with import socket gave me the same issue. I just re- installed Python 2.6, more specifically 2.6.2 and everything is working fine, thanks for your help. On Apr 14, 10:25 pm, Graham Dumpleton <graham.dumple...@gmail.com> wrote: > On Apr 15, 12:07 pm, Thierry <lamthie.

Target WSGI script cannot be loaded as Python module

2009-04-14 Thread Thierry
I'm currently running Apache 2.2 on Windows and I can get the hello world of modwsgi to run. However, when I configure my Django project, Apache has the following errors from the error.log file: mod_wsgi (pid=5956): Target WSGI script 'C:/django_proj/mysite/apache/ mysite.wsgi' cannot be loaded

Clarifications for apps and models

2009-04-07 Thread Thierry
I'll be referring to the example in the Django documentation here. I will extend on the "books" application in the "mysite" project by creating a new app called "music" so that the structure looks like the following: mysite/ books/ models.py - Contains Publisher, Author, Book

template include and for loop speed

2009-03-06 Thread Thierry
the following use case {% for item in items %} {% with item.score as score %} {% include rating_small %} {% endwith %} {% endfor %} Using an include tag is very slow compared to pasting the included template here. My total template processing time goes up from 0.1 to 0.4

MultipleChoiceField initial data

2009-01-13 Thread Thierry
This doesn't seem to work: auto_open_choices = forms.MultipleChoiceField(choices=( ('google', 'Google'), ('msn', 'MSN'), ('yahoo', 'Yahoo')), required=False, initial=['google']) >From what i read in the discussions here it should... What am i doing wrong?

Re: order_with_respect_to fail any workaround ?

2008-12-23 Thread Thierry Stiegler
I answer django developpers (http://groups.google.com/group/django- developers/t/280bca5001faca07) so wait and see. On 6 déc, 09:34, Thierry Stiegler <thierry.stieg...@gmail.com> wrote: > Hello, > > I got some errors by using the Meta optionsorder_with_respect_to: >

Re: order_with_respect_to fail any workaround ?

2008-12-06 Thread Thierry Stiegler
Juste for precision I use the trunk. On Dec 6, 9:34 am, Thierry Stiegler <[EMAIL PROTECTED]> wrote: > Hello, > > I got some errors by using the Meta options order_with_respect_to: > > class Category(PublicationBase, LocalisationBase): >     ITEM_PER_PAGE = 12 >

order_with_respect_to fail any workaround ?

2008-12-06 Thread Thierry Stiegler
Hello, I got some errors by using the Meta options order_with_respect_to: class Category(PublicationBase, LocalisationBase): ITEM_PER_PAGE = 12 name = models.CharField(max_length=255) pictogram = models.ImageField(upload_to="categories", blank=True) old_id =

Django & referential integrity

2008-12-05 Thread Thierry
I noticed that Django handles all the referential integrity issues for delete statements at the Python/ORM level. - Is this documented anywhere? Furthermore I can't seem to find a switch to turn the whole ORM/python level referential stuff off. Is there a setting for this somewhere? (I prefer

orm syntax

2008-06-26 Thread Thierry
Is this possible and or is there any way to simulate it? objects.order_by('date').group_by('foreign_key').having('auto_done') --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

smart cache management

2008-06-17 Thread Thierry
Is there anything built into the cache system to manage the deletion/ invalidating of cache? All the examples seem to be based on setting a time. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

splitting up model definition, row level behaviour and table level behaviour

2008-06-15 Thread Thierry
Im looking to split the above mentioned in different files. Is there any howto on this topic? How have you implemented this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

django admin - list edit in place

2008-06-15 Thread Thierry
Im a looking for an admin mode to allow the staff to edit multiple items at once. An edit in place for the standard list view would be great. Or just a list of many forms would also do. Before i start building, is there anything like this available? Greetz, Thierry

Re: Url Patterns IE problem

2008-06-05 Thread Thierry Schork
I don't know if it's the correct way to deal with it, but adding a line ilke that one: ('','djangoshots.root.index'), into my urls.py allowed me to match an empty request to a specific controller. But, the drawback is that any invalid urls are matched by it too. Oh, and it need to be the last one.

Re: How to change Apache port? do I need to?

2008-06-03 Thread Thierry Schork
The "it works" message is, I believe, the sandard default page. Did you stopped/restarted apache after each modifications ? Because of it's nature, I don't think you can send a reload signal to apache on windows, so you need to stop/restart it after each modifications in the config file. The

Re: psql to postgres, IA prompt, how to create database?

2008-06-02 Thread Thierry Schork
On Mon, 2008-06-02 at 10:15 -0700, [EMAIL PROTECTED] wrote: > and how do i access or change password etc for this database later? > is there a turorial somewhere? > http://www.postgresql.org/docs/manuals/ http://www.postgresql.org/docs/8.0/interactive/sql-alteruser.html >From that last page:

Re: psql to postgres, IA prompt, how to create database?

2008-06-02 Thread Thierry Schork
\h before any command gives you the help: \h CREATE DATABASE Command: CREATE DATABASE Description: create a new database Syntax: CREATE DATABASE name [ [ WITH ] [ OWNER [=] dbowner ] [ TEMPLATE [=] template ] [ ENCODING [=] encoding ] [ TABLESPACE [=]

Re: How to change Apache port? do I need to?

2008-06-02 Thread Thierry Schork
Sorry, I'm a linux only user for the last 8 years. Apache don't have official front-end as far as I know, so you have to check with the package where your apache server came from. On Mon, Jun 2, 2008 at 5:06 PM, <[EMAIL PROTECTED]> wrote: > > also, i have a problem with the apache GUI on

Re: How to change Apache port? do I need to?

2008-06-02 Thread Thierry Schork
On Mon, Jun 2, 2008 at 5:03 PM, <[EMAIL PROTECTED]> wrote: > > so this: > "Note that if you choose to run Apache on port 8000, it will conflict > with the default port for the Django development/test server. Not > cool. " > > is not a problem as it is? No. It would only be a problem if you

Re: How to change Apache port? do I need to?

2008-06-02 Thread Thierry Schork
put exactly what you want. 80 is the default HTTP port. 443 is the default HTTPS 8080 is often used for the proxy, but as long as it don't conflict with another service on your server, you can put anything you want On Mon, Jun 2, 2008 at 4:55 PM, <[EMAIL PROTECTED]> wrote: > > in httpf.conf : >

Re: Apache file permission, wont let me edit file

2008-06-02 Thread Thierry Schork
You have to be the "root" user of the server to do that. Use the "su" command (or "sudo bash" if sudo is intalled) into a terminal and edit the file from the terminal. You probably try to edit the file from a normal user account, which have just a read permission to that file. On Mon, Jun 2,

Re: urls.py and adding an OR to the regexp

2008-05-28 Thread Thierry Schork
Not that I will integrate an URL matching like that one, but for the sake of the example (or is it exemple ?? I'm never sure...) > > On May 28, 3:15 am, "Thierry Schork" <[EMAIL PROTECTED]> wrote: > > > > It's simply an OR done into the matching. Taking the simpliest

Re: urls.py and adding an OR to the regexp

2008-05-28 Thread Thierry Schork
capture use "?:" to flag it > as non-grouping. So instead try: > > ^pric(?:e|es)/ Perfect ! Thank you very much Matt. Regards. Thierry. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Djan

urls.py and adding an OR to the regexp

2008-05-28 Thread Thierry
capture, as it seems. I know that I still can go the dumb way ^price/ ^prices/ but if I can avoid it, I would prefer. Is there a way to get around this, or should I write one line per OR I would like to match ? Regards. Thierry. --~--~-~--~~~---~--~~ You received

  1   2   >