Re: Django 1.7 has issues rendering pages on laptop

2014-09-12 Thread Michael Martin
https://www.youtube.com/watch?v=JZVPbHilwLI On Thu, Sep 11, 2014 at 11:59 PM, Michael Martin wrote: > opps, I forgot the url > com/watch?v=JZVPbHilwLI > > On Thu, Sep 11, 2014 at 11:52 PM, Michael Martin > wrote: > >> I know there has to be something wrong with ei

Re: Django 1.7 has issues rendering pages on laptop

2014-09-12 Thread Michael Martin
server is unable to render pages that use Java Script and CSS. I would like to have this fixed and I will look for where to report the bug. I did find that you can run jython2.7b2 and Django 1.7 official release together and pages will render. On Thu, Sep 11, 2014 at 11:59 PM, Michael Martin wrote

Re: Django 1.7 has issues rendering pages on laptop

2014-09-12 Thread Michael Martin
I just looked at my ticket and it was marked as a duplicate of issue 2201. http://bugs.jython.org/issue2201 On Fri, Sep 12, 2014 at 3:11 PM, Michael A. Martin wrote: > The same application works fine on jython2.7b2 and Django 1.7 > > I followed a tutorial step by step and it f

Django Modeling setting an integer value to a negative value

2014-09-15 Thread Michael Martin
Is it possible to default a integer to a negative number with Django Modeling? I did the following, but the value in the display shows 1 not -1 ces_out_servicegrid_polling_interval=models.IntegerField(default=-1, editable=False) -- You received this message because you are subscribed to the Go

Re: Django Modeling setting an integer value to a negative value

2014-09-15 Thread Michael Martin
bjects>. Default is True. On Mon, Sep 15, 2014 at 6:09 PM, Michael Martin wrote: > Is it possible to default a integer to a negative number with Django > Modeling? > > I did the following, but the value in the display shows 1 not -1 > > > ces_out_servicegrid_poll

Re: Django Modeling setting an integer value to a negative value

2014-09-15 Thread Michael Martin
Sorry, I am just blind as a bat. I didn't realize that there were two settings with very similar names. On Mon, Sep 15, 2014 at 6:09 PM, Michael Martin wrote: > Is it possible to default a integer to a negative number with Django > Modeling? > > I did the following, but

What't the best way to track created by and modified by in Django 1.7?

2014-09-15 Thread Michael Martin
Hello, I am sure that I am not the first person to ask this question, but I want to know the best way to track who created or modified a record in my settings defined within models.py. Is there something new and great added to 1.7 or something that already exists in older versions? Thank you in

Re: User Created Objects (models)

2014-09-16 Thread Michael Martin
Mike, Thanks for responding. I seem to be getting an error when I try to make foreign keys in my model. Do you have any idea why? My Model that I am adding is called GeneralSetting I am now importing: from django.db import models from django.contrib.auth.models import User I added under my cla

Re: What't the best way to track created by and modified by in Django 1.7?

2014-09-16 Thread Michael Martin
e case is fairly > generic), you might find some pre-rolled django apps that can help: > > https://www.djangopackages.com/grids/g/versioning/ > > I can't speak from experience on any of them, but they exist, and you > might find that one of them meets your needs. > >

UdateView Issues

2014-09-17 Thread Michael Martin
I was looking into the generic views that existed and I hoping that this view would work for me. I expect that the view will display current model as an editable form. But I am having issues, I get some odd exception. Can someone that has experience please help me? UpdateView *class *django.

Re: UdateView Issues

2014-09-17 Thread Michael Martin
Collin, You are right I was missing the .as_view() I am now getting an exception: Exception Value: Generic detail view GeneralConfigurationUpdate must be called with either an object pk or a slug. I looked at the example here and I don't see anything mentioning setting up a slug. I believe a

Write Multiple Text Files into a Single CSV File

2014-12-31 Thread Martin Mirero
Hi folks, I'm just cutting my teeth on Python/Django and need some assistance on something I've been grappling with for a few days: - I have a bunch of text files on disk that all have the same basic format: first line is the *title* and the rest is the *body* - I want to create one CS

Re: is there a Django library for AJAX support

2015-01-05 Thread Martin Formanko
In the past (2 years ago), when I used dajaxice, it was quite unstable and definitely not robust - it took some time after I understood how to react to different (erroneous) behavior. It would be better that time to code my own library, so that I could understand it more deeply in case of errors (I

Django and sessions race condition

2013-12-11 Thread Martin F
I have lost one day with struggling with django sessions and it seems that I am not really able to resolve it without coding my own sessions middleware or using some locking. The problem is, sessions are not stored even if the saving is triggered manually. It happens now and then, because of

Re: Fast and Easy way to check if an instance of an Model exists in the Database

2014-01-16 Thread Martin Marrese
; > bg, > Johannes > Perhaps get_or_create ( https://docs.djangoproject.com/en/dev/ref/models/querysets/#get-or-create) ? Martín -- Martin Marrese marr...@gmail.com +54 911 5112 9448 -- You received this message because you are subscribed to the Google Groups "Django users" grou

admin ViewDoesNotExistError

2014-06-28 Thread Martin Spasov
Hello guys, I am following the Tango with Django tutorial and cant access my admin site. For the past hour and a half I was trying to figure out why i get the following

Re: Login

2017-12-04 Thread Martin Peveri
Check this: https://simpleisbetterthancomplex.com/tutorial/2016/06/27/how-to-use-djangos-built-in-login-system.html El lunes, 4 de diciembre de 2017, 14:49:32 (UTC-3), chaitanya.creator escribió: > > Hi > i am new users django .please help in making a login system using django > Thank you >

PDF page break

2016-05-22 Thread Suzal Martin
I wants to know how to use the page break for PDF having more no of rows, including header and footer. -- 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-u

Re: Post doesn't declare an explicit app_label and either isn't in an application in INSTALLED_APPS

2016-05-24 Thread Paul Martin
pment server at http://127.0.0.1:8081/ > Quit the server with CONTROL-C. > /home/martin/Downloads/site1/site1/reg/models.py:30: > RemovedInDjango19Warning: Model class site1.reg.models.Post doesn't declare > an explicit app_label and either isn't in an application in INS

Re: jasig cas integration

2016-07-31 Thread Martin Pépin
Hi, Jasig works perfectly fine with django-cas but the django-cas-ng module has to be prefered to it's old and no longer supported predecessor. Cheers ! Martin Pépin Le 31/07/2016 à 13:48, Mahyar Damavand a écrit : > Hi all, > Is it possible to integrate django-cas client with

Password hashing parameters selection methodology description

2016-12-23 Thread Martin Koistinen
Django has a very nice implementation for hashing passwords using PBKDF2 and a number of iterations to increase the work-load. Thanks! I know this is very customizable and I know how to do this. This post is not about "how". What I would like to know is the methodology and "inputs" into decidin

Re: template not exist error snap in attechment

2019-01-11 Thread Martin K
> > TEMplate DIrectory > PROJECT/APP/template/blog/detail.html > > You see directly in the error that template should be located in PROJECT/APP/template/blog/*post*/detail.html -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe f

Question about makemigrations

2019-06-21 Thread Martin Kong
Hello I am new to django, and i am following the tutorial provide in github, from the tutorial. The tutorial I am following is https://github.com/django/django/blob/master/docs/intro/tutorial02.txt and start from 227, it shows the following instructions: .. console:: $ python manage.py makemigra

Re: Question about makemigrations

2019-06-21 Thread Martin Kong
Hello I make python manage.py migrate instead,but that should be the next step tho Regards Martin On Fri, 21 Jun 2019 at 7:45 PM, Sebastian Jung wrote: > Hello, > > Do you make python3 manage.py migrate after makemigrations? > > Regards > > Martin Kong schrieb am Fr.,

Update dict JsonField Postgresql

2017-03-27 Thread Martin Peveri
Hi everyone, I have a model model like this: class ItemCampaign(models.Model): campaign = models.ForeignKey( Campaign, related_name="itemscampaign", verbose_name="Item campaña" ) data = JSONField(default=dict) def __str__(self): return self.campaign.name The field dat

Re: Update dict JsonField Postgresql

2017-03-27 Thread Martin Peveri
e: >>> Model.objects.create(data={[..my dicts ]} That's wrong? Thanks! El lunes, 27 de marzo de 2017, 11:52:37 (UTC-2), Melvyn Sopacua escribió: > > On Monday 27 March 2017 05:56:34 Martin Peveri wrote: > > > > > But not working. > > > > >

Re: Update dict JsonField Postgresql

2017-03-27 Thread Martin Peveri
ocessed': False}, { 'number': '1162341721', 'id': 4, 'content': 'hello', 'processed':False}, { 'number': '1162341721', 'id': 5, 'content': 'hello', 'processed': False}]

Re: Update dict JsonField Postgresql

2017-03-27 Thread Martin Peveri
et all the records: objectitem.filter(data__contains=[{'processed': True}]) Thanks!!! El lunes, 27 de marzo de 2017, 14:29:13 (UTC-3), Melvyn Sopacua escribió: > > Hi, > > > > On Monday 27 March 2017 08:50:04 Martin Peveri wrote: >

Re: Update dict JsonField Postgresql

2017-03-28 Thread Martin Peveri
tes, 28 de marzo de 2017, 6:58:51 (UTC-3), Melvyn Sopacua escribió: > > On Monday 27 March 2017 15:03:17 Martin Peveri wrote: > > > Perfect!! This code works: > > > > > > data = objectitem.data > > > > > > data[0]['processed']

Filter list dict in JsonField Postgres

2017-04-03 Thread Martin Peveri
Hi, I have this model: class ItemCampaign(models.Model): campaign = models.ForeignKey( Campaign, related_name="itemscampaign", verbose_name="Item campaña" ) data = JSONField(default=dict) def __str__(self): return self.campaign.name With a record with this data: [{'

How to fix "plural forms expression could be dangerous"

2017-05-18 Thread Martin Brochhaus
hat same faulty expression again when I run makemessages? What would a correct expression look like for Chinese? Best regards, Martin -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receivin

Re: How to fix "plural forms expression could be dangerous"

2017-05-21 Thread Martin Brochhaus
> On Thu, May 18, 2017 at 7:41 AM, Martin Brochhaus > > wrote: > > Hi everyone, > > > > in my project, I am generating my .po files like this: > > > > python manage.py makemessages --ignore=node_modules/* > --ignore=*migrations/* > > --ignore=*

NoReverseMatch password_reset Error

2015-09-17 Thread Martin Jablečník
Hello, on Stackoverflow I created this question: http://stackoverflow.com/questions/32625997/upgrade-django-and-noreversematch-password-error Do you know anybody how can I fix it? I tried somethong from this: https://docs.djangoproject.com/en/1.8/releases/1.6/#django-contrib-auth-password-reset-

Re: Django multiple Model Forms in template

2018-06-23 Thread martin . ma012500
Hi. I have changed views.py last line to this: return render(request, 'assumptions.html', {'formset': formset,'model_names': model_names,'name': name}) As a result, it outputted more forms, however they do not save to model forms to database and raise Validation Error ['ManagementForm data is m

Re: MDN Locallibrary project - syntax error on 'export DJANGO_DEBUG=False'

2019-10-11 Thread John Martin
Try retyping the lines from scratch. You may have picked up a unicode version of single quote, or similar substitution, through copy/pasting. John On 11/10/2019 14:12, fishbite wrote: Hi there, I've been working on the MDN Locallibrary project and am just preparing to publish the website on

Re: How to handle platform dependent settings?

2008-08-29 Thread Martin J. Laubach
> > If it's mostly paths that you need to change, check out: > > >http://rob.cogit8.org/blog/2008/Jun/20/django-and-relativity/ There's a much easier (IMO anyway) method that does not involve messing with settings.py. If you just want to find out the directory of the current application, you ca

Re: Deployment Tool Recommendation

2009-07-15 Thread martin f krafft
t; > No, I don't see a reason not to do it that way. I just can't directly > su to the other user due to the lack of a password. sudo -u otheruser -i -- martin | http://madduck.net/ | http://two.sentenc.es/ if voting could really change things, it would be illegal.

caching generated content from the filesystem with Django

2009-05-22 Thread martin f krafft
ache framework as much as possible for this? Any other thoughts or concerns? Thanks, -- martin; (greetings from the heart of the sun.) \ echo mailto: !#^."<*>"|tr "<*> mailto:"; n...@madduck "i must get out of

When do snippets get into Django?

2009-05-22 Thread martin f krafft
for integrating such external functionality into Django's core? PS: Django seems a lot thinner and more elegant than Plone/Zope, so upgrades are likely to be less of a problem, but still... -- martin; (greetings from the heart of the sun.) \ echo mailto: !#^."<*

caching generated content from the filesystem with Django

2009-05-22 Thread martin f krafft
ache framework as much as possible for this? Any other thoughts or concerns? Thanks, -- martin | http://madduck.net/ | http://two.sentenc.es/ "i can stand brute force, but brute reason is quite unbearable. there is something unfair about its use. it is hitting below the

de-facto tagging (was: When do snippets get into Django?)

2009-05-22 Thread martin f krafft
y prefer the core of django > to remain slim. Sounds good, and something like django.contrib is a great way forward. It does leave me wondering what the "de-facto standard" way to tag contents is… -- martin | http://madduck.net/ | http://two.sentenc.es/ &quo

Re: de-facto tagging (was: When do snippets get into Django?)

2009-05-22 Thread martin f krafft
d it find its way into contrib? -- martin | http://madduck.net/ | http://two.sentenc.es/ "geld ist das brecheisen der macht." - friedrich nietzsche spamtraps: madduck.bo...@madduck.net digital_signature_gpg.asc Description: Digital signature (see http://martin-krafft.net/gpg/)

Re: de-facto tagging (was: When do snippets get into Django?)

2009-05-23 Thread martin f krafft
tegrated with Django contrib would help create a tagging standard across Django sites. Or did I misunderstand? -- martin | http://madduck.net/ | http://two.sentenc.es/ "prisons are built with stones of law, brothels with bricks of religion."

Re: de-facto tagging (was: When do snippets get into Django?)

2009-05-23 Thread martin f krafft
- many others too. I think he implicitly meant "everybody who uses tagging does so with django-tagging". But of course, it's still optional, as all the apps in django.contrib should be. You won't be forced to use it, but those who want tagging support need not look any further. -

Re: de-facto tagging (was: When do snippets get into Django?)

2009-05-23 Thread martin f krafft
ifference between it being in contrib and being external is > very minimal to the developer that uses it. I disagree. For me, it's the difference of having to track it myself, or letting my distro do that. -- martin | http://madduck.net/ | http://two.sentenc.es/ "love is a grave menta

validation and the ORM layer

2009-05-25 Thread martin f krafft
reflect the roadmap of Django? Is content validation expected from higher layers and the ORM layer won't do it? -- martin | http://madduck.net/ | http://two.sentenc.es/ "one should never do anything that one cannot talk about af

Re: de-facto tagging (was: When do snippets get into Django?)

2009-05-25 Thread martin f krafft
labeled #1, top-most annoyance with Python, in http://jacobian.org/writing/hate-python/ I think this is strong leverage. ;) > Also, might be a good idea to wait until 1.1 is out the door so > they have time to consider it properly... I couldn't resist the blog comment, but this is go

Re: validation and the ORM layer

2009-05-25 Thread martin f krafft
also sprach Alex Gaynor [2009.05.25.1945 +0200]: > Django does not currently support model-validation, there is > a google summer of code project being done by Honza Kral to add > support for this. Good to know, thanks. This means that the feature won't be in 1.1 though, righ

Re: de-facto tagging (was: When do snippets get into Django?)

2009-05-25 Thread martin f krafft
ke a look and since this is a core feature I am seeking, maybe I can put time into it. But how do we go about a document to specify what goes into contrib, beyond Jacob's three criteria? -- martin | http://madduck.net/ | http://two.sentenc.es/ "da haben wir es also: eine kirchliche

SVN Problems

2010-06-23 Thread Martin 'golodhrim' Scholz
? Greetings -- --- Martin 'golodhrim' Scholz Auf dem Sattler 4 34516 Ederbringhausen Phone: +49 6454 799623 mobile: +49 176 63301749 Fax: +49 6454 e-Mail: scholz@googlemail.com -- You received this message because you are subscribed to the Google Groups "Django users" gr

Re: SVN Problems

2010-06-23 Thread Martin 'golodhrim' Scholz
On Wed, 23 Jun 2010 15:23:44 -0400, Karen Tracey wrote: > On Wed, Jun 23, 2010 at 2:08 PM, Martin 'golodhrim' Scholz < > scholz@googlemail.com> wrote: > >> Hi List, >> >> I try to sync with the svn repo of django but all I get is >> >>

Re: Django 1.1 - Restart required for after creating and saving object for viewing it

2010-01-26 Thread Martin J. Laubach
> post_info_dict = { >     'queryset': Post.objects.all(), You probably don't want to evaluate your queryset here. Drop the .all () and you'll be good. mjl -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

Re: TemplateSyntaxError at /admin/ - 'module' object has no attribute 'rindex'

2010-01-31 Thread Martin J. Laubach
> Caught an exception while rendering: 'module' object has no attribute > 'rindex' Sounds you are using foo.bar instead of 'foo.bar' somewhere (ie. module instead of string). mjl -- You received this message because you are subscribed to the Google Groups "Django users" group. To pos

Re: TemplateSyntaxError at /admin/ - 'module' object has no attribute 'rindex'

2010-01-31 Thread Martin J. Laubach
> 1.    (r'^admin/', include(admin.site.urls)), That looks like it. > I tried putting include('admin.site.urls')) but it could not find > 'admin.site.urls' Do you have 'django.contrib.admin' in INSTALLED_APPS? mjl -- You received this message because you are subscribed to the Goog

generic views 'extra_context' value via function call utility

2007-04-08 Thread Martin J Hsu
I'm new to Django and have been trying to read up on generic views and sessions. I might be missing something, so please correct me as needed. The a value (a callable) in the 'extra_context' dict passed to a generic view (like django.views.generic.list_detail.object_list) can be used to computed

Re: generic views 'extra_context' value via function call utility

2007-04-09 Thread Martin J Hsu
On Apr 10, 10:14 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 4/9/07, Martin J Hsu <[EMAIL PROTECTED]> wrote: > > > > > The a value (a callable) in the 'extra_context' dict passed to a > > generic view (like django.views.gene

Re: generic views 'extra_context' value via function call utility

2007-04-10 Thread Martin J Hsu
google groups gobbled my response and I don't see it...sorry if this turns out to be a repost. On Apr 10, 12:26 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 4/10/07, Martin J Hsu <[EMAIL PROTECTED]> wrote: > > > > > I saw this as a mino

Re: generic views 'extra_context' value via function call utility

2007-04-10 Thread Martin J Hsu
On Apr 10, 4:26 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > > It complicates the implementation, and, as you noted, slows down > slightly for all existing use cases of a callable. > > This isn't a problem in and of itself, except that the only benefit > you get for the complexity and s

Re: {{ perms }} seems to be empty

2007-05-23 Thread Martin J Hsu
> 1. TEMPLATE_CONTEXT_PROCESSORS is not in my settings file. But the docs say > that its default is: ("django.core.context_processors.auth", etc... > That is correct: http://www.djangoproject.com/documentation/settings/#template-context-processors The default isn't explicitly defined in settin

Re: {{ perms }} seems to be empty

2007-05-23 Thread Martin J Hsu
> 1. TEMPLATE_CONTEXT_PROCESSORS is not in my settings file. But the docs say > that its default is: ("django.core.context_processors.auth", etc... > That is correct: http://www.djangoproject.com/documentation/settings/#template-context-processors The default isn't explicitly defined in settin

Re: {{ perms }} seems to be empty

2007-05-23 Thread Martin J Hsu
> 1. TEMPLATE_CONTEXT_PROCESSORS is not in my settings file. But the docs say > that its default is: ("django.core.context_processors.auth", etc... > That is correct: http://www.djangoproject.com/documentation/settings/#template-context-processors The default isn't explicitly defined in settin

Re: Configuring a Django Project for Intranet Deployment

2007-11-11 Thread Martin J Hsu
> could change!)? However, at the same time I want to be able to run the > development environment at http://127.0.0.1/ and want any maintenance > overhead e.g. managing two sets of url.py files or changing any urls expanding on Stefan's solution: You probably want a separate settings.py or at

Re: Freelance Django and Python work

2023-06-30 Thread Carlos Romero Martin
I'm interested Le jeu. 29 juin 2023 à 23:56, M. Guy Sylvestre a écrit : > Je suis intéressé . > > > Le mar. 13 juin 2023, 11:30, אורי a écrit : > >> Hi, >> >> I'm looking for a programmer to hire as a freelancer for Django and >> Python work. >> >> - Experience with Python and Django >> - Exper

Re: Freelance Django and Python work

2023-06-30 Thread Enzo Martin Zotti
Estoy interesado El jue, 29 jun 2023 a la(s) 18:56, M. Guy Sylvestre ( guysylvestre...@gmail.com) escribió: > Je suis intéressé . > > > Le mar. 13 juin 2023, 11:30, אורי a écrit : > >> Hi, >> >> I'm looking for a programmer to hire as a freelancer for Django and >> Python work. >> >> - Experienc

Re: [ANN]: FeinCMS v1.5.0.rc1

2012-02-16 Thread Martin J. Laubach
Well for now you don't NEED to change anything. You'll get those pesky deprecation warnings, but everything should continue to work fine for now, so there's no need to rush things, you can change your code as you go along. mjl -- You received this message because you are subscribed to the Goog

Re: Post data Query Dict - Why not a list ?

2012-02-29 Thread Martin J. Laubach
Also, having a form to parse and validate the POST data is really the way to go. Even if you never actually show the form to the user, for example in an AJAX callback, deferring all that responsibility and just use "form.is_valid()" and "form.cleaned_data" is a lot better than doing parameter v

Re: View loaded twice / Database entry saved twice

2012-08-22 Thread Martin J. Laubach
Also, you should really only do saves on a POST request, never on GETs. mjl -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/jIUH0iInCQ0J. To post

Re: reduce number of DB-Queries

2012-09-21 Thread Martin J. Laubach
> > My problem is when want to display overall player statistics I get about > 1200 DB-Queries. > This is because for each player there will be 5 Queries due to > matches_won, matches_draw, goals, matches_played functions. > First easy optimisation: keep Match.objects.select_related().filter

Re: reduce number of DB-Queries

2012-09-21 Thread Martin J. Laubach
> > Is this how you meant to set the instance variable or did you mean in > another way? > > def __init__(self, *args, **kwargs): > super(Player, self).__init__(*args, **kwargs) > self.matches = Match.objects.select_related().filter( Q(opp1=self) > | Q(opp2=self) ) Yes, t

Re: Stop executing template tag

2012-10-19 Thread Martin J. Laubach
Just put something between the {{ so the templating engine will not be tempted to interpret it. {{ should do the trick, for example. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.goog

Re: How to implement clean() for a model with ManyToMany fields?

2012-10-29 Thread Martin J. Laubach
Basically, you can't. M2m fields are saved after the model is saved, so you either get objects that are not yet ready for that check (as you experienced) or you will test the previous value of the m2m field, neither of which is what you want. You can modify the admin interface and do the valida

Re: Debud setting behaves weird

2011-08-23 Thread Martin J. Laubach
You might want to read the documentation at https://docs.djangoproject.com/en/1.3/ref/contrib/staticfiles/ -- especially the big boxes labelled "Warning". mjl -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on

Re: `manage.py syncdb` fails, but what does the error mean?

2011-10-01 Thread Martin J. Laubach
My guess would be that you named your project directory the same as one of your app directories, that causes all kind of weird import errors. mjl -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit h

Re: Thread-safeness of templates

2011-10-04 Thread Martin J. Laubach
Are you sure your context is thread-safe, ie. it's rebuilt from scratch every time you render an email and not re-used, stored in a global variable, class variable, whatever? Your problem description very much sounds like someone is fiddling with the context while the template is rendering.

Re: Translation problem with percent sign

2011-11-04 Thread Martin J. Laubach
Just remove the line with "python-format" from your translation since it isn't a format string after all. mjl -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/d

Re: Python data structures and the GIL

2011-11-06 Thread Martin J. Laubach
One possibility that springs to mind is shared memory, either the sysv shmem variant or memory mapped files. mjl -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/ms

Re: How to intercept password change in admin module ?

2011-12-01 Thread Martin J. Laubach
How about just listening to pre_save or post_save signals on the User model? mjl -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/C65AzRxHDNwJ. To

Re: Debug = false ruins template

2012-01-23 Thread Martin J. Laubach
Probably you are not serving your static files any more as the built-in staticfiles app only works in debug mode (that's a feature). mjl -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https:

Re: views on one page

2012-11-14 Thread Martin J. Laubach
Do you actually need both as views proper? The easiest thing would be to factor out the fetching part of the kundendaten view, make that return just a dictionary, then call that and update the context in the first view. -- You received this message because you are subscribed to the Google Group

Re: How to implement pre-save operations for inlines in the admin interface?

2012-11-16 Thread Martin J. Laubach
Don't overthink it. If believe you are likely to run into cascading recursive updates, then those cascades will happen no matter where you put the update. You will need to deal with it some way or another (locking, careful ordering, better data structures, whatever), but just moving things

Re: how to use get_queryset in my code

2012-11-20 Thread Martin J. Laubach
Okay. You seem to be rather confused about the django approach to things I'm afraid. (a) You use raw sql instead of django's ORM mapper. That's okayish, but then you're on your own for building your queries and have to manually do validation and escaping and whatnot, which is, as you notice

Re: how to use get_queryset in my code

2012-11-20 Thread Martin J. Laubach
> > I tryed first this part with db models. but mssql doesnt work on it... > BTW, why? I see there's a django-mssql, that should allow you to connect to the database. Doesn't it work with your version? I've never tried it though, I just googled around a bit... -- You received this messag

Re: post_save signal getting called twice !

2013-02-08 Thread Martin J. Laubach
> > further, i tried putting a sender argument in receiver, but the sender , i > found (by set_trace) is Cart_cartitems, how can i import this 'shoppingcart.models.Cart_cartitems'> when its only a intermediary model > that django's creating. I think you want Cart.cartitems.through

Re: django 1.4.3 to 1.4.4 upgrade fails - Bad magic number Import Error

2013-02-21 Thread Martin J. Laubach
> > return getpass.getuser().decode(locale.getdefaultlocale()[1]) > TypeError: decode() argument 1 must be string, not None > It needs a valid locale to be set in the environment. Try setting LC_ALL=en_US before running syncdb. mjl -- You received this message because you are su

Re: Get all objects that don't belong to M2M

2013-03-08 Thread Martin J. Laubach
Something like this (totally untested though) Product.objects.exclude(pk__in=Product.subproducts.through.values_list( 'product_id', flat=True)) perhaps? Cheers, mjl -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe fr

Re: Getting the selected value on a Django forms.ChoiceField

2013-03-28 Thread Martin J. Laubach
Continent = form.cleaned_data['Continent']Continent = dict(form.fields['Continent'])[Continent] The obvious confusion stemming from the upper case variable aside, the second line is total nonsense. Drop it and you'll be golden. Cheers, mjl -- You received this message because you a

Re: Django Generic ForeignKey vs Multiple Foreign Key Fields

2013-04-08 Thread Martin J. Laubach
It's simply a question of what you want to model. *GenericFK* means for each instance "I have a relationship with some other (undefined) entity". *MultipleFK* means "I have relationships with both well-known entities A and B". Totally different things. Cheers, mjl -- You received

Re: Must AUTH_USER_MODEL be in "models.py"?

2013-04-28 Thread Martin J. Laubach
I'd guess it's the usual model-magic dealing with app_label, which causes them not to appear under "app1" (because, well, you defined them somewhere else). Try to set app_label manually in your model's Meta class. Cheers, mjl -- You received this message because you are subscribed to

Re: Object Lookup after Save

2013-05-29 Thread Martin J. Laubach
Well, that is what repeatable read is supposed to do -- once you do a Foo.objects.all() (or whatever) query, re-running the query will give you the same result. That's why it's called repeatable read. You have to either start a new transaction to break that visibility barrier or not use repea

Re: or-ing to QuerySets turns INNER into LEFT OUTER joins?

2013-07-26 Thread Martin J. Laubach
> This is still about 50 times better than the form with Q objects and > LEFT OUTER joins. This is rather unusual. A join in the database should be quite a bit faster than doing things manually, except if the joined tables produce massive amounts of data. This suggests that you're missing

Re: Creating this query with django Models

2011-04-13 Thread Martin J. Laubach
What problems did you encounter? It's easier to help you knowing what went wrong. mjl -- 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,

Re: Creating this query with django Models

2011-04-13 Thread Martin J. Laubach
What problems did you encounter? It's easier to help you knowing what went wrong. mjl -- 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,

Aw: More trouble with select_related()

2011-04-14 Thread Martin J. Laubach
Sounds like a join with a table that doesn't have all the rows. Let me guess: the tables have been filled by some other program and you are just reading them from Django -- and you are missing a blank=True, null=True on a ForeignKey in your Django models somewhere. Cheers, mjl --

Re: Call SQL function within Model

2011-06-28 Thread Martin J. Laubach
You probably want to use something like https://docs.djangoproject.com/en/1.3/ref/models/querysets/#extra to add custom sql expressions to your querysets. mjl -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discus

Re: Django admin: naming subclass objects, fieldsets and displaying items from other class.

2011-07-17 Thread Martin J. Laubach
1. Define a unicode method on Source that returns whatever you want to display. 2. Missing comma in one-element tuple. mjl -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.

Re: Generate a unique username for django.contrib.auth

2011-01-15 Thread Martin J. Laubach
> I cannot simply copy the email to the username because the username must be > less than 30 characters and, after looking into my database, many email > addresses go over that. Note that you can fix that quite easily by putting something like this for f in User._meta.fields: if f.n

Re: Creating this query with django Models

2011-04-09 Thread Martin J. Laubach
Let's see... Since there is no aggregate on your outer select, the GROUP BY is basically reduced to a DISTINCT, so we can just do a distinct() on the query set. The JOINs come automatically as soon as you have ForeignKey fields (just remember to do a select_related() to avoid excessive quer

Re: Django 1.6.4 debug-toolbar confusing error

2015-03-08 Thread Martin Torre Castro
I have same problem. May it be related to urlconf? On Friday, 23 May 2014 12:06:19 UTC+2, Florian Auer wrote: > > Hi > > I am running 2 django 1.6.4 projects, both with debug toolbar enabled. > > The first one ist a simple project, following the a cookbook tutorial and > the toolbar works fine in

Re: Django 1.6.4 debug-toolbar confusing error

2015-03-08 Thread Martin Torre Castro
I fixed it by following this http://django-debug-toolbar.readthedocs.org/en/1.2.2/installation.html In my case, I had the wrong name in INSTALLED_APPS and I lacked this piece of code in urls: if settings.DEBUG: import debug_toolbar urlpatterns += patterns('', url(r'^__debug__/'

Heroku: without NULL bytes error with "2 scoops" structure

2015-06-13 Thread Martin Torre Castro
Hello, I posted this because I can't deploy a webapp with Heroku. Any ideas? http://stackoverflow.com/questions/30816367/heroku-string-without-null-bytes-with-several-requirements-files Thanks for reading -- You received this message because you are subscribed to the Google Groups "Django use

<    1   2   3   4   5   6   >