Internationalization in django and search engine indexing

2009-06-22 Thread Olivier
n and index the two versions or should I use different url ? I first tried to find if the question was already solved in a different topic but I didn't see it, sorry if I'm wrong. Thanks in advance, Olivier --~--~-~--~~~---~--~~ You received this message beca

Re: Internationalization in django and search engine indexing

2009-06-23 Thread Olivier
age with a link, don't you ? My concern is really practical, I already have a site (http:// www.spiderchallenge.com) that is localized both in english and french but google has only index the english content. Thanks again, Olivier On 23 juin, 03:39, yml wrote: > This is the motivation fo

Re: Internationalization in django and search engine indexing

2009-06-24 Thread Olivier
Thanks Miguel, It seems that it does what I want, I will try it ! I'm using django on Google App Engine (with app engine patch) which use differents data models, do you think it will still work ? Cheers, Olivier On 24 juin, 12:30, Kenneth Gonsalves wrote: > On Wednesday 24 June 2009

Re: Internationalization in django and search engine indexing

2009-06-30 Thread Olivier
help, Olivier On 24 juin, 14:32, Olivier wrote: > Thanks Miguel, > > It seems that it does what I want, I will try it ! > I'm using django on Google App Engine (with app engine patch) which > use differents data models, do you think it will still work ? > > Cheers,

template not raising error (newforms related ?)

2007-07-16 Thread olivier
NG_IF_INVALID, but there is no way Django tells me what is going wrong (in my case AssetionError at line ...). Am I missing something ? Some obscure setting maybe ;o) ? I understand it's Django philosophy not to raise any error, but a debugging trace, maybe in

template preprocessor ?

2007-07-18 Thread olivier
Hi group, Is there an easy way to plug a preprocessor to the templating system ? I'm thinking about a very simple processor that would remove lines beginning by ## (ala mako), because the Django comment syntax is sooo verbose and tedious to type Cheers, Ol

Cheetah-like comments [was: Re: template preprocessor ?]

2007-07-18 Thread olivier
Thank you James, it's really great to get such answers ! Template loaders is a handy feature, I made my own in minutes. People interested can find it here : http://www.djangosnippets.org/snippets/326/ Cheers, Olivier On 19 juil, 02:03, "James Bennett" <[EMAIL PROTECT

i18n on win 32 : make_message.py doesn't find anything to translate

2007-07-21 Thread olivier
string to translate, without raising any error or warning. Has someone any clue about what's going on ? Are there any issues with i18n on win32 ? Thanks, Olivier [1] http://code.djangoproject.com/ticket/1157 [2] http://sourceforge.net/project/showfiles.php

Re: i18n on win 32 : make_message.py doesn't find anything to translate

2007-07-22 Thread olivier
msg.append(line) msgs = "\n".join(msg) (space formatting will probably get messed up by google group) and everything goes fine. I'll fill a ticket when I can. Olivier On 21 juil, 17:43, Carl Karsten <[EMAIL PROTECTED]> wrote: > olivier wrote: > > H

Re: Is there any way to associate a view with a template?

2007-07-28 Thread olivier
advertised here, but it's really a great stuff for those baffled by Django templates limitations. Olivier [1] http://jinja.pocoo.org/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" grou

Re: Need some advice in new project

2007-07-28 Thread olivier
support has limitations (no MSQL, no Oracle, no schema on Postgres). Olivier --~--~-~--~~~---~--~~ 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@googleg

Re: Support for macros in templates

2007-08-11 Thread olivier
ja.pocoo.org/) ? You're on the way to reinvent it, like I began to do before I discovered it... Olivier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

Re: return html snippet via XHR with simplejson

2007-08-11 Thread olivier
erested to see if others come up with another (better ?) solution. Olivier --~--~-~--~~~---~--~~ 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@googlegro

Re: Question: trailing escaped character in a href=""?

2007-08-19 Thread olivier
blah.' > note = '1' In your example, you input `note` as a string, whereas `note` is an IntegerField. Is it a typo ? What database backend are you using ? Sqlite, I guess ? Olivier --~--~-~--~~~---~--~~ You received this message bec

Re: Question: trailing escaped character in a href=""?

2007-08-19 Thread olivier
> def note_anchor(self): > return int(self.note) If it's already an integer, you don't need to do this,do you ? Otherwise, are you not using a buggy middleware that tries to refactors your html to make it valid XHTML ? If not, I'm afraid I don't

Re: recursive relationship foreignkey

2007-08-19 Thread olivier
eceived the error. You need also null = True. blank is for django, null is for the backend (btw, OperationalError are always propagated from the backend). Regards, Olivier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Importing Excel/CVS into Database

2007-08-21 Thread olivier
ww.lexicon.net/sjmachin/xlrd.htm Regards, Olivier --~--~-~--~~~---~--~~ 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@googlegroups.com To unsubscri

Re: newforms: message "this field is required" although required=False

2007-09-07 Thread olivier
not sure anyway that forms.Form.__init__(self, ...) is the right way to do it. Regards, Olivier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email t

change db connection upon login

2007-05-27 Thread olivier
thentication, username1's session is tied to a connection as 'username1', 'username2' is tied to a connection as 'username2', etc.., each user having his own database/schema. It's probably not straightforward at all, since it raises a lot of

looping over related objects in templates

2007-06-01 Thread olivier
icles method in the Author model, which the template will know how to handle ? Cheers, Olivier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, s

Re: looping over related objects in templates

2007-06-01 Thread olivier
Ooops, sorry, never mind. > {% for article in author.article_set.all %} >{{article.title }} > {% endfor %} works fine. Olivier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users&q

Re: looping over related objects in templates

2007-06-01 Thread olivier
ticle.title is '' for every article > - There is a typo in your template that you haven't made in this email. Yes, one of those occured, I noticed too late Thank you for you very detailed answer. Olivier --~--~-~--~~~---~--~~ You received

Re: Having Django iterate through JSON possible?

2007-09-14 Thread olivier
ze(), it will give you more flexibility. Regards, olivier --~--~-~--~~~---~--~~ 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@googlegroups.com To unsubsc

Re: Having Django iterate through JSON possible?

2007-09-14 Thread olivier
> To Olivier: Iterating through javascript like that is possible, but it > poses a disadvantage in that I cannot access the data's related object > (e.g. ForeignKey relationships). > For example I can do data[0].fields.user and I'd get "3" as a &g

null ForeignKey and INNER JOIN

2007-09-18 Thread olivier
don't belong to a collection ( the corresponding records won't be picked by the INNER JOIN, whereas a LEFT OUTER JOIN would have done the job). So, is there any way to go around this ? The only hack I have in mind is get the sql, replace INNE

Re: null ForeignKey and INNER JOIN

2007-09-18 Thread olivier
Yups, sorry, the query would be build with Q objects : Q(title__icontains = 'cooking') | Q(collection__name__icontains = 'cooking') But the JOIN problem remains. Olivier --~--~-~--~~~---~--~~ You received this message because you a

Re: null ForeignKey and INNER JOIN

2007-09-19 Thread olivier
Hi, > > Is there a way to switch django's relationship building from INNER > > JOIN to LEFT OUTER JOIN ? > > It causes unexpected behaviour when filtering on both parent and child > > tables. > > Not really. There is a limited ability to control the join behaviour > with Q objects, but this isn't

Re: Adding a custom admin view to the admin app listing

2007-09-19 Thread olivier
app.models %} ... regular admin stuff {% endfor %} upload CSV file Olivier --~--~-~--~~~---~--~~ 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@googlegrou

overwriting DEFAULT_DATETIME_INPUT_FORMATS in settings.py raises AttributeError in rev 6368

2007-09-19 Thread olivier
Hi all, I used to overwrite DEFAULT_DATETIME_INPUT_FORMATS in my settings.py, to allow for french date formats. It used to work perfectly, but since rev 6368, it raises a exception. Anyone knows what's going on ? Regards, Olivier settings.py: import django.newforms.f

Re: It's Django for bussines/financial apps??

2007-09-26 Thread olivier
es, but assess carefully your needs as regards the ORM. Olivier [1] See http://groups.google.fr/group/django-users/browse_thread/thread/c8da17a98e0e3d85 [2] Well, I never got into the "not-powerful-by-design" templating system (I'm using mako), but it's rat

Re: It's Django for bussines/financial apps??

2007-09-26 Thread olivier
a better bet. > > i think one of the selling points of django is that the default ORM > can be replaced by anything, in particular by sqlAlchemy. Sure, but you're losing newforms integration, generic views, admin, ... Not sure it's

Re: It's Django for bussines/financial apps??

2007-09-26 Thread olivier
ORM. If you reach django's limitations, or feel you're on the edge, it's probably just one hour of find/replace in your favorite editor to get the (basic) sqlAlchemy's equivalent. Cheers, Olivier --~--~-~--~~~---~--~~ You received this m

Re: It's Django for bussines/financial apps??

2007-09-26 Thread olivier
t refactor. Yes, sorry. I forgot to mention you were working on it. Olivier --~--~-~--~~~---~--~~ 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@google

Re: run queries stored in database

2007-09-28 Thread olivier
ter"]) Not tested, but you get the picture. Using json or any better serializer than str/eval may be an even better idea. Olivier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Help with Jinja Template

2007-10-07 Thread olivier
rkill. Regards, Olivier --~--~-~--~~~---~--~~ 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@googlegroups.com To unsubscribe from this group, send email to [

TransactionManagementError behind mod_python only

2007-10-11 Thread olivier
development server. Behind mod_python, I get : TransactionManagementError: Transaction managed block ended with pending COMMIT/ROLLBACK Does anyone know what's going on and what could be the source of the problem ? I know very little about Apache. Thanks, Ol

Question from a very beginner: Include dynamic template

2013-02-13 Thread Olivier
Hi everybody, I'm beginner in Django, and I have a "little" problem. I would like to include a subtemplate in a for loop and passing some parameter. like this: {% for tasklist in object_list %} > > {{ > tasklist.title }} > {% block task_li

Re: Question from a very beginner: Include dynamic template

2013-02-14 Thread Olivier
Thank you for your answer, actually I didn't know I can do this kind of things* :D I'm not very familiar with the using of framework !* Thank you for your help ! Le mercredi 13 février 2013 22:10:37 UTC+1, Daniel Roseman a écrit : > > On Wednesday, 13 February 2013 03:52:20 UTC-

object is not iterable

2013-05-24 Thread Olivier
Hello all, I have an insoluble problem when I try to use the formsets... *This is my models:* class Relais(models.Model): nom = models.CharField(max_length=100,blank=True) competition = models.ForeignKey(Competition) sport = models.ForeignKey(Sport) ordre = models.IntegerField() def __unicode__

DRF instance page sends GET instead of DELETE with both Firefox and Chromium

2020-04-21 Thread Olivier
Hello, I'm discovering DRF. When I type http://foo/api/friends/3/ in my browser, I'm seeing content describing Friend 2 or Friend 3 instance. When I type curl -X DELETE http://foo/api/friends/2/ a DELETE request is sent to my Django app and everything works OK as Friend 2 is removed from datab

How to add a button to Django Admin user menu (the one with logout, change password, ...) ?

2020-06-12 Thread Olivier
Hello, When logged into Django Admin, I can see a header on view top with: - "Django Administration" on the left - 4 items on the right + "welcome Foo" + "View site" link + "Change password" + "Logout" I want to a add a styled "Deploy" button, anywhere inside this header, so that, after editing

Re: How to add a button to Django Admin user menu (the one with logout, change password, ...) ? [SOLVED]

2020-06-12 Thread Olivier
It seems django-admin-tools is doing what I was after, and more. If a django-admin-tools-enabled admin site could peacefully co-exists with classical admin site, then it would be perfect. Le vendredi 12 juin 2020 10:31:43 UTC+2, Olivier a écrit : > > Hello, > > When logged into Dja

How to implement differenciated permissions for basic and advanced admin sites ?

2020-06-19 Thread Olivier
Hello, I'm implementing one basic and one advanced Django 3.0 admin site. How can I enforce differenciated permissions for them ? I thought about: 1. Dedicating advanced admin site to Superuser, leaving basic admin site to Superuser or Staff members 2. Leaving advanced admin site to Superuser

Django Admin: how to link to another model from one model list view ?

2020-06-25 Thread Olivier
Hello, Let say your app deals with Book and Author models. Within Django Admin, you can display a list of currently stored Books. I How can you implement the following: 1. For each Book entry within Book Listing page (like http://foobar.com/admin/myapp/book/), book's title and authors arr both

Re: Django Admin: how to link to another model from one model list view ?

2020-06-28 Thread Olivier
I've found [1] which seems to match what I was after [1] https://avilpage.com/2017/11/django-tips-tricks-hyperlink-foreignkey-admin.html I hope this could also help others ... Le jeudi 25 juin 2020 10:07:15 UTC+2, Olivier a écrit : > > Hello, > > Let say your app deals wit

Live updates of Admin's list_display data

2020-06-30 Thread Olivier
Hello, Django Admin implements list_display settings with which you can create columns of database-extracted or computed values. Is there to update these values without requiring Django Admin users to reload or refresh current page ? Best regards -- You received this message because you are

Django 3.1 Makemigrations fails with FilePathField but succeeds with CharField

2021-03-18 Thread Olivier
Hello, I've got a Django app which has over 200 migration steps. To shorten its test loading time, I'm trying to erase all current migrations and restart from scratch. I deteted and re-created my app Postgres database. I deleted all files (but __init__.py) in migrations directory. I typed "pytho

Django 3.1 Makemigrations fails with FilePathField but succeeds with CharField

2021-03-18 Thread Olivier
dorstatic' and that /var/www/vhosts/foo/vendorstatic directory exists. Python version 3.7.3 and Django 3.1.7. Le jeudi 18 mars 2021 à 15:28:21 UTC+1, Olivier a écrit : > Hello, > > I've got a Django app which has over 200 migration steps. > To shorten its test loading

Django 3.1 Makemigrations fails with FilePathField but succeeds with CharField

2021-03-18 Thread Olivier
)) I would be very curious to get a deeper understanding of what is happening here. Thanks in advance. Le jeudi 18 mars 2021 à 16:51:13 UTC+1, Olivier a écrit : > PS: In case the errors comes from the '/var/www/vhosts/foo/vendorstatic' > value itself , may I add that VENDOR_S

Django Admin 3.1.7: getting RelatedObjectDoesNotExist for required ForeignKey

2021-03-29 Thread Olivier
Hello, I'm using Django 3.1.7's Admin form of the following model: class EthernetInterface(models.Model): slug_name = models.CharField(max_length=32) MAC = MACAddressField(blank=True, null=True) lan = models.ForeignKey(LAN, on_delete=models.PROTECT, related_name='lan_interfaces')

How to properly document and test models with natural keys

2021-03-29 Thread Olivier
Hello, I'm thinking about adding natural keys to a lot of existing models (Djano 3.1.7) to help initializing dev or prod database. 1. How best to unit test models using natural keys ? I was thinking of separately testing both serialization and deserialization but would be very curious to lear

How to test foreign key in clean() [was: Django Admin 3.1.7: getting RelatedObjectDoesNotExist for required ForeignKey]

2021-03-30 Thread Olivier
egards Le lundi 29 mars 2021 à 11:02:30 UTC+2, Olivier a écrit : > Hello, > > I'm using Django 3.1.7's Admin form of the following model: > > class EthernetInterface(models.Model): > slug_name = models.CharField(max_length=32) > MAC = MACAddressFi

Django 2.2 CheckContraint: how to check "min_foo < max_foo" ?

2019-11-12 Thread Olivier
hello, Looking at [1], I can see examples where one can check at database level, that a model field min_foo satisfies a constraint such as "min_foo > 5". How do you write a constraint involving two different fields like "min_foo < max_foo" or "discounted_price < price" ? PostgreSQL doc shows h

Re: Django 2.2 CheckContraint: how to check "min_foo < max_foo" ? [SOLVED]

2019-11-13 Thread Olivier
Customer(models.Model): > age = models.IntegerField() > > class Meta: > constraints = [ > > models.CheckConstraint(check=models.Q(discounted_price__lte=models.F('price')), > name='age_gte_18'), > ] > > > Em ter.,

Django 2.2: how to use to a field "from a foreign model", in a CheckConstraint: ?

2019-11-13 Thread Olivier
Hello, Let say I want to enforce a database constraint saying a "book's author age is over 18". As you may guess, books and authors are each described with a Model subclass with a foreign key (in this example each book is written by a single author) linking both. class Author(models.Model):

How to cast Faker data with Factory Boy ?

2019-11-19 Thread Olivier
Hello, I'm discovering Factory Boy with a Django 2.2 project. Factory Boy now ships with Faker which is very convenient to generate test data. Faker generates string of all kinds to match phone numbers, postal or IP addresses. How do you use Faker/Factory Boy to cast generated data into a spec

Which tool for editable text file uploading ?

2019-11-26 Thread Olivier
Hello, I'm quite new to Django. I'm working with Django 2.2. I would like to let my web app admin users, to be able to: - upload some text files - edit those files through appropriate view. Other requirements: - Factory Boy integration - PostgreSQL support I've seen these Django Packages: djang

Pluggable application template customization

2009-01-09 Thread Olivier Guilyardi
loading default templates. How can I add support for this optional templates/telemeta directory, automatically, whenever one has installed telemeta ? Regards, -- Olivier Guilyardi / Samalyse --~--~-~--~~~---~--~~ You received this message because you are su

Re: Pluggable application template customization

2009-01-09 Thread Olivier Guilyardi
Malcolm Tredinnick wrote: > On Fri, 2009-01-09 at 14:00 +0100, Olivier Guilyardi wrote: >> Hi, >> >> We have developed Telemeta, a "pluggable" Django application (to be added to >> INSTALLED_APPS). It works great. We now need to support per-project templates &

Re: Pluggable application template customization

2009-01-09 Thread Olivier Guilyardi
Olivier Guilyardi wrote: > Malcolm Tredinnick wrote: >> On Fri, 2009-01-09 at 14:00 +0100, Olivier Guilyardi wrote: >>> >>> How can I add support for this optional templates/telemeta directory, >>> automatically, whenever one has installed telemeta ? >>

Re: Design question: Persistent / non-transactional process & django

2008-09-11 Thread Olivier Guilyardi
..) run a cron job (a simple Python script) that checks the database table, establish the needed TCP connection, send it all and cleanup the sent entries from the table. Hope that helps, -- Olivier / Samalyse -- Olivier Guilyardi / Samalyse --~--~-~--~~~---~

Re: Best Practices in Implementing Mini-Content Boxes Across the Site

2008-10-13 Thread Olivier François
x27;s Django's equivalent for macros and it's rather verbose and cumbersome. For ease and simplicity, consider using another template engine within Django, like Mako or Jinja2 (even if it's probably not the "best Django-pythonic way" :) Regards, Olivier --~--~--

Application template inheritance and customization

2010-01-15 Thread Olivier Guilyardi
ault template to customize it. But, do you see a way to avoid those single-line "templates" located in telemeta/templates/telemeta? -- Olivier Guilyardi / Samalyse -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

My Own Auth Backend

2010-01-16 Thread Détour Olivier
Hi, I would create my own auth backend. I tried to understand and trace source code. I want to create an internal DB with SHA1 and username. But I cannot login, Django says me I do not set DB ENGINE. I would not use something like MySQL or any DB Engine. Here is my source code: mybackend.py: fro

Re: My Own Auth Backend

2010-01-17 Thread Olivier Détour
up 2010/1/16 Détour Olivier : > Hi, > I would create my own auth backend. I tried to understand and trace > source code. > I want to create an internal DB with SHA1 and username. > But I cannot login, Django says me I do not set DB ENGINE. I would not > use something like MySQ

Re: My Own Auth Backend

2010-01-18 Thread Olivier Détour
quest.POST['password'] user = authenticate(username=username, password=password) if user is not None: login(request, user) Do I have to overload login method to use it like that ? On Mon, Jan 18, 2010 at 9:32 AM, nostradamnit wrote: > Olivier, > > Look at this

Splitting tests.py

2010-01-18 Thread Olivier Guilyardi
5e398360d2/dae3a7226dccdc5f But that doesn't work. I tested on Django 1.0.2 and SVN r12255, same thing. Any clue? -- Olivier -- 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

Re: Splitting tests.py

2010-01-18 Thread Olivier Guilyardi
On 01/18/2010 09:19 PM, Reinout van Rees wrote: > On 01/18/2010 08:40 PM, Olivier Guilyardi wrote: >> Hi, >> >> I'm trying to split tests.py into individual files into a tests/ >> subfolder, but >> that doesn't work. >> >> I correc

Re: Splitting tests.py

2010-01-18 Thread Olivier Guilyardi
orting the test classes that you defined in your file. So I could have as easily put from unittest import TestBasic and it would work. Using the import * syntax allows us to add more tests to the file later and not have to edit it. " -- Olivier -- You received this message because you are sub

Re: Splitting tests.py

2010-01-18 Thread Olivier Guilyardi
On 01/18/2010 09:58 PM, Shawn Milochik wrote: > On Jan 18, 2010, at 3:50 PM, Olivier Guilyardi wrote: > >> On 01/18/2010 08:59 PM, Shawn Milochik wrote: >>> Here's a fantastic resource. It's what I used to switch to this >>> methodology. It talks you thro

Re: Splitting tests.py

2010-01-18 Thread Olivier Guilyardi
On 01/18/2010 10:04 PM, Ramiro Morales wrote: > On Mon, Jan 18, 2010 at 4:40 PM, Olivier Guilyardi wrote: >> Hi, >> >> I'm trying to split tests.py into individual files into a tests/ subfolder, >> but >> that doesn't work. >> >> I correc

Re: Splitting tests.py

2010-01-18 Thread Olivier Guilyardi
On 01/18/2010 10:21 PM, Olivier Guilyardi wrote: > On 01/18/2010 10:04 PM, Ramiro Morales wrote: >> On Mon, Jan 18, 2010 at 4:40 PM, Olivier Guilyardi wrote: >>> Hi, >>> >>> I'm trying to split tests.py into individual files into a tests/ subfolder,

Re: My Own Auth Backend

2010-01-20 Thread Olivier Détour
Up 2010/1/18 Olivier Détour : > Thanks for this link, I saw it Saturday. > But the problem is the same, I have to login to use template like that: > > {% if user.is_authenticated %} >  lol > {% else %} >  not lol > {% endif %} > > and my view.py is somethin

Re: Splitting tests.py

2010-01-20 Thread Olivier Guilyardi
On 01/20/2010 10:58 AM, Matt Schinckel wrote: > On Jan 19, 7:21 am, Olivier Guilyardi wrote: >> On 01/18/2010 10:04 PM, Ramiro Morales wrote: >> >> >>> On Mon, Jan 18, 2010 at 4:40 PM, Olivier Guilyardi wrote: >>>> Hi, >>>> I'm

Re: Splitting tests.py

2010-01-20 Thread Olivier Guilyardi
On 01/20/2010 01:21 PM, Matt Schinckel wrote: > On Jan 20, 9:25 pm, Olivier Guilyardi wrote: [...] >> Please see my last mail, this issue is resolved. Indeed it was import-related >> and silently failing. > > Yes, it came through as I was replying :) Then I think that

Iterating over a QuerySet

2010-01-20 Thread Olivier Guilyardi
For best performances, should I: records = MyModel.objects.all() for item in records: ... or is the following ok: for item in MyModel.objects.all(): ... ? -- Olivier -- You received this message because you are subscribed to the Google Groups "Django users" group. To po

Re: Iterating over a QuerySet

2010-01-20 Thread Olivier Guilyardi
On 01/20/2010 08:41 PM, Daniel Roseman wrote: > On Jan 20, 7:09 pm, Olivier Guilyardi wrote: >> For best performances, should I: >> >> records = MyModel.objects.all() >> for item in records: >> ... >> >> or is the follow

Dealing with polyhierarchical data

2010-01-27 Thread Olivier Guilyardi
http://dev.mysql.com/tech-resources/articles/hierarchical-data.html -- Olivier -- 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 e

Re: Dealing with polyhierarchical data

2010-01-29 Thread Olivier Guilyardi
On 01/28/2010 11:12 AM, Matthias Kestenholz wrote: > Hi > > On Wed, Jan 27, 2010 at 11:29 PM, Olivier Guilyardi wrote: >> Hi, >> >> I'm working with a polyhierarchical thesaurus, and trying to handle that in >> Django. By polyhierarchical, I mean : nodes

Dynamic Model Fields

2007-04-11 Thread Olivier Guilyardi
models is a developer task and too heavy for the administrators we target, especially because of the need to manually modify the SQL tables. Any ideas? Regards, [1] http://svn.parisson.org/telemeta -- Olivier - http://www.samalyse.com --~--~-~--~~~---~--~~ Yo

Re: Dynamic Model Fields

2007-04-11 Thread Olivier Guilyardi
y an detail view or edition form execute a _lot_ of SQL queries, when this could be achieved with one or two joins... I'm afraid it won't scale. Or does your "ManyToMany(Values)" field helps for optimization? May I expect any help from manipulators, managers, query sets (all of

Re: Dynamic Model Fields

2007-04-11 Thread Olivier Guilyardi
tart of models.py === class MediaItem(models.Model): "Describe an audio/video item with metadata" title = models.CharField(maxlength=250) author = models.CharField(maxlength=250) # Parse some external XML file defining the dynamic fields and then add them # to the class

Re: Dynamic Model Fields

2007-04-12 Thread Olivier Guilyardi
Olivier Guilyardi wrote: > I'm still a python newbie, but it seems to me that there could be a way to > modify the model definition before Django knows about it: Okay, I found the Field.contribute_to_class() method which seems to work just fine. I'm calling it right afte

Named URL problem

2007-05-10 Thread Olivier Guilyardi
tail', dict(all_collections, template_name="collection_detail.html"), name="telemeta-collection-detail"), The following raise no error and renders nothing: {% url telemeta-collection-detail p.id %} Same thing with: {% url telemeta

Re: Named URL problem

2007-05-10 Thread Olivier Guilyardi
[EMAIL PROTECTED] wrote: > I'd suggest trying {% url telemeta-collection-detail object.id %} Thanks that fixed it ! It's not object.id, it's p.id, but it wasn't defined at this point in the template. It put the statement back in the loop where p.id is defined and it works

Custom filter/tag and template inheritance

2007-05-14 Thread Olivier Guilyardi
the child template I get a TemplateSyntaxError "Invalid filter". Is this the expected behaviour? -- Olivier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gro

Limiting SQL queries in a custom manager method

2007-05-18 Thread Olivier Guilyardi
ss MyModel(models.Model) foo = models.CharField(maxlength=200) my_objects = MyManager() # The following should result in offset=0 and length=5 above first_rows = MyModel.my_objects.my_query()[:5] Is this possible? Regards, -- Olivier --~--~-~--~~~---~--

Re: Limiting SQL queries in a custom manager method

2007-05-18 Thread Olivier Guilyardi
Malcolm Tredinnick wrote: > On Fri, 2007-05-18 at 23:50 +0200, Olivier Guilyardi wrote: >> >> How can I know about the limiting parameters inside a custom manager method? >> >> Example: >> >> class MyManager(models.Manager): >> def my_query(self):

Re: Limiting SQL queries in a custom manager method

2007-05-20 Thread Olivier Guilyardi
Jeremy Dunck wrote: > On 5/18/07, Olivier Guilyardi <[EMAIL PROTECTED]> wrote: > ... >> Okay, so I suppose a workaround is to pass offset and length as arguments to >> my_query() >> > ... >> I suppose I may also try to extend the QuerySet class to add m

Reverse URL resolver fails with a literal dot

2007-05-24 Thread Olivier Guilyardi
id not match any of the url patterns. However, if I manually remove the backslash and access /items/download/BM.001%3A006.mp3, then it works. This seems to mean that the resolver and the reverse resolver are not symmetrical. Is this a bug? Regards, -- Olivier --~--~-~--~~-

Re: Reverse URL resolver fails with a literal dot

2007-05-25 Thread Olivier Guilyardi
this code is > simply a hack. :) I didn't read the code, but this reverse regex feature seems like a really interesting and innovative feature to me (never seen a such thing before). It sounds complex too, though. Maybe that "prototype" is better than &qu

Re: Reverse URL resolver fails with a literal dot

2007-05-25 Thread Olivier Guilyardi
hould I post a ticket? Regards, -- Olivier --~--~-~--~~~---~--~~ 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@googlegroups.com To unsubscribe from this g

Re: Reverse URL resolver fails with a literal dot

2007-05-25 Thread Olivier Guilyardi
Malcolm Tredinnick wrote: > On Fri, 2007-05-25 at 11:07 +0200, Olivier Guilyardi wrote: >> Malcolm Tredinnick wrote: >> >>>> This seems to mean that the resolver and the reverse resolver are not >>>> symmetrical. Is this a bug? >>> It is. There&#x

Re: Reverse URL resolver fails with a literal dot

2007-05-25 Thread Olivier Guilyardi
resolver. Ain't sure it relies on "finite automata", but you might want to to check it out. It works great for me. Regards -- Olivier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django use

pdf django

2023-04-13 Thread Olivier Dappremee
démarrer de zéro avec python. https://www.clictune.com/i1wR pdf en folie https://www.clictune.com/links/index#:~:text=https%3A//www.clictune.com/i1wN django https://www.clictune.com/i1wM des livres python en fr et ang. https://www.clictune.com/i1wh -- You received this message becaus

gagner de l'argent facile

2023-07-24 Thread Olivier Dappremee
https://timesocials.makeup/319812300981 -- 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...@googlegroups.com. To view this discussion on the

module import failed - Newbie special -

2012-09-12 Thread Olivier BATARD
o module named bookmarks - I've correctly set the installed_apps parameters in settings.py - I'm using python 2.7.3 - There's an __init__.py file in the directory - I checked The name of the directory, all is right. Can anyone guide me on this ? Thanks. Olivier -- You received this messa

Admin page not showing rows after adding a ForeignKey self to the model

2012-09-26 Thread Olivier Lauret
oManyField doesn't seems to work here as if I set product A referring to product B, product B will also refer to product A and this is not what I want. *Environment* I'm using Django 1.4 with the latest Satchmo e-commerce platform. I beleive the question isn't really related to Sat

app's post-migrate triggers work only with pip's -e flag

2018-02-08 Thread Olivier Dalang
nt results depending on whether I install with or without -e ? Any idea what is happening ? Thank you very much in advance !! Olivier -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: app's post-migrate triggers work only with pip's -e flag

2018-02-08 Thread Olivier Dalang
Well it was some deleted file's .pyc lying around (models.pyc which was triggering migrations) :/ Sorry for the noise ! Kind regards, Olivier On Fri, Feb 9, 2018 at 10:32 AM, Olivier Dalang wrote: > Dear List, > > I'm currently trying to deploy a Django 1.8 app and

  1   2   >