Re: Abridged summary of django-users@googlegroups.com - 18 updates in 5 topics

2024-02-22 Thread jonas john
Hello guys, My name is Jonas, please I would be happy to join the project +234 8176473566 On Wed, 21 Feb 2024 at 14:02, wrote: > django-users@googlegroups.com > <https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!forum/django-users/topics> > Googl

django.core.exceptions.FieldError: Related Field got invalid lookup: relation_type

2021-02-22 Thread Jonas Kiefer
tion_type =MetadataRelationEnum.HARVESTED_THROUGH.value) django raises django.core.exceptions.FieldError: Related Field got invalid lookup: relation_type. Why i can't use the related fields as filters if i use the through argument for the m2m field? greetings Jonas -- You received

Django Sass verwenden

2017-05-01 Thread Jonas Niedermair
Ich habe vor einiger Zeit begonnen Django zu lernen. Bisher habe ich immer direkt CSS verwendet. Ich möchte jedoch Sass verwenden, weiß jedoch nicht wo ich die Sass Dateien in meinem Django Projekt speichern soll und wie ich die Sass Datein am besten in CSS konvertieren kann. Ich habe bereits

Many to Many in Django Admin

2017-02-23 Thread José Vicente Jonas França
Hello! I Like to know if its possible to display the many-to-many field in both pages of Model at Django Admin. If it is possible how can i do this? Thanks. Best Regards, José Vicente. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsu

Re: parallel test running throwing pickleError

2016-08-04 Thread Jonas Trappenberg
You can debug by adding code like this to django/test/runner.py just after it determined the args (around line 315 in django 1.9): import pickle for arg in args: print(arg) pickle.dumps(arg) I found that pickle raises the same exceptions as cPickle, but, since it's all Python, lets you

Re: How force DJANGo choice MEDIA_URL or STATIC_URL in template?

2016-03-01 Thread Jonas Svensson
It seems like you want to use display a default picture if the user does not have one. {% load static %} {% static "images/default_pic.jpg" as default_pic %} {{ account.accountuserinfo.picture|default:default_pic }} Cheers On Monday, February 29, 2016 at 10:49:53 PM UTC+1, setivo...@

Re: How to install on windows?

2016-02-16 Thread Jonas Svensson
Hi, you already have virtualenv with python3.5. To create a new virtual environment you can do. c:\Temp>c:\Python35\python c:\Python35\Tools\Scripts\pyvenv.py myenv (https://docs.python.org/3/library/venv.html) Cheers On Monday, February 15, 2016 at 1:49:33 AM UTC+1, bob gailer wrote: > > I t

Re: Why do the IDs in many to many join tables change when there is no change.

2015-01-19 Thread jonas hagstedt
First off: this sounds like a bug, please log an issue on Github with as much info as possible (router, serializer and model etc. if you can) I would recommend not using `SelfPublishModel` in this scenario, instead publish the event manually. If you do it manually you lose out on having it publi

Re: Need some advice on how to go about building a real time web app.

2015-01-03 Thread jonas hagstedt
tweak that code and add it to your project. On Friday, January 2, 2015 4:12:10 PM UTC+1, Shazwi Suwandi wrote: > > Michiel: Ah, that's myopic on my part. Both sides are important. > > Jonas: I see I see. I keep thinking that libraries will make my life a bit > easier but m

Re: Need some advice on how to go about building a real time web app.

2015-01-02 Thread jonas hagstedt
Personally I don't use any library between Angular and Django (so I don't know about django-angular). I create specific templates for Angular so I don't have to change the {{ and }] syntax (you can also use the {% verbatim %} tag in your templates if you don't want to create individual template

Re: Swampdragon, the realtime framework for Django seems interesting. But will it scale ?

2014-12-17 Thread jonas hagstedt
to focus > on the positives more than the negatives. > > Cal > > On Wed, Dec 17, 2014 at 1:33 PM, jonas hagstedt > wrote: >> >> You are right about pep8, there were two pep8 violations in there (fixed >> that after reading this). >> >> * There i

Re: Swampdragon, the realtime framework for Django seems interesting. But will it scale ?

2014-12-17 Thread jonas hagstedt
e wonky API though if you wouldn't mind. Cheers On Wednesday, December 17, 2014 12:23:52 AM UTC+1, Cal Leeming wrote: > > This actually looks like an interesting framework, and I'd like to start > off with the good points. > > The author (Jonas) has very kindly shared his

Re: PDF generator in Django

2013-08-06 Thread Jonas Geiregat
On 04/08/2013, navnath gadakh wrote: > Which is best tool to generate PDF in python django I sucessfully used django-appypod before. It uses a rather strange library called appy.pod that uses openoffice odt files as a template. If you have an openoffice server running you can generate a pdf out o

Re: Something similar to a WAMP stack for Django?

2013-06-05 Thread Jonas Geiregat
On 05 Jun 2013, at 18:07, Nafiul Islam wrote: > Hi! > > Is there something similar to a WAMP stack for django and python development, > like there is for PHP? It gives you a better way of emulating how a real > server would work. There is: http://bitnami.com/stack/django -- You received th

Re: linux or windows

2013-05-31 Thread Jonas Geiregat
On 31 May 2013, at 13:26, Kakar Arunachal Service wrote: > thanks!! So, for the production purpose, one must use linux? > No you can also run django and python applications in general on a window system, even in production. But in is most cases it's easier to deploy a django/python applicatio

Re: CBVs and using existing forms for user authentication etc

2013-05-31 Thread Jonas Geiregat
On 31 May 2013, at 12:36, tony gair wrote: > > I'm trying to write my first django app using cbv's and good practice ala 2 > scoops! > > (thanks for all the help so far in this forum btw!) > > I have constructed the app using django braces and CBV's and have noticed > that I can only authent

Re: linux or windows

2013-05-31 Thread Jonas Geiregat
On 31 May 2013, at 13:11, Kakar Arunachal Service wrote: > Hi! > I know this question is one absurd question, but just out of curiosity, is it > important to use linux other than the windows, related to django. Cause i'm > in windows, and if it is, then i was thinking to use Ubuntu. Please advi

Re: App-structure: how to have a bunch of data in all the pages.

2013-02-05 Thread Jonas Geiregat
On Tue, Feb 05, 2013 at 02:06:28AM -0800, Stefano Tranquillini wrote: > Now, i can create a base.html template where i render the data. but, how > should i do the population of these lists? > Should i create a middleware that for each request populates the lists? > or what? I think that a Context

Re: how to deploy django project to lighttpd server

2013-01-07 Thread Jonas Geiregat
I have several account on djangoeurope.com. What I mostly do is like you did, create a new project using their admin interface. Next I backup the RUN script and delete that directory completely! The I checkout my project code, just make sure the project you are checking out (or copying) has th

Re: Converting Django app into a Desktop app

2012-12-18 Thread Jonas Geiregat
> Hi > > I am very comfortable with Django, and I was wondering about whether there is > some way to convert a Django web app into a Desktop app (may be not 100%), so > that I can distribute it to users. May be wrapping it in a light web server > "if there is something like this". > > >

Re: Foreignkey Form

2012-12-12 Thread Jonas Geiregat
Thanks for the response Serge, So basically I was on the right path. But I don't see what the DetailView has to do with this ? Don't you mean the CreateView ? Jonas. > 1) you should create a form for building > 2) you should create a form for inhabitant and set key to the

Foreignkey Form

2012-12-12 Thread Jonas Geiregat
inhabitant = self.inhabitant_form.instance self.inhabitant.building = building self.inhabitant.save() Am I on the right path or are there are better ways of handling such situations ? Regards, Jonas. -- You received this message because you are subscribed to the Google Groups "Django users&quo

django CMS security release issued

2012-12-04 Thread Jonas Obrist
. Read more at http://bit.ly/django-cms-2-3-5 - Jonas -- 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-user

can't get translation to work

2012-11-16 Thread Jonas Geiregat
I've got an app with the following translation settings: # Language code for this installation. All choices can be found here: # http://www.i18nguy.com/unicode/language-identifiers.html LANGUAGE_CODE = 'nl-BE' gettext = lambda s: s LANGUAGES = ( ('en', gettext('English')), ('nl', gettext('

model field not null

2012-09-26 Thread Jonas Geiregat
. But I want a strong, fully tested, business model from the beginning. As this is a CharField, according to the docs, I cannot use null=True since empty string will get stored as empty strings and not as NULL. Is this an appropriate way of modeling my models, or are there other solutions ?

Re: content management in django

2012-09-24 Thread Jonas Geiregat
I would advise you to take a look at feincms, it has exactly what you need. > Hello, > > I'm converting a static website to a Django application and I need a piece of > advice from more experienced people what is the right way to store content. > The website will have some static pages like "ab

Re: testing a django package

2012-09-13 Thread Jonas Geiregat
t; your tests/urls.py file. > > And everything will be fine : ) > > Le mercredi 12 septembre 2012 23:36:03 UTC+2, jonas a écrit : > > > > > I think you could create an urls.py file for your tests and attach > > your views there. Then use the test client to dir

Re: testing a django package

2012-09-13 Thread Jonas Geiregat
> will be some reversing involved I think. > > self.client.get(reverse("ajax_form_view")) > > I don't see how the client will find my urls.py file and without the broader, > actual django application as context ? > > >> >> Now, this is probably

Re: testing a django package

2012-09-12 Thread Jonas Geiregat
ing JS for this purpose. > > Thomas > > 2012/9/12 Jonas Geiregat : >> >> I can now show you what I really would like to write tests for. >> >> https://github.com/jonasgeiregat/django-ajax-forms >> >> The code I would like to test is in ajax_forms

Re: testing a django package

2012-09-12 Thread Jonas Geiregat
gt;> . Class based views can sometimes be tested without any of the former by >> just testing the methods in them >> . You can always use mocking library >> . Tests are basically just python code with a lot of asserts, you can >> always add viewed in them >&

Re: testing a django package

2012-09-11 Thread Jonas Geiregat
he methods in them > . You can always use mocking library > . Tests are basically just python code with a lot of asserts, you can always > add viewed in them > . You can use fixtures for test data if you see fit > > Hope this helps! > > Thomas > > On Sep 10,

Re: Marketplace for Django apps

2012-09-11 Thread jonas
I want to ask you again, what you think about such service? Would you buy or sell apps (or paid support) out there and why? If the apps are more then good enough and would spare companies time and there are no better or equal opensource alternatives, then yes I do believe some people might

testing a django package

2012-09-10 Thread Jonas Geiregat
ng actual django applications. Any help is appreciated. Jonas -- 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

[ANN] django-ajax-form-mixin v.0.0.1

2012-09-03 Thread Jonas Geiregat
http://django-ajax-form-mixin.readthedocs.org/en/latest/ Hope you enjoy it! Regards, Jonas Geiregat. -- 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

Re: model sends two requests

2012-07-10 Thread jonas peters
Thanks, helped me a lot. Em segunda-feira, 9 de julho de 2012 17h53min23s UTC-3, Dennis Lee Bieber escreveu: > > On Mon, 9 Jul 2012 09:26:15 -0700 (PDT), jonas peters > declaimed the following in > gmane.comp.python.django.user: > > > I have a model and use standard

model sends two requests

2012-07-09 Thread jonas peters
hi! I have a model and use standard django administration, when a user clicks the save button it sends the request, it takes time to respond and the user clicks the save button again and then sends another request, and creating two records. have some setting in django to avoid this problem? I t

Django CMS 2.3 Released!

2012-06-29 Thread Jonas Obrist
Today I am very excited that we just released Django CMS 2.3, with Django 1.4 support. You can read the release notes at Django at http://bit.ly/django-cms-23. Best regards, Jonas 'ojii' Obrist -- You received this message because you are subscribed to the Google Groups "Djan

Re: how to manage range of hours in models and forms in django1.4

2012-06-29 Thread jonas
Regards, Jonas; -- 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+unsubscr...@googlegroups.com. For more optio

Re: 'CSRF verification failed." from django.contrib.comments. can you help solve it? django 1.3

2012-06-28 Thread Jonas Geiregat
On do, jun 28, 2012 at 09:14:36 -0700, brycenesbitt wrote: > http://127.0.0.1:8000/comments/post/>" method="post"> >/> >id="id_timestamp" /> >value="6e85e1c846861c80575ce435b21a855706725b00" id="id_security_hash" > /> After the starting form tag add {% csrf_token %} More

Translated urls and accept-language header

2012-06-27 Thread Jonas Geiregat
Hello, I've setup translated urls for some languages. The default language for django has been set to en-US. If you request a page /registration/ with nl-NL as Accept-Language header, I get a 404. I wasn't expecting such behaviour. Rather I was hoping I would be redirected to /registratie/ ,th

Re: Server error caused by too many database look-ups

2012-05-04 Thread Jonas Ghyllebert
; Koen > > Op woensdag 2 mei 2012 21:37:30 UTC+2 schreef Jonas Ghyllebert het > volgende: >> >> Hi everybody, >> >> I've got a problem while accessing a model in the Django Adminpanel. >> I uploaded the models file, i hope this makes it easier for you to

Server error caused by too many database look-ups

2012-05-02 Thread Jonas Ghyllebert
Hi everybody, I've got a problem while accessing a model in the Django Adminpanel. I uploaded the models file, i hope this makes it easier for you to understand my problem. When I try to add or view a *Region *in the adminpanel, the server usually gives me an 500 server error. This is what i ge

Re: Testing Google Charts within Django Unit Tests

2012-04-26 Thread Jonas Geiregat
> I'm looking for a way to test the data that a google chart displays on > a web site with a unit test. Is this at all possible, and if so, where > should I look to accomplish this? I've tried accessing the Google > visualization datatable that is used to create the chart, but it > doesn't seem t

Re: Where are the women?

2012-04-25 Thread Jonas Obrist
ught that it is unnecessary, as everything usually mentioned in a code of conduct is covered by Swiss law anyway (especially discrimination). Jonas Obrist On Wednesday, April 25, 2012 8:28:07 PM UTC+2, Katie Cunningham wrote: > > If you want to get more women to a conference, a few things have

Re: Slow page in admin

2012-04-25 Thread Jonas Ghyllebert
the select_related method? On Wednesday, April 25, 2012 2:52:13 PM UTC+2, akaariai wrote: > > On Apr 25, 3:35 pm, Jonas Ghyllebert wrote: > > I'm new to Django and I would like to apologize if it's been asked > before. > > > > I have two models *Regi

Slow page in admin

2012-04-25 Thread Jonas Ghyllebert
I'm new to Django and I would like to apologize if it's been asked before. I have two models *Region *and *Zip*. In the admin system, Zip is an inline model in Region Whenever i want to add a Region it shows directly 25 listboxes with zips. This however takes a long time to load the page and re

Re: mocking out a Model

2012-04-15 Thread Jonas Geiregat
>> @patch('apps.market.models.House') > > Is create house in apps.market.models, or is it somewhere else? If > it's somewhere else, mock it relative to that file eg: > @patch('apps.some_file.House') def create_house can be found in apps/deps/house_factory.py Inside house_factory I ' from apps.m

mocking out a Model

2012-04-14 Thread Jonas Geiregat
I'm also wondering if it's possible to inspect MockedHouse to see if it has for example some tags added to it. Any help is appreciated, Jonas. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send emai

DjangoCon Europe 2012 Early Bird registration and Call For Papers

2012-03-20 Thread Jonas Obrist
.djangocon.eu If you have any questions or problems, don't hesitate to contact us. Best regards, Jonas Obrist, Co-Chair DjangoCon Europe 2012 -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: RequestContext(request)

2012-01-09 Thread Jonas Geiregat
I'm no expert but the problem should most likely lay with how STATIC_URL is populated. When the line: str(request.POST.get('question')) , email = "" + > str(request.POST.get('email'))) >p.save() > >else: >form = newform() # An unbound form > >return render_to_respon

Re: RequestContext(request)

2012-01-09 Thread Jonas Geiregat
I'm no expert but the problem should most likely lay with how STATIC_URL is populated. When the line: str(request.POST.get('question')) , email = "" + > str(request.POST.get('email'))) >p.save() > >else: >form = newform() # An unbound form > >return render_to_respon

Re: Joining Tables

2012-01-08 Thread Jonas Geiregat
> Thanks Jonas, the statements you had provided would give me a list of users > who belong that group, but how can I retrieve the photos of those users? > Actually I was looking for a single statement which would join all these > tables and returns the data based on the Group

Re: Joining Tables

2012-01-08 Thread Jonas Geiregat
> The user field is a foreign key to django auth User model. Each user is > assigned to a group (django Auth Group model). I want to retrieve all the > photos which belongs to users of a specific group. How can it be done? > from django.contrib.auth.models import Group group = Group.objects.

Re: Joining Tables

2012-01-08 Thread Jonas Geiregat
> The user field is a foreign key to django auth User model. Each user is > assigned to a group (django Auth Group model). I want to retrieve all the > photos which belongs to users of a specific group. How can it be done? > from django.contrib.auth.models import Group group = Group.objects.

Re: Creating clean URLS

2012-01-01 Thread Jonas Geiregat
> I want my url to be free from parameters being passed. > > I have handled the request in "twitter_after_auth" function of view > and > > I am redirecting user to the new url "http://localhost/create_cr/"; > > but instead the url shows some additional parameters that I have > already handled.

Re: Django CMS and django-admin-tools are together?

2011-12-27 Thread Jonas Obrist
"but I read that django-admin-tools is one of django-cms apps." that is incorrect. The initial design and idea started on our blog [1] but it was never implemented by us, so someone else did and thus django-admin-tools was created. [1] https://www.django-cms.org/en/blog/2009/10/29/dashboard-pro

Re: Django CMS

2011-12-27 Thread Jonas Obrist
Hi there, if you're asking about django CMS (https://django-cms.org), you should use the proper mailing list to ask questions: https://groups.google.com/forum/#!forum/django-cms Also, I do not fully understand your questions. Could you maybe try to explain a bit better what you're trying to ach

Keep getting TemplateDoesNotExist when unit testing

2011-12-24 Thread Jonas Geiregat
Hello, I'm fairly new to Unit Testing. As I'm trying to setup a simple unit test in one of my Projects, it keeps returning a TemplateDoesNotExist Exception. It looks like for some reason the unit test framework can't locate my template directory I've correctly defined in settings.py Here's the

Keep getting TemplateDoesNotExist when unit testing

2011-12-24 Thread Jonas Geiregat
Hello, I'm fairly new to Unit Testing. As I'm trying to setup a simple unit test in one of my Projects, it keeps returning a TemplateDoesNotExist Exception. It looks like for some reason the unit test framework can't locate my template directory I've correctly defined in settings.py Here's the

DjangoCon Europe 2012: June 4-6, in Zürich, Switzerland

2011-12-20 Thread Jonas Obrist
see you in Zürich in June! Yours, Jonas Obrist [1] http://www.stadionletzigrund.ch/ -- 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/-/WfIR6rhGBlw

Re: Can model subclass change field options?

2011-10-02 Thread Jonas Cleve
help so far. Jonas Am 02.10.2011 19:41, schrieb Brian Mehrman: > HI, Artemis, > > If I understand you correctly you want to use a Select Widget for your > CharField. And feed your choices to the select widget. > > In your admin.py file of your app you will want to override t

Re: Can model subclass change field options?

2011-10-02 Thread Jonas Cleve
HI, Artemis, If I understand you correctly you want to use a Select Widget for your CharField. And feed your choices to the select widget. In your admin.py file of your app you will want to override the model's form field. # models.py from django.db import models myModel(models.Model): pers

Re: Does ModelForm follow ForeignKey relations ?

2011-09-20 Thread Jonas Geiregat
> So you want to edit the User object through the ModelForm of the other model, > or you just want to display it? > I want to edit the User object through the ModelForm. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group

Re: Does ModelForm follow ForeignKey relations ?

2011-09-20 Thread Jonas Geiregat
> Hi, > > ModelForm should automatically create a dropdown list for your foreign key. > If there is nor such drop-down created probably you are doing something wrong. > I don't want the dropdown list I want the values of the foreinkey to be expaneded into fields For example I have user as For

Does ModelForm follow ForeignKey relations ?

2011-09-20 Thread Jonas Geiregat
creating froms from models but didn't found any clues. Is this even possible at all ? Now I'm implementing the form by hand , which is a lot of work , being able to use the ModelForm would speed up this process. Regards, Jonas Geiregat jo...@geiregat.org -- You receive

Re: order by + group by

2011-09-14 Thread Jonas H.
On 09/14/2011 11:37 AM, Иван Иванов wrote: The problem here is, like Peter said, that you cannot order before grouping. And that's very annoying. Of course you can, using a subselect just like I showed. SQLite example: > .schema CREATE TABLE a (name varchar, mod int); e> select * from a; b1|1

Re: order by + group by

2011-09-14 Thread Jonas H.
On 09/14/2011 04:35 AM, Peter of the Norse wrote: What are you trying to do? The outer GROUP BY destroys the inner ORDER BY. Try putting them on the same level and see what happens. Say I've got an Event table and some records like this name: foo, timestamp: 9 pm name: foo, timestamp: 10p

order by + group by

2011-09-11 Thread Jonas H.
Hi! How can I express this SQL query SELECT ... FROM ( SELECT ... FROM ... ) in the ORM? Specifically, I want to express SELECT ... FROM ( SELECT ... FROM app_model ORDER BY field1 ) GROUP BY field2 Is it possible without writing SQL by hand? Thanks, Jonas -- Django

Re: Weird Problem: Template Shows Templatevariable's Name Instead Of It's Value

2011-08-14 Thread Jonas H.
On 08/14/2011 09:57 PM, bruno desthuilliers wrote: {% for current, entry, month, n in months %} Please think about what "months" is here... Yes, a list of dicts. So this line is the equivalent of: current = months[0] # first dict in the list entry = months[1]# second dict in the list month

Re: Redisplay form with different field value?

2011-08-13 Thread Jonas H.
On 08/13/2011 05:00 PM, Karen Tracey wrote: Plus, afaik, fields can not access form instances so this code would have to live in the form subclass -- not practical in my use case. Where I have done this (reluctantly) has been in the form (or perhaps it was the field) clean method, where self is

Re: Redisplay form with different field value?

2011-08-13 Thread Jonas H.
On 08/13/2011 06:33 AM, Karen Tracey wrote: On Thu, Aug 11, 2011 at 7:03 AM, Jonas H. wrote: On 08/09/2011 12:45 AM, Jonas H. wrote: Hello list! Is there any way to use a different value for a field when re-displaying a form? I.e. if a user enters '42' into an IntegerField bu

Re: Redisplay form with different field value?

2011-08-11 Thread Jonas H.
On 08/09/2011 12:45 AM, Jonas H. wrote: Hello list! Is there any way to use a different value for a field when re-displaying a form? I.e. if a user enters '42' into an IntegerField but made the other fields not validate, how could that IntegerField be re-displayed with '43

Redisplay form with different field value?

2011-08-08 Thread Jonas H.
Hello list! Is there any way to use a different value for a field when re-displaying a form? I.e. if a user enters '42' into an IntegerField but made the other fields not validate, how could that IntegerField be re-displayed with '43'? Jonas -- You received this mes

limit foreignkey of queryset

2011-07-22 Thread Jonas Geiregat
Hello, How would I limit the results of a foreign key of a queryset ? Ie. I have the models Person and Task. I want to get all Person's but only get their 2 latest tasks. Person__task points to Task__name It's a ManyToMany Relationship. Jonas Geiregat jo...@geiregat.org -- Yo

Re: django.contrib.auth.view.login reuse

2011-07-21 Thread Jonas Geiregat
> Hello, > > I would like to add login fields to each page. But I want to keep it as DRY > as possible. > I'm pretty satisfied until now about using django.contrib.auth.views.login > ,but that's just one specific view in my case host.com/login. With a urls.py > line as: > (r'^/login/$', 'dja

Re: import django models without runing the server

2011-07-21 Thread Jonas Geiregat
> Alexander, > > Try use this > > #test.py > import os, sys > sys.path.append('../') > os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings' > > myproject/test.py > This is a good read on the subject , it presents an elegant solution. http://superjared.com/entry/django-and-crontab-bes

django.contrib.auth.view.login reuse

2011-07-21 Thread Jonas Geiregat
n as a template context processor, so it's always available ? I'm having trouble figuring out which would be the best route to take. Any advise is welcome, Regards, Jonas. -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: session and caching

2011-07-13 Thread Jonas Geiregat
> I have site with with a lay-out depending on a session, set in my > view. I first tried site-wide caching, and this obviously didn't work. > The caching is not session aware, and the lay-out changes almost > randomly. Are you sure because in the docs I find the opposite. https://docs.djangopr

Re: Inspecting objects

2011-07-12 Thread Jonas Geiregat
Op 13-jul-2011, om 08:25 heeft Jirka Vejrazka het volgende geschreven: >> Thank you all for your help!!! > > I know I'm a bit late to the party (blame timezones :), but thought > I'd put my 2 cents worth in :) > > For inspecting models from command lines (usually when working with > models from

Re: Inspecting objects

2011-07-12 Thread Jonas Geiregat
d 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+unsubscr...@googlegroups.com. > For more options, visi

Re: get all objects that are related to current, reverse look up

2011-07-12 Thread Jonas Geiregat
Op 12-jul-2011, om 09:18 heeft bruno desthuilliers het volgende geschreven: > On Jul 12, 4:32 am, garagefan wrote: >> simply put, here's my code >> >> class ContentBlock(Orderable, Displayable): >> location = models.ManyToManyField(ContentBlockLocation, blank=True, >> null=True, help_text="li

Re: block bots and spiders

2011-07-12 Thread Jonas Geiregat
est implemented as a decorator on each view method. Or you could probably put the code in a middleware. Eventually taking out those spiders would slow down your request. Again I have no experience on this field, it's just an idea that might be possible. Regards, Jonas. -- You received this

Re: request.method GET or POST

2011-07-12 Thread Jonas Geiregat
Op 12-jul-2011, om 07:04 heeft Venkatraman S het volgende geschreven: > We have to check for request.method to suitably route the request to the > logic. > > Would it be nice if we have something like doGet or doPost(similar to java > servlets) that we have in our views, > so that the request

Django API

2011-07-12 Thread Jonas Geiregat
django was written. Is there something like that out there ? Regards, Jonas Geiregat jo...@geiregat.org -- 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 un

Re: need help with calling following complex query

2011-07-11 Thread Jonas Geiregat
> > results.extra(select={ > 'distance': > '(acos(sin(latitude)*sin(%(latitude)f)+cos(latitude)*cos(%(latitude)f)*cos(%(longitude)f-longitude)))' > % { > 'latitude': latitude, > 'longitude': longitude

Re: need help with calling following complex query

2011-07-10 Thread Jonas Geiregat
post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > Jonas Geiregat jo...@geiregat

Re: Extending User model with Inheritance - Attribute Error

2011-07-10 Thread Jonas Geiregat
Op 10-jul-2011, om 12:37 heeft Venkatraman S het volgende geschreven: > > This is not good design. If you want to store some extra fields for a User - > i would define just another model called ProfileDetails, FK it to User and > use it as such. That's also how I would do it, some example cod

Re: login form

2011-07-09 Thread Jonas Geiregat
> @ All > i have created a login form in django. > but after filling the username and password when click on submit, it > shows the following error : > > Forbidden (403) > > CSRF verification failed. Request aborted. This has been asked many times before on this list. I advise you to read th

Re: cropping of an image

2011-07-07 Thread Jonas Geiregat
e files. That way it wouldn't slow down the request. Regards, Jonas -- 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: django/python performance vs play/java

2011-07-05 Thread Jonas Geiregat
n play behind nginx proxy too: the > results are pratically identical. Note the response time too: the > slowest play response is 47 ms, the fastest django one is 110 ms, > > any suggestion to improve performance is appreciated, > > thanks in advance, > drakkan > > -

complex query

2011-07-03 Thread Jonas Geiregat
(max_length=20) What I want to query for is: The most used Tags (and their count) for all books who's pub_date is greater then today. I can solve the last part Book.objects.filter(pub_date__gt=datetime.date.today()) But how do I count all the tags for all these books ? Jonas Geireg

Re: Stuck on "ViewDoesNotExist" last step of tutorial part 4

2011-06-18 Thread Jonas Geiregat
0. raise ViewDoesNotExist("Tried %s in module %s. > Error was: %s" % (func_name, mod_name, str(e))) > > Exception Type: ViewDoesNotExist at /polls/1/vote/ > Exception Value: Tried results in module polls.views. Error was: > 'module' object has no attrib

Re: django database

2011-05-26 Thread Jonas Geiregat
> do i have to install mysql to create a database in my website? As mentioned before you can use sqlite but consider the disadvantages: * Speed (sqlite for me ,even when developing a serious application, is a no go) When deleting large rows sqlite is remarkably slower then mysql. * I've seen s

Re: How do you organize your deployment enviroment

2011-05-25 Thread Jonas Geiregat
uot; group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. Jonas Gei

Re: Authenticating from a mysql database

2011-05-23 Thread Jonas Geiregat
> Hello Jonas, > > thanks again for your reply. I think migrating the database over to > django may be a good idea, however it's still being used as a legacy > authentication database for other projects. > > In case I'd decide to migrate the existing users over t

Re: Authenticating from a mysql database

2011-05-23 Thread Jonas Geiregat
://docs.djangoproject.com/en/dev/topics/auth/#auth-profiles > Thanks much for your reply Jonas, I'll give it a try later. > > SimpleUserFolder is a Zope "Product" that allows for authentication > via other mechanisms than Zope's built-in user management. I'm sure > there is

Re: How do you organize your deployment enviroment

2011-05-23 Thread Jonas Geiregat
group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. Jonas Geiregat jo...@geiregat.org -- You

Re: Authenticating from a mysql database

2011-05-22 Thread Jonas Geiregat
-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > Jonas Geiregat jo...@geiregat.org -- You received this message because you are subscribed to the Google Groups "Django users" g

Re: Json serialization for use in JS

2011-05-20 Thread Jonas Geiregat
> > class Serializer(PythonSerializer): > def end_object(self, obj): > self.objects.append({ > "fields" : self._current > }) > self._current = None > > I've made a small mistake I was importing PythonSerializer while It should've been JsonSerializer C

Re: Json serialization for use in JS

2011-05-20 Thread Jonas Geiregat
> > Your idea of overriding the Serializer class sounds like a better idea to me. > It should be possible (and will be interesting) ,I'll think I'll look into > that tonight. Overwriting django's default serializers is possible. This is how I've done it: In the root of my django project: mkd

  1   2   3   >