Performance regression when moving from 3.1 to 3.2 (same with 4)

2022-09-01 Thread Marc Parizeau
Hi, I am seing a sharp increase in execution time for some of my queries when moving from Django 3.1 to 3.2. And the performance hit appears to be the same for Django 4. My backend is Postgres 14.2. My Django project has forums for different types of content. The forum app consists essential

Re: Newbie looking for some help with Postgres <> Django connection

2020-11-09 Thread Marc Johnson
Hi David, Thanks again for the input. I havent quite figured it out yet but I appreciate the help! Best, Marc On Thu, Nov 5, 2020 at 8:02 AM David Nugent wrote: > > > On 5 Nov 2020, at 04:11, Marc Johnson wrote: > > Hi David, > > Thanks again for the feedback. When

Re: Newbie looking for some help with Postgres <> Django connection

2020-11-03 Thread Marc Johnson
ges/django/db/utils.py", line 176, in ensure_defaults web_1 | conn.setdefault('ATOMIC_REQUESTS', False) web_1 | AttributeError: 'str' object has no attribute 'setdefault' Many thanks in advance for any insights. Best, Marc On Sat, Oct 31, 2020 at 11:45 PM David

Newbie looking for some help with Postgres <> Django connection

2020-10-31 Thread Marc Johnson
ct to server: Connection refused Is the server running on host "db" (172.29.0.2) and accepting TCP/IP connections on port 5433?* Any tips/resources/feedback would be greatly appreciated. Thanks in advance. Best, Marc -- You received this message because you are subscribed to the Google Gro

Re: Django MySQL database backup and restore to new server

2020-05-05 Thread marc bellazzini
> from django.contrib.contenttypes.models import ContentType -- >> ContentType.objects.all().delete() -- >> quit() - sftp db.json file to new server web project directory - python manage.py loaddata db.json On Monday, May 4, 2020 at 4:53:29 PM UTC-5, marc bellazzini wrote: > > Hello, > > I have Dj

Re: Django MySQL database backup and restore to new server

2020-05-05 Thread marc bellazzini
es.models import ContentType -- >> ContentType.objects.all().delete() -- >> quit() NEW SERVER - sftp db.json file to new server web project directory - python manage.py loaddata db.json On Monday, May 4, 2020 at 4:53:29 PM UTC-5, marc bellazzini wrote: > > Hello, > > I have Dj

Django MySQL database backup and restore to new server

2020-05-04 Thread marc bellazzini
this? Thanks Marc -- 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 web vi

wss (secure websocket) with Django Channels and Daphne webserver

2020-01-19 Thread Marc Mültin
/wss-secure-websocket-with-django-channels-and-daphne-webserver If you can help me out or point me to someone who can, I'd appreciate the help very much. Best, Marc -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Re: Dynamic creation of models

2018-02-06 Thread Marc
This is an interesting article against document databases, I am sure though that there are equally valid arguments for http://www.sarahmei.com/blog/2013/11/11/why-you-should-never-use-mongodb/ On Tuesday, February 6, 2018 at 1:14:41 PM UTC, Marc wrote: > > Thank you Jani, for taking the t

Re: Dynamic creation of models

2018-02-06 Thread Marc
instead of trying to do what Django is not designed for and > doesn't support well with concepts like "dynamic models". > > We do similar thing with certain uploadable reports and it works pretty > fine. > > On 6.2.2018 13.35, Marc wrote: > > Hello >

Dynamic creation of models

2018-02-06 Thread Marc
(1.11 and 2.02)? Thank you Marc -- 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 post to this group,

Re: ModelAdmin Media JS file order issue in Django 2.0

2017-12-10 Thread Marc R
; using Python ? > > Etienne > > Le 2017-12-10 à 09:30, Marc R a écrit : > > I have this in my model: > > class Media: > js = ( >* '/static/plugins/codemirror/lib/codemirror.js',* > '/static/plugins/codemirror/mode/html

ModelAdmin Media JS file order issue in Django 2.0

2017-12-10 Thread Marc R
I have this in my model: class Media: js = ( * '/static/plugins/codemirror/lib/codemirror.js',* '/static/plugins/codemirror/mode/htmlmixed/htmlmixed.js', '/static/plugins/codemirror/addon/fold/foldcode.js', '/static/plugins/codemirror/addon/fo

Re: Does imports of related models affect cascade deletion?

2015-07-30 Thread Marc Aymerich
Is this true? I have not found it in the documentation and would like to add > a reference to the code comment so others won't be as confused as I am. Is this models module called models.py and does it live inside a Django application listed in INSTALLED_APPS? -- Marc -- You recei

Annotations with nested Sums

2015-07-10 Thread Marc Aymerich
=Sum(F('lines__total') + Sum(F('lines__sublines__total'))) ) But I get an AttributeError: 'CombinedExpression' object has no attribute 'name' Is there any other way to perform this calculation (adding two levels of nested totals)?. thanks! -- Marc

Re: What is the ideal web server to use with Django?

2015-05-15 Thread Marc Aymerich
On Fri, May 15, 2015 at 10:33 AM, Tom Evans wrote: > On Thu, May 14, 2015 at 4:18 PM, Marc Aymerich wrote: >> On Thu, May 14, 2015 at 11:26 AM, Tom Evans wrote: >>> On our app servers we typically use Apache with worker MPM and >>> mod_wsgi, although we have a few ngi

Re: What is the ideal web server to use with Django?

2015-05-14 Thread Marc Aymerich
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 post to this group, send email to django-users@googlegroups.com. > Visit this grou

Re: Ensure an object is saved even when the atomic bock rollsback

2015-05-08 Thread Marc Aymerich
On Fri, May 8, 2015 at 6:43 PM, Marc Aymerich wrote: > > > On Fri, May 8, 2015 at 5:50 PM, Carl Meyer wrote: > >> Hi Marc, >> >> On 05/08/2015 07:15 AM, Marc Aymerich wrote: >> > I'm using atomic requests, but one of my views needs to save a

Re: Ensure an object is saved even when the atomic bock rollsback

2015-05-08 Thread Marc Aymerich
On Fri, May 8, 2015 at 5:50 PM, Carl Meyer wrote: > Hi Marc, > > On 05/08/2015 07:15 AM, Marc Aymerich wrote: > > I'm using atomic requests, but one of my views needs to save a model > > regardless of wheter the current transaction rolls back or not. > > >

Ensure an object is saved even when the atomic bock rollsback

2015-05-08 Thread Marc Aymerich
of telling django to ignore autocommit for some particular block ? Thanks! -- Marc -- 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

Re: Django, JavaScript, Python, HTML &Co. : Print on html a variable running on python file

2015-04-20 Thread Marc Patermann
be able to display your variable. Marc -- 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 post to this group,

Re: [ANNOUNCE] Django 1.8 released

2015-04-03 Thread Marc Aymerich
for another six > months (ending October 1, 2015) to give time for users to upgrade to Django > 1.8 LTS > Outstanding work guys !! just upgraded my +40 apps project to 1.8 and everything went really smoothly :) -- Marc -- You received this message because you are subscribed to t

Re: Running middleware within ATOMIC_REQUESTS transaction

2015-03-12 Thread Marc Aymerich
On Tue, Mar 10, 2015 at 5:38 PM, Marc Aymerich wrote: > > > On Tue, Mar 10, 2015 at 5:15 PM, Marc Aymerich > wrote: > >> >> >> On Tue, Mar 10, 2015 at 5:12 PM, Marc Aymerich >> wrote: >> >>> Hi, >>> I have a middleware that perfor

Re: Running middleware within ATOMIC_REQUESTS transaction

2015-03-10 Thread Marc Aymerich
On Tue, Mar 10, 2015 at 5:15 PM, Marc Aymerich wrote: > > > On Tue, Mar 10, 2015 at 5:12 PM, Marc Aymerich > wrote: > >> Hi, >> I have a middleware that performs some operations at the end of each >> request. >> >> What I have found is that middlew

Re: Running middleware within ATOMIC_REQUESTS transaction

2015-03-10 Thread Marc Aymerich
On Tue, Mar 10, 2015 at 5:12 PM, Marc Aymerich wrote: > Hi, > I have a middleware that performs some operations at the end of each > request. > > What I have found is that middlewares do not run inside the > ATOMIC_REQUESTS transaction. But I want the ATOMIC_REQUESTS transactio

Running middleware within ATOMIC_REQUESTS transaction

2015-03-10 Thread Marc Aymerich
solve this? Thanks! -- Marc -- 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 post to this group, sen

Re: my mysite/templates/admin/base_site.html is ignored (tutorial unclear?)

2015-02-12 Thread Marc Moncrief
I've been going through the tutorial and had the same problem. The docs say "Create a templates directory in your project directory. " I don't know if this will apply to you, but I thought that meant to put it in the poll directory. They mean to put it in the mysite directory. I made that change

Re: Python: Assign variable in if statement?

2014-11-30 Thread Marc Aymerich
urse I can use > > variable = get_a_value_from_function() > if variable: > new_stuff = variable > > But is there a shortcut similar to php? perhaps something like: new_stuff = get_a_value_from_function() or get_a_value_from_other_function() -- Marc -- You received this message because you

Need something like the removed Q.add_to_query method

2014-10-16 Thread marc
uld return only rows which has both (or more) matching key-value pairs in *attributes*. I read that in 1.5 there was a possibility to override the Q() object to achieve this. Is there any other way without writing raw SQL? Thanks in advance, Marc -- You received this message because you are su

AppConfig where to execute initialization queries?

2014-10-06 Thread Marc Aymerich
guration is separate from the production settings, manage.py test would still execute some queries against your *production* database! -- Marc -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop rece

Re: django 1.7 Groups

2014-09-15 Thread marc
Hi, changing the base Group model is not very easy. My suggestion is to create a ManyToMany relation on your Company model. class Company(models.Model): groups = models.ManyToManyField("auth.Group") The design allows in theory many companies to have the same group, but this you c

Re: HttpResponse methods difference

2014-08-28 Thread marc
As you see in: https://github.com/django/django/blob/master/django/http/response.py#L370 all three methods have different usecases. .write(string) <- adds content .tell() <- returns the length of content .flush() <- just passing, does nothing (since at lease v1.5) Cheers Am Donnerstag, 28. Aug

Re: django manage.py commands not displaying

2014-08-27 Thread marc
Can you please post the content of your manage.py? Cheers Am Dienstag, 26. August 2014 15:28:43 UTC+2 schrieb RSS: > > sorry my bad English > > i`m working on hosting > > project structure: > --myenv > --rsskg.ru > public_html > --virtaulenv-1.9 > > $ cd projects.ru/public_html > $ source ~/m

Re: building a xenserver web client

2014-07-31 Thread marc
Openstack is huge. I'll prefer a lightweight solution, maybe just HTML/CSS (if there is already a good Soap client for JS). But this should be compatible to most of the API features provided by xen. Am Donnerstag, 31. Juli 2014 17:39:53 UTC+2 schrieb cmawe...@gmail.com: > > You mentioned "full f

building a xenserver web client

2014-07-31 Thread marc
Hi, is anyone interested in co-building a full featured web client for xenserver instances? Since version 6.2 the update procedures are really a pain which is one of my reasons to think about an (maintained) opensource client. Ideas are welcome. Cheers -- You received this message because yo

Re: Static Files not Loading

2014-07-30 Thread marc
Hi, STATIC_PATH should be STATIC_ROOT. Cheers Am Mittwoch, 30. Juli 2014 17:10:17 UTC+2 schrieb Steven Williams: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi, > > I just asked around on IRC and no one was able to help me. Also the > entries on StackOverflow are not that helpful

Re: internationalization (i18n)

2014-07-30 Thread marc
Here's a list of locales in Django: https://github.com/django/django/tree/master/django/conf/locale Am Mittwoch, 30. Juli 2014 14:47:03 UTC+2 schrieb ma...@tubeards.com: > > Hi, > > have a look at: http://www.i18nguy.com/unicode/language-identifiers.html > > The localization in django is based on

Re: internationalization (i18n)

2014-07-30 Thread marc
Hi, have a look at: http://www.i18nguy.com/unicode/language-identifiers.html The localization in django is based on region and language codes, some of them are the same (like 'de') and some split (like 'en-us'). For 'mr' you'll need to add the area code of india iirc. Cheers Am Mittwoch, 30.

Re: how to ride submit_line.html

2014-07-30 Thread marc
Hi, have a look there: http://stackoverflow.com/questions/8442724/django-admin-disable-editing-and-remove-save-butttons-for-a-specific-model Guess it is the right way to go. Cheers Am Mittwoch, 30. Juli 2014 13:32:18 UTC+2 schrieb Akshay Mukadam: > > How can we override the submit_line.html to

Re: (ModelForm) confusion

2014-07-30 Thread marc
Hi, you are calling 'is_valid' in your view, which should be an method call: a_valid = aform.is_valid*()* m_valid = mform.is_valid*()* p_valid = pform.is_valid*()* There where a few hooks in your view, for example: you check for 'is_valid()' but there is no code to execute after. I've changed

Re: Unable to create migration with Error - One or more models did not validate:

2014-07-30 Thread marc
Hi, you've added a relation to the AssetPollingConfig model which is not defined. Cheers Am Mittwoch, 30. Juli 2014 13:34:52 UTC+2 schrieb Subodh Nijsure: > > Hello, > > I have following model definition and when I try to create a migration > using command, 'python manage.py schemamigration

Re: update a field of a related table on form save

2014-07-30 Thread marc
Hi Brad, i would register a 'post_save' signal (https://docs.djangoproject.com/en/dev/ref/signals/#post-save) on the first model and then, just hit the save method on the Application model, this will automaticly update the time. Cheers, Marc Am Mittwoch, 30. Juli 2014 03:26:21 UTC

Re: Django package to convert Less to CSS

2014-07-30 Thread marc
Hi, are you using a virtualenv? Your lessc installation seems to point to a ruby one. (/Library/Ruby/Gems/2.0.0/gems/ less-2.4.0/bin/lessc) Be shure to have the correct path, try `which lessc` to see where it points to. Cheers Marc Am Mittwoch, 30. Juli 2014 04:08:47 UTC+2 schrieb Chen

Re: Django 1.7 - What are you most excited about?

2014-07-30 Thread marc
Hi, aggree in all points Russel, these features are also my favourite ones. - html email support in different places and the password reset mail template makes life much easier. Greetings, Marc Am Mittwoch, 30. Juli 2014 06:54:21 UTC+2 schrieb Russell Keith-Magee: > > Hi Ryan,

Re: Different objects returned when filtering with a ValuesListQuerySet

2014-07-28 Thread Marc Kirkwood
Yeah that's what I was thinking it could be. cheers Russ. -- Legal status: Any views or opinions are solely those of the sender and do not necessarily represent those of SF Software Ltd unless expressly stated in the body of the text of the email, this email is not intended to form a binding c

Different objects returned when filtering with a ValuesListQuerySet

2014-07-25 Thread Marc Kirkwood
es-aware *order_by()* and *distinct()* chain, in the queryset that *latest* was produced from. Thanks, Marc. -- Legal status: Any views or opinions are solely those of the sender and do not necessarily represent those of SF Software Ltd unless expressly stated in the body of the text of the email, this

Re: django.core.exceptions.AppRegistryNotReady

2014-07-08 Thread Marc Aymerich
On Tue, Jul 8, 2014 at 12:54 PM, Frank Bieniek < frank.bien...@produktlaunch.de> wrote: > Hi Marc, > > this should fix it: > > File "/home/orchestra/django-orchestra/orchestra/apps/accounts/models.py", >> line 9, in Account >> user = models.OneT

django.core.exceptions.AppRegistryNotReady

2014-07-08 Thread Marc Aymerich
My impression is that breaks when loading a model that has a reference to custom user model: user = models.OneToOneField(get_user_model(), related_name='accounts') Any idea? -- Marc -- You received this message because you are subscribed to the Google Groups "Django users" g

Re: Inlines in admin

2014-04-07 Thread Marc Aymerich
On Mon, Apr 7, 2014 at 3:04 PM, Emanuel wrote: > Hi all! > > I'm have the following models: > > Class A(models.Model): > pass > > > Class Z(models.Model): > pass > > > Class B(models.Model): > a = models.ForeignKey(a) > z = models.ForeignKey(Z) > >def __unicode__(self)

Annotate concat() of two fields

2014-03-29 Thread Marc Aymerich
t this doesn't always work, because it depends on the total number of joins performed by the queryset, (so the name changes to T4, etc) What would be the right way of doing this concat() annotation? thanks!! -- Marc -- You received this message because you are subscribed to the Google Grou

Anybody out there installed and run DjangoBB?

2014-02-20 Thread Marc Garcia
Hi, I'm new in Django and I'm planning create a website using a forum. After some googles I've noticed that the most updated and best choice for my purpose is DjangoBB. I looked the official manual http://djangobb.org/wiki/QuickInstall but I'm stacked because I have to set up a database and I

platform for mainstream enterprise applications

2014-02-19 Thread Marc Model
. Thanks for any referral. Marc -- 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 post to this group, sen

Re: AssertionError: u'ns.example.com.' == 'ns.example.com.' ?

2014-02-12 Thread Marc Aymerich
On Wed, Feb 12, 2014 at 8:01 PM, Larry Martell wrote: > On Wed, Feb 12, 2014 at 1:56 PM, Marc Aymerich wrote: >> I'm running my Django app tests and I'm getting a random and very >> annoying assertion error >> >> =

AssertionError: u'ns.example.com.' == 'ns.example.com.' ?

2014-02-12 Thread Marc Aymerich
WTF is wrong with it? The thing is that I don't always get the error, just like 1/4 of the times, and a manual assertion like this never fails ! self.assertEqual(u'ns.example.com.', 'ns.example.com.') Any clue? Thank you guys! -- Marc -- You

Django error

2014-01-10 Thread Marc Westberg
Please forgive me for a newbie problem I installed Django, i can do "python -c "import django; print(django.get_version())" and get a return of "1.6.1". When I try any command after django-admin.py. Such as django-admin.py check or django-admin.py shell, I get only the help menu. I installed

Re: Django ORM & DB backend coupling

2013-12-24 Thread Marc Aymerich
rather than database-driven? > > Please share with me your thoughts on this topic. You may want to take a look at a recent discussion at django-dev about this subject https://groups.google.com/forum/#!msg/django-developers/zlLCJ5HC3c8/7eFdmdUSDbsJ -- Marc -- You received this messa

Re: Django ORM & DB backend coupling

2013-12-24 Thread Marc Aymerich
currency. Don't really know how much you'll need to sacrifice in order to fit a REST service within a Django ORM backend. It could be fun to do it, but leveraging all its potential seems quite difficult at first look, I would say it's not worth the trouble :) -- Marc -- You re

Re: RestFul with Class Based Views best practice

2013-10-29 Thread Marc Aymerich
s create two views, one for listing and creating songs and another for reading, updating and deleting existing songs class SongList # url /songs/ def get: list songs def post: create new song class Song # url /songs/ def get def put def patch def delete I think with these two v

Re: Accessing related objects on model.clean()

2013-10-17 Thread Marc Aymerich
On Wed, Oct 16, 2013 at 11:52 PM, Marc Aymerich wrote: > Yep, > I'm writing some validation logic for a model that is being used in an > admin inline form > > The model looks like this > > class Child(models.Model): > parent = models.ForeignKey(Pa

Accessing related objects on model.clean()

2013-10-16 Thread Marc Aymerich
s created afterwards and is not available at that time. How can I validate a new child object based on its parent information? I'm surprised not finding any information regarding this issue :) Thanks! -- Marc -- You received this message because you are subscribed to the Google Groups

Re: Retrieving json stored in TextField as json

2013-10-10 Thread Marc Aymerich
On Thu, Oct 10, 2013 at 6:02 PM, Daniel Roseman wrote: > On Thursday, 10 October 2013 10:08:18 UTC+1, Marc Aymerich wrote: >> >> Hi Rafael, thanks ! >> I forgot to mention that I was already using django-jsonfield >> https://github.com/bradjasper/django-jsonfield >&g

Re: Retrieving json stored in TextField as json

2013-10-10 Thread Marc Aymerich
ue': '{"scheduled":2,"total":849,"15min":0.33,"1min":0.51,"5min":0.32}'}] did I missed something? On Thu, Oct 10, 2013 at 1:16 AM, Rafael Durán Castañeda wrote: > I'm using django-json-field [1] for solving the same problem

Retrieving json stored in TextField as json

2013-10-09 Thread Marc Aymerich
uot;:0.51,"5min":0.32}'}, {'value': '{"scheduled":2,"total":814,"15min":0.3,"1min":0.2,"5min":0.25}'}, {'value': '{"scheduled":2,"total":817,"15min":0.25,"1min&quo

Templatetag variable resolution choices (Python literals)

2013-07-01 Thread Marc Kirkwood
OK, so I've got a template tag and a corresponding Node class. In order to check the value of two template variables in the Node.render method, I'm using the template.Variable class as specified in the docs. However, I'm wondering if there is any point to this, given the extra lines of code that

Re: ANNOUNCE: Django 1.6 beta 1 released

2013-06-28 Thread Marc Aymerich
found on our blog: > > > https://www.djangoproject.com/weblog/2013/jun/28/django-16-beta-1-released/ > > And in the release notes: > > https://docs.djangoproject.com/en/dev/releases/1.6/ > Wow, lots of cool changes for the next release! thank you guys for all the great effo

Sending emails, models or views?

2013-06-19 Thread Marc Aymerich
n circumstances... So anyone has thought about this? any rule of thumb? maybe it totally depends on the use case? does this question even make sense? :) Thanks for your answers! -- Marc -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: Passing filter parameters to admin's add view

2013-05-26 Thread Marc R
Sorry, didn't read to the bottom of your post :) Why would there be a better way than overriding the default template? that is the most efficient way and the power of frameworks. On Saturday, May 25, 2013 11:53:00 AM UTC-4, Branko Majic wrote: > > Hello all, > > I've posted a similar question

Re: Passing filter parameters to admin's add view

2013-05-26 Thread Marc R
override the template and change it accordingly (you can grab djangos as a starting point). Google for django admin template override. On Saturday, May 25, 2013 11:53:00 AM UTC-4, Branko Majic wrote: > > Hello all, > > I've posted a similar question a couple of months ago, but received no > a

Re: Is there a way to tell an instance was saved without checking instalce.pk or doing a db lookup?

2013-05-26 Thread Marc R
What are you trying to accomplish? I believe the doc's talk about this some; but in short, you can only check the pk if its a new object; otherwise the pk would be set (if you retrieved the object from the database, or saved before). I would assume (as i've not run into the issue yet) that on

another ifchanged question, triggers on first call, not what I want

2013-05-26 Thread Marc R
I'm trying to insert breaks when a row value in a specific column of data changes; however, it is triggering on the very first call to "ifchanged". For example: {% for row in report %} {% ifchanged row.column2 %} {% endifchanged %} ...print other data... {% endfor %} The very first line is a

Re: Admin module - modify SQL Query used for Edit and Save Models

2013-05-03 Thread Marc
ed at this stage. On 2013-05-03 9:50 AM, "Shawn Milochik" wrote: > On Fri, May 3, 2013 at 8:37 AM, Marc wrote: > > So Tom: i can't use those methods Shawn pointed out? What I was hoping I >> can do is override the code that builds the SQL query. >> Further lookin

Re: Admin module - modify SQL Query used for Edit and Save Models

2013-05-03 Thread Marc
;,... would be very handy as then you could use all sorts of the powerful features in a DB. I get that it may then make the use of an ORM less "useful", but it sure would be easier than having to always due RAW sql calls on the object to get the same result. On Fri, May 3, 2013 at 8:37

Re: Admin module - modify SQL Query used for Edit and Save Models

2013-05-03 Thread Marc
So Tom: i can't use those methods Shawn pointed out? What I was hoping I can do is override the code that builds the SQL query. Further looking I think thats correct; as I did get a module working I found and played with which uses those methods and they don't seem to manipulate the query that is

Re: Admin module - modify SQL Query used for Edit and Save Models

2013-05-03 Thread Marc
Thanks, i'll play with that and see what I can come up with. Docs are good, but sometimes really hard to read/find what you need :) On Fri, May 3, 2013 at 7:46 AM, Shawn Milochik wrote: > > https://docs.djangoproject.com/en/1.5/howto/custom-model-fields/#converting-database-values-to-python-obj

Re: Admin module - modify SQL Query used for Edit and Save Models

2013-05-03 Thread Marc R
Anyone? I would really like to know who I can modify the query as its being built so that for a specific field I can set the "field" to AES_DECRTYP(fieldname,key) on a select and AES_ENCRYPT(fieldname,key) on insert/update On Sunday, 28 April 2013 20:21:48 UTC-4, Marc R wrote: &g

Admin module - modify SQL Query used for Edit and Save Models

2013-04-28 Thread Marc R
I have a model where I have used AES_ENCRYPT(value, key) to save data in a MySQL database. It is set as a varbinary field. So the issue is; when trying to edit the model in Django, it does not render a widget for the field. I've tried the aesfield from github but that does some funky thing wit

Re: ManyToMany relationship and raw sql queries

2013-04-27 Thread Marc R
did you use Bookmark.objetcs.all().select_related() ? As this will create a join query... at least for your model you show in the message I have found that for very complex joins, you need to use raw query and not a Model. On Thursday, April 25, 2013 10:44:28 AM UTC-4, Matthieu Bouron wrote

Re: Django Admin - BooleanField issue

2013-04-27 Thread Marc R
ndrew Boltachev wrote: > > Hi. May be you need > > active = models.BooleanField(choices=((True,'yes'),(False,'no'))) > > ? > > - With regards, Andrei > > > 2013/4/27 Marc R > > >> I've setup a boolean field and get it to display co

Django Admin - BooleanField issue

2013-04-27 Thread Marc R
I've setup a boolean field and get it to display correctly using this in my model: active = models.BooleanField(choices=((1,'yes'),(0,'no'))) However, when I edit a record in the Django Admin, the select field always shows "yes" regardless of the database value. Saving "yes" or "no" stores the

Re: Django inline formsets, force initial data to be saved.

2013-03-05 Thread Marc Aymerich
On Tue, Mar 5, 2013 at 4:43 PM, Marc Aymerich wrote: > > > On Tue, Mar 5, 2013 at 3:11 AM, Russell Keith-Magee < > russ...@keith-magee.com> wrote: > >> >> >> On Mon, Mar 4, 2013 at 10:31 PM, Marc Aymerich wrote: >> >>> Hi, >>> I&

Re: Django inline formsets, force initial data to be saved.

2013-03-05 Thread Marc Aymerich
On Tue, Mar 5, 2013 at 3:11 AM, Russell Keith-Magee wrote: > > > On Mon, Mar 4, 2013 at 10:31 PM, Marc Aymerich wrote: > >> Hi, >> I've spend several hours trying to figure out how to save inlines with >> initial data in them. >> >> basically I have

Re: Django inline formsets, force initial data to be saved.

2013-03-05 Thread Marc Aymerich
On Tue, Mar 5, 2013 at 3:11 AM, Russell Keith-Magee wrote: > > > On Mon, Mar 4, 2013 at 10:31 PM, Marc Aymerich wrote: > >> Hi, >> I've spend several hours trying to figure out how to save inlines with >> initial data in them. >> >> basically I have

Django inline formsets, force initial data to be saved.

2013-03-04 Thread Marc Aymerich
InlineFormSet, self).__init__(*args, **kwargs) In this case 2 Direct ifaces with names eth1 and eth2. The problem is that those ifaces doesn't get stored when I hit the save button, that's because has_changed == False. So is there a way to tell Django to save formsets with only i

Re: FastCGI Recipe for shared hosting

2013-03-03 Thread Marc Aymerich
y frustrated) Drupal makes it so easy! No excuses now, > with the talent in the django, it is doable. > I may check back in a few days after I cool down, in the meantime, > I know how to integrate my python own framework with drupal. https://docs.djangoproject.com/en/dev

Re: Django Shopping Cart

2013-02-27 Thread Marc Aymerich
On Wed, Feb 27, 2013 at 10:02 PM, vijay shanker wrote: > hey, i want to write a shopping cart app, please provide some inputs, > useful information, suggestions etc for doing it right . > thanks > have you looked at django-oscar? -- Marc -- You received this message bec

Automating deployments

2013-02-01 Thread Marc Aymerich
helpful in my case? Does it has any advantage for writing my own scripts? Or maybe there are already some existing tools for automating deployment of most common services like Apache, celeryd ..,? Many thanks! br -- Marc -- You received this message because you are subscribed to the Goog

Re: Implementing a monitoring system with django.

2012-12-14 Thread Marc Aymerich
On Wed, Dec 12, 2012 at 12:23 PM, Tom Evans wrote: > On Mon, Dec 10, 2012 at 7:41 PM, Marc Aymerich wrote: >> Hi, >> I'm considering to implement a simple monitorization system that >> basically gathers some data from a set of nodes (<1000 nodes). The >> gath

Re: Implementing a monitoring system with django.

2012-12-13 Thread Marc Aymerich
now..am running some. Thanks Ephan, those graphs looks really nice! I'm looking into them. > On Tuesday, December 11, 2012 11:09:06 PM UTC+2, Marc Aymerich wrote: >> >> On Tue, Dec 11, 2012 at 4:32 PM, Bill Freeman wrote: >> > >> > >> > On Mon, Dec

Re: Implementing a monitoring system with django.

2012-12-11 Thread Marc Aymerich
On Tue, Dec 11, 2012 at 4:32 PM, Bill Freeman wrote: > > > On Mon, Dec 10, 2012 at 2:41 PM, Marc Aymerich wrote: >> >> Hi, >> I'm considering to implement a simple monitorization system that >> basically gathers some data from a set of nodes (<1000 node

Implementing a monitoring system with django.

2012-12-10 Thread Marc Aymerich
ents are best suited for each of the following parts: 1) Storage: maybe something nonsql like MongoDB? or perhaps RRD? 2) Data gathering: celery periodic tasks? 3) Graphs: rrd? or some java script framework for graphing? thanks for your comments!! -- Marc -- You received this message be

Re: Is there a recommended pattern for creating "replaceable" apps?

2012-11-20 Thread Marc Aymerich
main model code > that makes swappable User models possible. In theory *any* model can be > declared as swappable, which will allow the end user to define that in their > project the "X" model will be performed by model "Y", and any foreign keys > will be re-route

Re: Better feedback for admin users

2012-10-17 Thread Marc Aymerich
Does a more elegant way of doing this exist, either in Django's core already, > or using some package that makes it easier? > don't know for a best way, but for me the one you're describing its actually a good workaround that maybe I'll use :) thanks for sharing ! -- Marc -

Re: Django with Jquery

2012-10-11 Thread Marc Kirkwood
I'm having this problem at the moment too. In our case, it's because we have a base template that inserts the jQuery library via a script tag towards the end of the document, just before the close of the body element. Since anything following a $ character in JS depends on jQuery, including the

Re: Autoescape of & char ignoring safe filter

2012-10-03 Thread Marc Serra
CONTEXT_PROCESSORS (except auth, needed by admin interface) and MIDDLEWARE_CLASSES with no success. Can you point me something else I can or should check? Regards, Marc Serra El dijous 4 d’octubre de 2012 1:28:23 UTC+2, Russell Keith-Magee va escriure: > > On Thu, Oct 4, 2012 at 1:17 AM, Marc

Re: Autoescape of & char ignoring safe filter

2012-10-03 Thread Marc Serra
Laxmikant I think you didn't understand my point. I don't want it escaped, and escape marks it for escaping. I want to output the contents of database RAW, without escaping. Safe filter does this but I found the weird exception of &, what messes with urls with parameters on them.

Autoescape of & char ignoring safe filter

2012-10-02 Thread Marc Serra
&hl=en&fs=1&hd=1"; type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="340" width="560"> You know what can be the reason to this behaviour and how to solve it? Thank you, Marc Serra -

Re: settings and constants on a reusable app

2012-06-29 Thread Marc Aymerich
On Fri, Jun 29, 2012 at 11:08 AM, Thomas Rega wrote: > Am 28.06.12 17:30, schrieb Marc Aymerich: > >> Hi, >> I'm developing a reusable application and I'm having troubles with >> constant values on settings. >> >> Imagine that the reusable ap

settings and constants on a reusable app

2012-06-28 Thread Marc Aymerich
t settings as my_app_settings MY_SETTING = my_app_settings.MY_OTHER_SETTING But this is going to fail because of the import order. Is there any consistent way to handle this situation? Thanks! -- Marc -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Use Django to implement my GUI!

2012-05-19 Thread Marc Aymerich
stood you because usually the term GUI is used to refer "desktop application" rather than a web page, which seems to be the case. br -- Marc -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Process Related Object when Saving

2012-05-17 Thread Marc Aymerich
help. >> >> -- >> GH > > -- > 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 > django-users+u

  1   2   3   4   >