Django Rest Framework mutilple update en ModelViewSet

2019-09-26 Thread Johan Rujano
Se requiere recibir un json para actualizar varios objectos (N cantidad de objectos) mediante para un ModelViewSet que usa diferente serializadores https://pastebin.com/jx0vGzYJ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe f

Django Rest Framework mutilple update in ModelViewSet

2019-09-26 Thread Johan Rujano
Django Rest Framework mutilple update in ModelViewSet It is required to receive a json to update several objects (N number of objects) by using a ModelViewSet that uses different serializers viewsets.py class ContractsViewSet(viewsets.ModelViewSet): serializer_class = ContractsSerializer (ma

Django Rest Framework mutilple update in ModelViewSet

2019-09-26 Thread Johan Rujano
Django Rest Framework mutilple update in ModelViewSet It is required to receive a json to update several objects (N number of objects) by using a ModelViewSet that uses different serializers viewsets.py class ContractsViewSet(viewsets.ModelViewSet): serializer_class = ContractsSerializer (ma

Re: ModelForm validation of foreign keys - extra database queries and performance bottleneck

2017-07-25 Thread johan de taeye
b queries that is executed which is drastically reducing the performance. I believe I'll need a custom version of the ModelChoiceField class. Op dinsdag 25 juli 2017 10:48:41 UTC+2 schreef James Schneider: > > > > On Jul 24, 2017 4:09 AM, "johan de taeye" > wrote: &

ModelForm validation of foreign keys - extra database queries and performance bottleneck

2017-07-24 Thread johan de taeye
redundant then - we just retrieved the values from the database. Looking forward to any insights and hints... Johan -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails fro

'migrate' triggers lazy reference error when changing custom user model name

2016-12-07 Thread Johan Cockx
Is this a bug? I have attached a complete project that can be used to reproduce the problem. $ python manage.py makemigrations Did you rename the auth_by_email.MyUser model to TheUser? [y/N] y Migrations for 'admin': /home/johan/Seafile/main/sikando/Projects/doclr/env/lib/python3.4/site-

Tutorial 2 issue when creating super user on Windows 7

2015-04-22 Thread Johan Pretorius
When running the $python manage.py createsuperuser command the following is returned: C:\Users\johanP\mysite>python manage.py cre Username (leave blank to use 'johanp'): Email address: jar...@gmail.com Traceback (most recent call last): File "manage.py", line 10, in execute_from_comma

Re: Suggestion

2015-03-19 Thread Johan Hendriks
Op 18-03-15 om 07:38 schreef Jay Prasad: Hi All, I'm started Pyhthon and django ,give me some suggestions and which sites was good .help me.thank you all -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsub

RE: py2exe + Django 1.6

2014-04-10 Thread Johan De Taeye
code at https://github.com/jdetaeye/frePPLe Johan From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Antonio Francisco Martín Romero Sent: Thursday, April 10, 2014 5:46 PM To: django-users@googlegroups.com Subject: Re: py2exe + Django 1.6 Thank you

Re: py2exe + Django 1.6

2014-04-10 Thread johan de taeye
er commands and fails to merge any of the fixes that have been proposed. Johan Op donderdag 10 april 2014 14:19:19 UTC+2 schreef Antonio Francisco Martín Romero: > > Hi everyone, > > I was using py2exe + Django 1.3 without problems. From Django 1.4 the way > to find the commands

Re: import

2014-02-11 Thread Johan Hendriks
Johan Hendriks schreef: Hello all. I have a little question, maybe a little stupid but non the less it keeps me busy. :-) I want to start making some web based apps as a hobby project. I have no coding experience other then some basic shell scripting to get some daily routine jobs done on

Re: import

2014-02-11 Thread Johan Beyers
Hi, Johan, To answer the spirit of your question: Mostly, you will get the correct import locations from the examples you use. Once you're used to Python, you will see that there is a logic to the imports: * You start at wherever your virtualenv stores its site-packages if you use virtu

import

2014-02-11 Thread Johan Hendriks
time. regards Johan -- 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, send email

Re: iterating over a queryset?

2013-09-21 Thread Johan Bergkvist
name. It might just be me, but the documentation could seem a bit ambiguous on this point as all field names are lower case model names. Thanks for the help! Den tirsdag den 17. september 2013 22.29.38 UTC+2 skrev Johan Bergkvist: > > Hi > I'm quite new to both django and python, an

Re: iterating over a queryset?

2013-09-18 Thread Johan Bergkvist
As I say though, in practice that's rarely a problem as you usually want > to reference individual fields by name, rather than iterating over them. > -- > DR. > > > On Wednesday, 18 September 2013 16:39:34 UTC+1, Johan Bergkvist wrote: >> >> Hi, thanks - that pro

Re: iterating over a queryset?

2013-09-18 Thread Johan Bergkvist
Hi, thanks - that provides some perspective. So if I omitted the .get() and .values() i will have to loop over the queryset and then each dict, doing something like: {% for q in info %} {% for k, v in q.items %} {{ k }} {{ v}} {% empty %}

iterating over a queryset?

2013-09-17 Thread Johan Bergkvist
hould return a iterable, I might be using it wrong, any suggestions? Second question is: When I try to to a "backwards relation" in the template, like so: {% for services in info.customerhistory_set.all %} {{ services }} {% endfor %} It also winds up empty. It might be that I'm inte

Re: models i18n

2013-03-07 Thread Johan ter Beest
On Mar 6, 2013, at 4:20 PM, Roberto López López wrote: > > Thanks for your suggestion Johan. > > Just another question, which I've not seen answered in the > documentation: is there any custom filter/tag to access those translated > fields from a template? Thanks

Re: Setting Django to not quote table names

2013-03-05 Thread Johan ter Beest
Not an Oracle expert at all but maybe this SO answer explains some things?: http://stackoverflow.com/questions/563090/oracle-what-exactly-do-quotation-marks-around-the-table-name-do On Mar 5, 2013, at 11:12 PM, Shawn Milochik wrote: > This works for me in Postgres as well. This script: > > fr

Re: models i18n

2013-03-05 Thread Johan ter Beest
edia: js = ( 'modeltranslation/js/force_jquery.js', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.24/jquery-ui.min.js', 'modeltranslation/js/tabbed_translation_fields.js', ) css = { 

Re: django-registration vs Django 1.5

2013-03-01 Thread Johan Kock
Hi Xavi, I'm wrestling with the same problem right now. There are a couple of pull request to solve this but until they are accepted I'm using this fork: https://bitbucket.org/eire1130/django-registration pip install https://bitbucket.org/eire1130/django-registration/get/tip.tar.

Re: how to evaluate "cities/countries of the world" static table for an application.

2013-02-25 Thread Johan ter Beest
his should give you all the info you need: http://www.maxmind.com/en/worldcities Regards, Johan > > Thanks. > > > -- > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe fro

Re: How do I join two existing tables?

2013-02-24 Thread Johan ter Beest
You're welcome. You probably also want to make sure that in the class Meta options, you've set managed=False Otherwise you could accidentally change the database definitions. All the information is here: https://docs.djangoproject.com/en/dev/howto/legacy-databases/ On Feb 24, 2013, at 5:05 PM,

Re: How do I join two existing tables?

2013-02-24 Thread Johan ter Beest
tion? Sounds more like a ForeignKey to me. Anyway, you need to change the CharField into a ForeignKey (or a OneToOneField) and tell it the column, something like this: In ShopInventory: category_id = models.ForeignKey(Shopcategories, db_column='category_id') Hope it helps, Johan > &g

Re: Django, PyCharm Module Error (Time Machine, Directory Duplication)

2012-05-26 Thread Johan
o something else and then rename it back to Stentorian making sure it's capitalized properly. For some reason the folder was showing as lowercase but it was actually uppercase. In your case it seems that only the first letter got capitalized. Johan > -- > You received this message

Re: Only Two Users Get : Forbidden (403) CSRF verification failed. Request aborted. Options

2012-05-10 Thread Johan
+2, Nikolas Stevenson-Molnar wrote: > > Django uses cookies for CSRF. Is it possible these two users have > cookies disabled? > https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#how-it-works > > _Nik > > On 5/10/2012 7:56 AM, Johan wrote: > > Hi > >

Only Two Users Get : Forbidden (403) CSRF verification failed. Request aborted. Options

2012-05-10 Thread Johan
Hi Does anybody maybee have some pointers for me? I have a site up and running and it has worked perfectly for hundreds of users. Except that today I got two users (from the same company, although others from the same company has used it perfectly well) who are getting the [CSRF verification faile

Django Unittesting Question.

2012-02-28 Thread Johan
Hi. I can see that the setUp method of my TestCase specialization is being run for each test case. I thought that the test DB is cleared every time before setUp is called. Is this the case? I'm having a problem where I am assuring that only one of a certain record will be in the DB but because the

Rooting my application at the base (/) of the URL

2012-02-02 Thread Johan
Hi I have deployed my application on Apache using WSGI, using WSGIScriptAlias / /var/www/site/django.wsgi. Everything looks very good. My actual application lives at http:///application. So with the setup above when I browse to http://http://groups.google.com/group/django-users?hl=en.

Re: Fixture Funny : 1st Row Of Each Table Missing

2012-01-25 Thread Johan
Ok. So I fixed the problem by starting my PK values at 1. It seems like there is a discrepancy between the way fixtures are imported into a mysql db and a sqlite db. Using PK's that start at 1 works on both. On Jan 25, 11:18 am, Johan wrote: > Hi. I'm having a funny issue. I have

Fixture Funny : 1st Row Of Each Table Missing

2012-01-25 Thread Johan
Hi. I'm having a funny issue. I have a fixture for my static tables. They are all populated via syncdb using the fixture. On my sqlite test environment it works perfectly. On my production environment, with a MySQL database, the data is populated into the tables via the fixture except for the first

Django Form - This field is required.What am I missing.

2012-01-22 Thread Johan
Hi I have a form that has a required email field. This due to the fact that the model requires an email. However, I don't display the email field on the form. So when the post gets back into my view the email field is empty. I then thought I would do the following just before the form.is_valid() :

Admin Interface Super User Not Logging In

2011-04-12 Thread Johan
I have just installed the newest version of django from the source repo. I added the admin app, did the synchdb (as part of this I created the admin user), then i started the test server. Then I browsed to the admin login page and enter the admin user and the correct password. I get told that the

Re: Multi-db: is database routing per request possible?

2010-06-16 Thread johan de taeye
" argument to direct the queries to a database, but since the validation is model-based (not form-based) that info is not used in validation. You rely on guess-work like the above or on the fact that the routing logic is in sync with the "using" argument you provided. This can't

Re: Multi-db: is database routing per request possible?

2010-06-15 Thread johan de taeye
e request any more and always checks on the default database (unless I can route it). As a result I always get a validation error on the form. Looks like I need a patched/smarter RelatedField that is aware of the database to look in? Regards, Johan Snippet from django/db/models/fields/relate

Multi-db: is database routing per request possible?

2010-06-15 Thread johan de taeye
ort this type of usage. Is this possible somehow? Is it feasible to pass the request as a hint to the router somehow? All feedback appreciated... Johan -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this grou

Re: Queryset filtering based on user supplied callable??

2010-06-05 Thread johan de taeye
Typo... The correct syntax is : obj_list = [ i for i in MyObject.objects.all() if my_filter(i) ] On Jun 5, 4:29 pm, johan de taeye wrote: > Possible through basic Python: > >   obj_list = [ i for i in MyObject.objects.all() where my_filter(i) ] > > Note that this filtering

Re: Queryset filtering based on user supplied callable??

2010-06-05 Thread johan de taeye
be careful with the python-style filtering... Johan On Jun 5, 12:32 pm, Joakim Hove wrote: > Hello, > > I have a query list which I want to filter based on a computation > which I supply: > > # Create a query set containing everything: > obj_list = MyObject.objects.all() &g

Re: Is it safe to alter Django generated tables in MySQL to have composite PK?

2010-05-02 Thread johan sommerfeld
I tried this before and I think it was the admin app that broke. Also ser this link http://code.djangoproject.com/wiki/MultipleColumnPrimaryKeys /J On Saturday, May 1, 2010, Continuation wrote: > > On Apr 30, 9:42 pm, Nick Arnett wrote: > >> If you don't have data in the table, just drop it an

Re: Problem using django-typogrify and smartypants

2010-04-14 Thread johan sommerfeld
Have you tried to run the actual code in django shell? Have you imported it corectly (paste some code from where the exception gets thrown. /J On Thursday, April 15, 2010, HiddenWolf wrote: > Hi all, > > I'm trying to get a blog app working, and I keep running into the > weirdest error. > > Bot

Re: ChoiceField invalid literal for int() with base 10: ''

2010-04-13 Thread johan sommerfeld
You could try using initial=0. /J On Tuesday, April 13, 2010, geraldcor wrote: > Hello all, > > I know the error "invalid literal for int() with base 10: '' " has > been discussed a lot in the past, but this seems to be unique to my > situation. > > I have 2 choice fields as defined below for b

Re: Is the DoesNotExist exception the only way to check if an object exists?

2010-04-09 Thread johan sommerfeld
If you don't want to use exception (which I do when doing something similar). You can use filter and then check the length of the array returned. def my_view( request , pk ): obj = Class.objects.filter( pk = pk) if len(obj) != 1: return bad_key_view obj = obj[0] # Do someth

Re: Error when following the tutorial

2010-04-08 Thread johan sommerfeld
Sometimes removing all .pyc files helps. /J On Wed, Apr 7, 2010 at 11:39 PM, Shawn Milochik wrote: > Try to do ./manage.py shell and import your poll model. > > Once you can do that, you will have figured out the solution to this > problem as a by-product. > I don't expect it to work first try,

Re: Considering Django: How simple is customising django-admin?

2010-04-08 Thread johan sommerfeld
#1 This can be done. One to Many and foreign keys shows up in django admin as multiple choice or select box. You can also make foreign key related models inline meaning that you can add one or possibly multiple entries to another model and automatically reference them to the entry you are about to

Re: Deployment with Apache. Help !

2010-04-07 Thread Johan Sommerfeld
I had a similar problem when I went from "manage.py runserver" It was because I had some debugging prints within the code. Could it be that? /J On 7 apr 2010, at 17.09, Pep wrote: > Hi everybody ! > > I didn't find the answer. I deployed my django project on a webserver > with apache. First, I

Re: loaddata encoding problem

2009-12-02 Thread Johan
) When looking at that position in the file I discovered that we had some "chinese" chars there. And they shouldn't be there (-there seems to be a problem when the size of a oracle CLOB field is exceeded). So now I fount out what the problem is and I thank you for your help.. Re

loaddata encoding problem

2009-12-01 Thread Johan
return self.cursor.execute(sql, params) File "/usr/lib/python2.6/site-packages/Django-1.1-py2.6.egg/django/ db/backends/oracle/base.py", line 434, in execute raise e DatabaseError: ORA-12704: character set mismatch Why do I get this "character set mismatch" when I have

Re: Specifying Django Project/Application Templates

2009-10-29 Thread Johan
:26 Johan wrote: > > > The information you provided is very helpful and I have been wondering > > about overriding templates.However, my question pertain not to > > templates as in the templating system used in django but rather to the > > 'template' dire

Re: Specifying Django Project/Application Templates

2009-10-29 Thread Johan
The information you provided is very helpful and I have been wondering about overriding templates.However, my question pertain not to templates as in the templating system used in django but rather to the 'template' directories used by django-admin.py when the startproject and startapp commands ar

Re: Login users

2009-10-29 Thread Johan
This link (http://docs.djangoproject.com/en/dev/topics/auth/) has helped me a lot. After working through this you will probably have some more questions :) On Oct 29, 2:33 pm, Denis Bahati wrote: > Hi All, > > Am creating application using django/python, i want to create a login form > where by

Specifying Django Project/Application Templates

2009-10-29 Thread Johan
Hi. Is there a way to specify custom project (or what I call sites) and application templates. At present the python-admin.py startproject/ startapp uses the default templates that ships with django. I end up either having to create these myself or heavily modify them for my dev structure. It seem

My CKEditor Integration Pattern

2009-10-28 Thread Johan
I've outlined how I am currently integrating CKEditor into my admin site (http://tinyurl.com/ylfjumo) . This way obviously work very nicely for me. Is there any reason to go the more advanced route of creating a custom widget? --~--~-~--~~~---~--~~ You received this

My CKEditor Integration Pattern

2009-10-28 Thread Johan
I've outlined how I am currently integrating CKEditor into my admin site (http://johansdevblog.blogspot.com/2009/10/adding-ckeditor-to- django-admin.html ) . This way obviously work very nicely for me. Isthere any reason to go the more advanced route of creating a custom widget? --~--~-~--

My CKEditor Integration Pattern

2009-10-28 Thread Johan
I've outlined how I am currently integrating CKEditor into my admin site (http://johansdevblog.blogspot.com/2009/10/adding-ckeditor-to- django-admin.html) . This way obviously work very nicely for me. Is there any reason to go the more advanced route of creating a custom widget? --~--~-~-

Re: How do I create project independent apps.

2009-10-06 Thread Johan
Thanks for all the feedback. By nature I prefer NOT to use a to deep framework stack. So although django-harness could work I would prefer to keep my dependencies simple. I would probably go with managing the python path. It seems to be the simplest way and most transparent way of handling the sit

Re: How do I create project independent apps.

2009-10-05 Thread Johan
pps\\trunk) ... Is this the correct approach ? Thanks On Oct 5, 3:32 pm, Johan wrote: > Good day > > I want to develop an application in django which can be used in > multiple django sites/projects. The one approach is to create one > project (mysite) and then to create the applicat

How do I create project independent apps.

2009-10-05 Thread Johan
Good day I want to develop an application in django which can be used in multiple django sites/projects. The one approach is to create one project (mysite) and then to create the application in the site project (myapp). The application is then added to the project via the settings file with INSTA

Re: nested loop issue

2009-04-20 Thread Johan
yes! that works exactly the way i wanted shouldnt that be part of Django? feels like a very fundamental piece of logic. Also yeah you're right about the URL. On Apr 20, 6:14 am, Tom Evans wrote: > On Sun, 2009-04-19 at 16:40 -0700, Johan wrote: > > Hello > > I have a proble

Re: nested loop issue

2009-04-19 Thread Johan
so what im saying is the result should be johan: add me! sven: supporter glen: supporter ben: add me! ken: add me! but now the else hits on each supporter (this case two) On Apr 19, 4:40 pm, Johan wrote: > Hello > I have a problem I cant get my head around. > I want to list through a

nested loop issue

2009-04-19 Thread Johan
supporter OR an add me link. {% for d in dreamers %} {{ d.user }} {% for s in supporters %} {% ifequal d.id s.id %} supporter {% endifequal %} {% endfor %} {% endfor % result: johan sven supporter glen supporter ben ken

Re: how to use email instead of username for user authentication?

2009-04-01 Thread johan . uhle
Best way is to write your own authentication backend I think. Check the docs: http://docs.djangoproject.com/en/dev/topics/auth/?from=olddocs#writing-an-authentication-backend This article might also give you a good idea: http://scottbarnham.com/blog/2008/08/21/extending-the-django-user-model-wit

Re: problem about "You appear not to have the 'sqlite3' program installed or on your path."

2009-03-20 Thread Johan
If i remember correctly anywhere on the path should be fine. On Mar 20, 11:05 am, osamu wrote: > I'm stuck here as well, donno where i should put sqlite3.exe in order > to use it --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

Test Client doesn't populate request.META["HTTP_HOST"] ...

2009-03-19 Thread Johan
Hiya, Given: >>> from django.test.client import Client >>> c = Client() >>> c.post('/register/',{username=username,password=password}) Traceback (most recent call last): ... KeyError: 'HTTP_HOST' Part of the register view code contains the following: ... request.META["HTTP_HOST"] ... Th

Re: How do I 'redirect' in my test code after a 301 response?

2009-03-19 Thread Johan
Thanks ... I'd din't see the follow parameter. It works like a charm.. :) On Mar 19, 3:38 pm, Alex Gaynor wrote: > On Thu, Mar 19, 2009 at 9:22 AM, Johan wrote: > > > Hiya, > > >  I trying to write test code for my views. I am using the following > > appro

How do I 'redirect' in my test code after a 301 response?

2009-03-19 Thread Johan
Hiya, I trying to write test code for my views. I am using the following approach. >>>from django.test.client import Clien >>>c = Client() >>>c.get('/courses/system/home').status_code 301 The question is now: How do I 'redirect' in my code? I would expect something along the lines of: >>>

Re: Forms: custom clean for DateField

2009-03-19 Thread johan . uhle
> if (data['firstDate'] >= data['lastDate']): > raise ValidationError("Error") it should read raise forms.ValidationError If you want to have the error not only as a non_field global error, but actually added to the fields where the error occured, you can do the following in

Re: Prepopulate form from URL?

2009-03-18 Thread Johan
You should be able to do it via foo_value = request.GET['foo']. PS: The above should work for a post like /?foo=bar On Mar 18, 4:06 pm, Jorge Romo wrote: > Hello! > > I was trying to see if there's a way (I'm pretty sure there is a way) > to prepopulate a form field from an url. For example: /f

Re: Model inheritance vs. User.get_profile()

2009-03-18 Thread Johan
HaHa (After some reading) Silly me my way is the get_profile route :) On Mar 18, 4:58 pm, Johan wrote: > Hiya , > >   I don't know the get_profile route (Am going to read up on that > now :)). But here is an example of what I'm using : > >   class Stude

Re: Model inheritance vs. User.get_profile()

2009-03-18 Thread Johan
Hiya , I don't know the get_profile route (Am going to read up on that now :)). But here is an example of what I'm using : class Student(models.Model): base = models.OneToOneField(User, primary_key=True) first_name = models.CharField(max_length=100) last_name = models.CharField(m

Re: How to say Hello "Somebody" in a Django form. Displaying data context values as non-input.

2009-03-16 Thread johan . uhle
> How does Django enable the ability to pass variables to a Form or a > Template whose purpose is only to be displayed? Given that the input has been validated correctly and does not throw an error you can access the value with form.cleaned_data.username If you want to pass a variable to a templ

Re: Missing something obvious in auto-form generation

2009-03-13 Thread johan . uhle
You were missing to give the definition of Foo. I assume, that you are using ModelForm http://docs.djangoproject.com/en/dev/topics/forms/modelforms/ to create FooForm, right? > model = Foo() > form = FooForm(instance=model) If you did so, you can just skip the instance and replace this l

Re: Advice on project structure

2009-03-11 Thread johan . uhle
in terms of the "django poster-child" site http://www.satchmoproject.com/ might be a good start and you may also want to have a look at http://pinaxproject.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: Strange behaviour with templates, dictionarys, key/value, tuple as key and nested for loop Bug?

2009-03-11 Thread johan . uhle
Of course you are right. I already changed that in my real code. This one here was just for having as simple code as possible in the mailing list post. This reminds me of this tweet: http://twitter.com/pht/status/1302494813 I always try to keep an eye on naming stuff, even if it means thinking ab

Re: Strange behaviour with templates, dictionarys, key/value, tuple as key and nested for loop Bug?

2009-03-11 Thread johan . uhle
Thanks a lot. I was just blind eyed yesterday I think. Corrected code is: {% for key,value in dictionary.items %} {{key|date:"Y-m-d"}} {% for key,value in value.items %} {{ key.0|date:"H.i" }} - {{ key.1|date:"H.i" }} {{ value }} // Arra

Re: FormWizard accessing previous fields data

2009-02-02 Thread Johan Liseborn
27;baz'] = form.cleaned_data['baz'] Now, in each template you will have access to more and more additional information, just like so: {{ foo }} {{ bar }} {{ baz }} I am not sure exactly how this maps to your example (as I do not fully understand it), but maybe it c

Re: Writing your first Django app

2009-01-03 Thread johan
Karen Tracey > On Fri, Jan 2, 2009 at 11:25 AM, johan wrote: > >> OK it is finally working after a lot of strange errors! 3 hours spent on >> this crap! Can you really trust the built in server that it always update >> your code? >> > > No, not if you introdu

Re: Tutorial Problem

2009-01-03 Thread johan
Hopefully some more experienced will be able to help you out. You have not updated the database or changed any permissions after it worked last time? 2009/1/4 rvwilliams > > Absolutely certain! > > > > > --~--~-~--~~~---~--~~ You received this message because you

Re: Tutorial Problem

2009-01-03 Thread johan
I just started using Django as well Are you sure you have not made any changes to your settings file? Only a guess! 2009/1/2 rvwilliams > > Hi > > I'm just getting started on django and I'm using a Windows Vista > version. Yesterday I completed about half of the tutorial without too > much diff

Re: Writing your first Django app

2009-01-02 Thread johan
possible somehow to pass that message to someone in charge for the tutorials? For me this thing with Indentation Errors is totally new. Thanks Karen for your help. 2009/1/2 Karen Tracey > On Fri, Jan 2, 2009 at 9:35 AM, johan wrote: > >> I'm still struggling with the tutoria

Re: Writing your first Django app

2009-01-02 Thread johan
day?' I can't figure out what to do with this code. I'm I supposed to swop this code with the def was_published_today(self): return self.pub_date.date() == datetime.date.today() in models.py? No mater what I do I get errors? 2008/12/31 johan > Thank you for the resp

Re: Writing your first Django app

2008-12-31 Thread johan
match, then it will run > the model in your views file. > > In the code from the tutorial, 'mysite.polls.views.detail' will run > the above code, if it's written in the views.py in your polls app. It > returns a simple http response, a text string: "You're loo

Re: Where is the source code for Practical Django Projects?

2008-07-17 Thread Johan Liseborn
erently than described in the book, or at least I did not manage to get it working exactly as stated in the book. > - btw great book :D Agree. Cheers, johan -- Johan Liseborn --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

Problem with custom manager from blog example in "Practical Django Projects"

2008-07-16 Thread Johan Liseborn
is defined first... So, is there an elegant solution to this, or does it have to get ugly...? Cheers, johan -- Johan Liseborn --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To pos

Re: How do I add the user ID to a template?

2008-06-24 Thread Johan Liseborn
text return render_to_response('somepage.html', context_instance=RequestContext(request)) That will, among other things (and depending on the TEMPLATE_CONTEXT_PROCESSORS variable in your settings.py) populate the request-object with a "user" field. You can read more he

Re: User Profile in Admin interface (using trunk)

2008-06-21 Thread Johan Liseborn
ly two people that have stumbled upon the problem... :-) Cheers, johan -- Johan Liseborn --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-

Re: CSS not working in exe

2008-06-21 Thread johan de taeye
he django commands work with the zip-file created by py2exe: http://code.djangoproject.com/ticket/5825 unfortunately not marked for the 1.0 release :-( Johan On 20 jun, 19:10, Molly <[EMAIL PROTECTED]> wrote: > Thanks for that tip, Chris! I have been wondering about that act

Re: How to compare between two attributes of the model?

2008-02-22 Thread johan de taeye
An extra clause allows you to do this: Project.objects.extra(where=['expected_start_date > actual_start_date']) On Feb 23, 8:16 am, shabda <[EMAIL PROTECTED]> wrote: > I have a model like, > > class Project(models.Model): >    name = models.CharField() >    expected_start_date = models.DateF

Re: django-admin.py just doesn't go

2008-02-16 Thread Johan Liseborn
; command; in this case, you have to give the full (or relative) path to django-admin.py, as the python command will not use your PATH setting to locate files. Me personally, I usually create a "bin" directory in my home directory, put "/Users/" in my path, and put sym

Re: Using the sites-system with a twist - is it possible?

2008-02-15 Thread Johan Liseborn
On Fri, Feb 15, 2008 at 2:31 PM, Dj Gilcrease <[EMAIL PROTECTED]> wrote: > > On Thu, Feb 14, 2008 at 12:41 PM, Johan Liseborn > <[EMAIL PROTECTED]> wrote: > > I tried your suggested approach, wrote a small middleware class, and > > I actually got

Re: Using the sites-system with a twist - is it possible?

2008-02-14 Thread Johan Liseborn
Malcolm, Thanks for your reply! On Thu, Feb 14, 2008 at 2:55 AM, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > On Wed, 2008-02-13 at 14:52 +0100, Johan Liseborn wrote: > > > while my requirement seems to indicate > > that the "site" (or pseudo-domai

Using the sites-system with a twist - is it possible?

2008-02-13 Thread Johan Liseborn
-files (which I guess would be simple using e.g. Apache and a bunch of virtual hosts), but it seems I cannot do that with runserver. Kind Regards, johan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &

Re: how to speed up objects saving

2008-02-04 Thread johan de taeye
ment of x5 - x10... My 2 cents, Johan --~--~-~--~~~---~--~~ 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: py2app & py2exe

2007-10-19 Thread johan de taeye
://frepple.svn.sourceforge.net/viewvc/frepple/trunk/contrib/installer/runserver.py?revision=511&view=markup Regards, Johan [1] www.frepple.com On Oct 19, 3:43 pm, ArqEco <[EMAIL PROTECTED]> wrote: > Hello friends, > > "The Story That Won't Go Away" comes bac

Re: OT: How did you handle asynchronous tasks?

2007-10-15 Thread johan de taeye
David, It's a very common requirement, and some people have run into this before. Have a look at this: http://code.google.com/p/django-queue-service/ I doubt if this 'll be as robust and reliable as a real messaging product, but for simple setups it'ld do th

Re: something I really don't know in using manage.py shell

2007-08-01 Thread johan de taeye
I suspect you get this error because "level" is a reserved keyword in many databases. Try renaming the field. Johan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. T

Re: How can I re-use the filtering and sorting from the admin pages in my view?

2007-08-01 Thread johan de taeye
Ben, Vince, Thanks for the input! It confirms what I suspected after a brief scan through the admin doc and the code. Johan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To po

How can I re-use the filtering and sorting from the admin pages in my view?

2007-07-31 Thread johan de taeye
ave the same sorting and filtering capabilities as the "product" list in the admin ui. Is there a way to achieve the same in better django-style, and re- using the admin capabilities in my custom view and template? All feedback highly appreciated! Johan --~--~-~--~~---

Re: php, mod_python postgresql conflict?

2005-12-15 Thread Johan
you should configure php with the --with-mysql=/path/to/mysql switch Check readme for exact path. For me Mysql is located in /usr/bin/mysql and I used --with-mysql=/usr. This causes php to use the same mysql as mod_python

Re: auto-generated template for generic views

2005-09-15 Thread Johan
Indeed for the admin index it's there. But using django-admin.py there is no option. Or must I use something else?

Re: auto-generated template for generic views

2005-09-11 Thread Johan
Also a big +1. using django-admin.py to generate the template is not only great for generating a standard template, but also an ideal tool for people like me who learn best by example. Looking forward for this feature.

  1   2   >