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

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

Customizable model field (such as SRID for geometries) and migrations

2021-06-01 Thread Olivier Dalang
ere a package I could use or some design pattern I could follow ? Thanks !! Olivier -- 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+unsubsc

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

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

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')

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 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
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

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

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

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

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

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 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: Idea production with Django

2020-06-10 Thread Wim Olivier
Build an app where people can post their ideas, and other people vote on their ideas - whether they're good or not good. :-) On Wednesday, 10 June 2020 14:51:33 UTC+2, vchanel Hoang wrote: > > Please everybody give me some idea. > -- You received this message because you are subscribed to the

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

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

Re: Best way to organize custom admin views?

2019-11-25 Thread Wim Olivier
Hi, I'd recommend using seperate apps for custom admin areas (1 app for each), and implementing a middleware that allows access to the relevant admin based on roles/permissions, etc. It's simple, kept seperate from other code/apps nicely, and easy to limit access to different groups. blogapp/

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

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):

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 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: Disabling Django Admin, and creating my own three custom admin dashboards

2019-11-10 Thread Wim Olivier
it with the requested url , if they are identical > then permission guaranteed , else redirect somewhere > On Mon, 11 Nov 2019, 8:14 am Wim Olivier, wrote: > >> Thanks Motaz, >> >> That gives me a little bit of direction. >> I'm thinking now of controlling acc

Re: Disabling Django Admin, and creating my own three custom admin dashboards

2019-11-10 Thread Wim Olivier
ges , each signup page will create > a different user and each login page will login each user type to his > dashboard type .. > I advice you to make a 3 seperate apps to organize the code .. > > On Sat, 9 Nov 2019, 5:34 am Wim Olivier, > > wrote: > >> Hi everyone, >>

Disabling Django Admin, and creating my own three custom admin dashboards

2019-11-08 Thread Wim Olivier
t I'm OK with. Just some practical pointers with a small example, or links to Django-based repos that implement something like this, please. I just need some guidance. Many thanks! Wim Olivier South Africa -- You received this message because you are subscribed to the Google Groups &qu

Re: Querying works on shell but not on the Django program code

2019-10-22 Thread Olivier Dugast
sorry, I forgot the brackets. The correct code is: trick = models.Manage() -- 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

Re: Querying works on shell but not on the Django program code

2019-10-22 Thread Olivier Dugast
Le mercredi 10 juillet 2019 13:26:53 UTC+2, Solomon Mbak a écrit : > > I'm a complete novice to python and Django. > > I have tried several solutions I found on stack overflow, but I still get > the same issue. I've tried querying from shell and it works well, but not > on my code. > > I've in

Re: Annotations as models fields

2019-06-06 Thread Olivier Dalang
framework. > > > class Sales(models.Model): > buying_price = models.FloatField() > selling_price = models.FloatField() > profit = models.models.FloatField() > > > Cheers! > > > Regards, > Chetan Ganji > +91-900-483-4183 > ganji.che...@gmail.com > http://ry

Re: Annotations as models fields

2019-06-06 Thread Olivier Dalang
Thanks for the answer. As said, the @property + python method wouldn't work for my use case, as I need to be able to use the field in the queryset to filter/order (plus my actual computed field use aggregates expressions). Cheers, Olivier On Thu, 6 Jun 2019 at 12:36, Chetan Ganji wrote:

Annotations as models fields

2019-06-06 Thread Olivier Dalang
Of course similar result can be achieved with @property and a python method, but I really need this to be on the database side to use subqueries, sorting and filtering, etc. Does anything like this exist ? Is it possible to emulate this behaviour somehow ? Thanks !! Olivier -- You received

Re: tasks queues - why a broker and not the DB?

2019-01-16 Thread Olivier Dalang
So, unless the project has a really enormous amount of tasks, there's no other reason than not overload the db ? I'm a bit surprised as I feel like for most projects, reading/writing the tasks queue represents a very small load compared to regular db access. In the meantime, I found about django-q

tasks queues - why a broker and not the DB?

2019-01-15 Thread Olivier Dalang
ing the db, queued task would simply resume after a reboot and could be migrated. It also seems easier in terms of UI, as django-admin could be used to monitor the tasks. I'd be very interested in understanding the reason behind this, as I feel like I'm missing some important point.

Re: Make an element on a page visible only to logged in users

2018-08-22 Thread Olivier Pons
Hi, I disagree with Mike Dewhirst answer, here's mine. The simplest way is in the template, to see if it's logged in: {% if user.is_authenticated %} Then maybe a much more powerful way is to write your right management this way: first you write what you need beginning with "has_right_" like

Re: Help regarding view modification

2018-08-22 Thread Olivier Pons
Try this: upvotes = models.IntegerField(blank=True, default=0) downvotes = models.IntegerField(blank=True, default=0) (dont forget the makemigrations, then migrate) tell me if it worked Le mercredi 22 août 2018 09:25:20 UTC+2, Sagar a écrit : > > Hi guys, > I am working on project in which admin

Re: Help regarding view modification

2018-08-22 Thread Olivier Pons
Hi, You should try this: upvotes = models.IntegerField(blank=True, default=0) downvotes = models.IntegerField(blank=True, default=0) (dont forget the makemigrations, then migrate) tell me if it worked Le mer. 22 août 2018 à 09:25, Sagar a écrit : > Hi guys, > I am working on project in which

Help is outdated

2018-08-15 Thread Olivier Pons
Here https://docs.djangoproject.com/en/2.1/intro/tutorial01/ You can find things like def index(request): return HttpResponse("Hello, world. You're at the polls index.") and then on tutorial 03, you get def detail(request, question_id): return HttpResponse("You're looking at question

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

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

django admin ajax file upload

2017-05-09 Thread Olivier Dalang
maintained (django 1.9+) - integrates into the admin - doesn't rely on an external service provider (fineupload, uploadcare...) Does such an app exist ? Thanks ! Olivier -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Re: Adding view permission by default to auth_permission

2016-10-29 Thread Olivier Dalang
Indeed I just have to squash the commits then it can be merged. I'm out of office until next week but will do so when back. Bests On 27 Oct 2016 23:23, "Luis Zárate" wrote: > This is alive in > > https://github.com/django/django/pull/6734 > > The other PR was close because this have not merge c

Re: Read Only by user in Django Admin

2016-10-28 Thread Olivier Dalang
Hi, The following PR is ready to merge and implements this: https://github.com/django/django/pull/6734 I will squash the commits as soon as I'm back in the office (next week) and it will probably be merged soon. Bests Olivier On 25 Oct 2016 19:03, "Luis Zárate" wrote: &g

Re: Repetitve/Infinite migrations generated on ManyToManyField

2016-10-27 Thread Olivier Dalang
Hi, I noticed this behavior when changing the case of a app/model/field name. See if the name has the same case in the initial creation migration and in the model. Cheers, Olivier On 27 Sep 2016 03:39, "Marvin Mednick" wrote: > I've the the following models related

Display old instances as read only in admin inlines

2016-06-17 Thread Olivier Dalang
ms.CharField(widget=TextInput(attrs={'readonly':True})) ... But all those don't produce any effect. I considered other options (InlineModelAdmin's readonly_fields...) but had even more problems (as then the data isn't posted, I was getting validation errors), and I think it's not the

Django and jQuery, I don't get it

2016-06-09 Thread Olivier Dalang
lt;https://github.com/codedance/jquery.AreYouSure> to the django admin forms ? Is there some documentation or guidelines that explain best practices ? Or is it indeed a mess and not just me not understanding ? Thanks ! Olivier -- You received this message because you are subscribed to the Goo

Force a model to appear on admin's index page depending on the request

2016-04-13 Thread Olivier Dalang
admin else: he cannot manage any instances -> do not display the model in the admin Thanks !! Olivier -- 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, sen

Restoring deleted entries with db_constraint = False

2016-04-07 Thread Olivier Dalang
.. I'd love some advice to know whether I'm on the verge of doing something stupid ;) Thanks ! Olivier Dalang -- 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,

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__

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-

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

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

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

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

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: 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

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: 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

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: 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-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: 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 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
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: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

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: 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

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

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

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

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,

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-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

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: 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: 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 &

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: 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 --~--~--

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 --~--~-~--~~~---~

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

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 [

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: 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: 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
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
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

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: 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

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: 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

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: 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

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: 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

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: 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: 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: 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: 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: 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: 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

  1   2   >