Re: noob: Where does print output go?

2008-08-22 Thread Gerard
Emily, Great idea, thanx! Regards, Gerard. Emily Rodgers wrote: > You could use the python logging module > (http://docs.python.org/lib/module-logging.html) and do > logging.debug(list(product_list)). Then it will appear in your web logs. > >> -Original Message- >

Admin site statics (CSS) seen via 'runserver' not via fcgi

2009-08-17 Thread Gerard
o kind to shine some light on my blind spot :) Thanx a lot Kind regards, Gerard. -- self.url = www.gerardjp.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gro

Re: Django Testing

2009-08-20 Thread Gerard
response = self.c.post('/customer/add', c_data) This way you always have the same data, and the data is fixed beyond tests for a new application release. And should you need the same data setup for all tests you can also place them in your setUp/tearDown methods. Regards, Gerard.

Best practice on data security .. on record, table (model) db or url

2009-08-21 Thread Gerard
est of the websites' layout. Thanx a lot! Kind regards, Gerard. -- self.url = www.gerardjp.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, s

Re: Best practice on data security .. on record, table (model) db or url

2009-08-23 Thread Gerard
for now to get some handson experience first I might *bump* this message again later. Regards, Gerard. Sam Lai wrote: > 2009/8/21 Gerard : >> Hi All, >> >> I'm working on an invoice system, currently deployed the single user version >> in house. Next one is

No distinction on user status on form.is_valid() when using AuthenticationForm

2009-10-05 Thread Gerard
Hi All, When checking form validity with form.is_valid() after form = AuthenticationForm(data=request.POST) I get a False when the user is set to inactive. One would think a form can be valid besides a user being disabled. The reason, I want a seperate error messages for inco

Re: No distinction on user status on form.is_valid() when using AuthenticationForm

2009-10-05 Thread Gerard
Must have missed that somehow. Thanx Karen. Regards, Gerard. Karen Tracey wrote: > On Mon, Oct 5, 2009 at 6:46 AM, Gerard <mailto:lijss...@gp-net.nl>> wrote: > > > Hi All, > > When checking form validity with > >form.is_valid()

User object subclass appears in App models under Admin instead of Auth

2009-10-08 Thread Gerard
p in my project. Would this be possible? And when using the admins passwd change dialog "change password form." it returns an error: Warning at /admin/myapp/userprofile/4/password/ Truncated incorrect DOUBLE value: '4/password' Anybody seen this before? Thanx a lot. Regar

Re: User object subclass appears in App models under Admin instead of Auth

2009-10-08 Thread Gerard
Found a solution that's getting me closer to my goal http://www.thenestedfloat.com/articles/displaying-custom-user-profile-fields-in-djangos-admin Regards, Gerard. Gerard wrote: > Hi all, > > I've subclassed Django's User object (also accessible under Admin) to ex

SOLVED - Re: User object subclass appears in App models under Admin instead of Auth

2009-10-08 Thread Gerard
you dig up the same issue :) Regards, Gerard. Gerard wrote: > Found a solution that's getting me closer to my goal > > http://www.thenestedfloat.com/articles/displaying-custom-user-profile-fields-in-djangos-admin > > Regards, > > Gerard. > > Gerard wrote:

How to make fields mandatory for User

2009-10-09 Thread Gerard
Hi all, I need the fields first_name and last_name of Django's User object to be mandatory when creating users via the Admin interface. Is there an easy way to do this? Thanx, Gerard. -- self.url = www.gerardjp.com --~--~-~--~~~---~--~~ You received

Re: How to make fields mandatory for User

2009-10-09 Thread Gerard
Think I'll go with the form option .. Just finished the User (profile) extention thing with a 1to1 instead of subclassing User :) Thanx for the feedback! Gerard. Bayuadji wrote: > Hi Gerard, > > On 10/9/09, Gerard wrote: >> Hi all, >> >> I need the fi

Re: how to design mobile version of my site based on django?

2009-10-10 Thread Gerard
ntent. Might want to look at: http://code.google.com/p/minidetector/ Regards, Gerard. hao he wrote: > I'm developing my site with django, > > mainly, my site works as normal, visited by PC. > > but ,the site will also be visited by mobile device(e.g.iphone) > > wh

DRY: max length not taken from Model.field when using ModelForm

2009-10-15 Thread Gerard
place to put this? It does seem to work for the form fields' label, which is taken from the model fields' verbose name. Thanx for any light on the subject Regards, Gerard. -- self.url = www.gerardjp.com --~--~-~--~~~---~--~~ You received this mess

Re: Good News !! A mate found for your dog ...

2009-10-16 Thread Gerard
Ik think it's .. My dog ate the website :) ?? ? wrote: > It's the dog. The dog is the one who uses Django. All the time. > > On Fri, Oct 16, 2009 at 9:18 PM, jc > wrote: > > > Finally. I wonder if their site uses django? > > On Fri, Oct 16, 2009 at

Please help: {% url ... %} path resolve issue

2009-10-17 Thread Gerard
oader (?) where to look for views? Feels like it just needs an import statement on the right place. NB: I tried passing views in patterns as strings and methods. Please advice. Kind regards, Gerard. -- self.url = www.gerardjp.com --~--~-~--~~~---~--~~ You rec

Re: Please help: {% url ... %} path resolve issue

2009-10-17 Thread Gerard
P\d+)$', 'customer_detail'), (r'^customer/add$', 'customer_add'), (r'^customer/(?P\d+)/edit$', 'customer_edit'), (r'^customer/(?P\d+)/delete$', 'customer_delete'), -- snip -- (r'^admin/doc/&#x

Re: Please help: {% url ... %} path resolve issue

2009-10-17 Thread Gerard
Hi Thierry, The actual url used (and working) is: http://192.168.1.81:8000/customer/2/edit Without the end slash. Gerard. Thierry wrote: > Hi, > > Could it be that you are missing trailing slashes in customer add/edit/ > delete url patterns? > E.g try: > (r'

Re: Please help: {% url ... %} path resolve issue

2009-10-17 Thread Gerard
#x27;, 'product_add', name='product_add'), (r'^product/(?P\d+)/edit$', 'product_edit', name='product_edit'), (r'^product/(?P\d+)/delete$', 'product_delete', name='product_delete'), Last two parms are equal for all

Re: Please help: {% url ... %} path resolve issue

2009-10-17 Thread Gerard
ur explanation David. Kind regards, Gerard. David Paccoud wrote: > Hi Gerard, > > Views and not found by the template loader but the the PYTONPATH.. > For "project.myapp.views.customer_edit", it finds a project package in > your PYTHONPATH and follow the path

Queryset inspection in models.Manager not possible without breaking

2009-10-23 Thread Gerard
le. One error on my side can return in people seeing confidential information. I have two questions. - Why doesn't the queryset inspection work as I intented? - Where else could I force such a requirement in a generic way? Thanx a lot. Gerard. -- self.url = www.gerardjp.com --~--~---

Re: Queryset inspection in models.Manager not possible without breaking

2009-10-23 Thread Gerard
sudden, I do hope though that you give me some pointers as to multi-user setups. Thanx a lot. Kind regards, Gerard. Matías Costa wrote: > On Fri, Oct 23, 2009 at 9:25 AM, Gerard wrote: >> Hi All, >> >> I'm trying to find a way to filter on a certain field (myowner)

Do reverse relations eventually kill performance?

2009-10-25 Thread Gerard
ottleneck? I ask this because now I can still choose how to set things up without refactoring my codebase. Thanx a lot. Regards, Gerard. -- self.url = www.gerardjp.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

Re: Do reverse relations eventually kill performance?

2009-10-25 Thread Gerard
have it running during development. Would that be afeasible option? Thanx, Regards, Gerard. Tim Chase wrote: > Gerard wrote: >> Hi all, >> >> I'm working on a safe way to get users to only see there own records. I've >> been working on subclassing model.Mana

Re: Do reverse relations eventually kill performance?

2009-10-27 Thread Gerard
10/26/django-queryscreener-a-record-level-ownership-development-auditor/ :) Thanx again. Gerard. Manfre wrote: > Subclass Manager and make this the default manager for all owner > restricted models. Override filter() and get() to check for the > "owner" arg. Raise an error if it is

Re: Login over HTTPS

2009-10-27 Thread Gerard
27;t looked for it yet, but I do want to implement that myself. Lets post if we find anything :) Regards, Gerard. Jani Tiainen wrote: > I'm trying to get Django to make authentication (namely username + > password) to be transferred over HTTPS. But rest of the site is still on >

Re: Login over HTTPS

2009-10-27 Thread Gerard
your webserver in front of the app rewriting/redirecting the /login /logout (as an example) requests to https. And leaving the 'after login redirect' after logging in alone, and thus being back on regular http. Regards, Gerard. Jani Tiainen wrote: > Technically yes. > >

object.save() executes a .filter() somewhere

2009-10-27 Thread Gerard
the .save() method correct/needed? And where can I tell it to give an owner parameter or to use my 'true_filter()' Please advice. Thanx a lot. Regards, Gerard. -- self.url = www.gerardjp.com --~--~-~--~~~---~--~~ You received this message because you

Re: object.save() executes a .filter() somewhere

2009-10-27 Thread Gerard
iting save_base feels like I'm diving into a rabbit hole that is way to deep. Help or tips are much appreciated. Gerard. Gerard wrote: > Hi all, > > I'm totally in the dark atm. I save an object in the following way: > > if form.is_valid(): > order = for

Re: object.save() executes a .filter() somewhere

2009-10-27 Thread Gerard
It works when I disable "use_for_related_fields = True". Would it be safe to disable this and simply manage the reverses myself? Regards, Gerard. PS: Sorry for the spam :) Gerard wrote: > Looking at the trace, the filter executed without a user is this one: > > File

Consequences of a force_update

2009-10-27 Thread Gerard
cular reason. Looking at the code, a "force_update=True" seems to take this action out of the loop. Can somebody tell me why this is done, and whether suppressing it has consequences? Thanx a lot. Regards, Gerard. -- self.url = w

django 1.8 + mysql + python 3.2

2015-07-20 Thread gerard
Hello all, I have this combination, on debian 7 (in openvz, not possible to upgrade). According https://docs.djangoproject.com/en/1.8/ref/databases/#mysql-db-api-drivers, i have to use mysqlclient or MySQL Connector/Python provided by Oracle. Unfortunately, mysqlclient failed to work: File "

problem with a date between a form and database

2014-09-18 Thread gerard
hello all, i have a form to get a date. But when i get object from the database, the database is not as expected, user type "18/09/2015", but after savin, i got: 17/09/2015 22:00 here is the code: #settings.py TIME_ZONE = 'Europe/Paris' #models.py class MyEvent(models.Model): dtstart = m

different urls

2014-11-09 Thread gerard
Hello all, i have an application (Django 1.4 LTS) that can be accessed with 2 urls: the default is https://my.app.org and the second is http://consult.my.app.org In the templates, i'm using: {% trans "Connect to see more features" %} and it's displayed as https://my.app.org/accounts/login if

unable to create translation files

2014-12-10 Thread gerard
hello all, i'm using Django 1.4 LTS, and try to add localisation to my project. According the doc: https://docs.djangoproject.com/en/1.4/topics/i18n/translation/#localization-how-to-create-language-files i have to do: django-admin.py makemessages --all i did it and have the error: django-admin.

Re: unable to create translation files

2014-12-10 Thread gerard
Le 10/12/2014 16:02, Tom Evans a écrit : "python manage.py makemessages --settings=agenda.settings" I suspect the difference is between running manage.py and running django-admin.py - manage.py might add the directory containing it to sys.path. you're right: $ python manage.py makemessages -

django-sendfile with apache2+mod_wsgi: got empty files

2015-09-16 Thread gerard
Hello all, im using django-sendfile with django 1.8.4. Tested with development backend and runserver, everything is fine. But when going to Apache2 and xsendfile backend, the downloaded files are empties, i don't understand why. I have: MEDIA_ROOT = '/home/devel/media/python3/media' and Images

Re: django-sendfile with apache2+mod_wsgi: got empty files

2015-09-16 Thread gerard
Le 16/09/2015 15:47, gerard a écrit : In apache2 conf: Options Indexes FollowSymLinks MultiViews XSendFile On AllowOverride All Order allow,deny allow from all ok, replacing the above with: XSendFile On XSendFilePath /home/devel/media/python3/media/Images/ does the

exception "myapp.models.DoesNotExist" instead of "MyModel.DoesNotExist"

2015-10-06 Thread gerard
Hello all, i use Django 1.8.4 with sqlite. I added a simple model into "catalogue" app: class Zoom(models.Model): name = models.CharField(max_length=200) def __str__(self): name = "%s" % self.name return name and dit manage.py makemigrations/migrate. I have a code like t

EmailField: unable to make it mandatory?

2016-01-03 Thread gerard
Hello all and happy new year, with Django 1.7, i have this model: class Subscription(models.Model): email = models.EmailField(max_length=75) created_by = models.ForeignKey(User) sub = Subscription.objects.create(created_by=self.user) this does not product an error due to email missing.

Re: EmailField: unable to make it mandatory?

2016-01-04 Thread gerard
Le 04/01/2016 08:55, James Schneider a écrit : On Jan 3, 2016 9:02 PM, "gerard" mailto:gh224...@gmail.com>> wrote: > > Hello all and happy new year, > > with Django 1.7, i have this model: > class Subscription(models.Model): > email = models.EmailFiel

Django 1.8 add created_by when upload image in admin

2016-02-25 Thread gerard
Hello all, I'm trying to add the user when upload a file using the admin in Django. The model is: class Image(models.Model): image = models.FileField(upload_to=DIR_IMAGES, max_length=500) created_by = models.ForeignKey(User, related_name='created_by', editable=False) in admin.py, i hav

Re: Disable i18n for certain templates

2008-10-22 Thread Gerard Petersen
-ish object or string. Regards, Gerard. Armandas wrote: > Hi, > > I am using internationalization on my project. Recently I found out > that output from date filter is not in english. The point is, that I > use this to construct pubDate for my rss, like this: > > {{ post.date

Re: Disable i18n for certain templates

2008-10-22 Thread Gerard Petersen
The answer to the Q in the subject would be not to use the {% trans .. %} or {% load i18n %} tags in your template .. :) Armandas wrote: > Hi, > > I am using internationalization on my project. Recently I found out > that output from date filter is not in english. The point is, that I > use thi

Re: What do you use for design interface / mockup

2008-10-23 Thread Gerard Petersen
dling wise). Regards, Gerard. Francis wrote: > Hi, > > What do you use for design interface / mockup? > > I made some search, omnigraph seems pretty popular. But I often switch > between linux and Mac and omnigraffle isn't cross platform. > > Is there any tools out the

Custom include tag to parse locale into filename

2008-10-23 Thread Gerard Petersen
quot;myapp/customer_side.html" %} I'm thinking about a custom templatetag that picks up on the locale. Does anybody have other suggestions on how to do this? Thanx a lot. Regards, Gerard. -- urls = { 'fun': 'www.zonderbr

[solved] Custom include tag to parse locale into filename

2008-10-24 Thread Gerard Petersen
+'.') path = i18npath if path[0] in ('"', "'") and path[-1] == path[0]: return ConstantIncludeNode(path[1:-1]) return IncludeNode(bits[1]) register.tag('my18n_include')(do_i18n_include) Note: there's no fallback yet to

Re: model inheritance - getting data from child objects

2008-11-07 Thread Gerard flanagan
Alistair Marshall wrote: > As I said, I have the function named the same in each child class but > I need to be able to access it from a list of all the Places. > > My current thinking is just a long list of try, except: statements > attempting to call the subclass from the Place model but this f

Re: Problem with named URL and parameters

2008-11-13 Thread Gerard flanagan
Brandon Taylor wrote: > Hi everyone, > > So I have a question/problem with a named URL pattern... > > #urls.py > url(r'^resources/conversions/(?P[-\w]+)/$', > 'my_site.views.conversions', name='conversions'), > > This is a mostly static site, but I would like to be able to pass the > "conversio

Re: Read/Create Excel xls files using django

2008-11-13 Thread Gerard flanagan
Kurczak wrote: > On 13 Lis, 20:45, dj <[EMAIL PROTECTED]> wrote: >> Hello All, >> >> I am trying to detemine if there is a way to read the data from an >> Excel xls file into django. I also need to create an xls file. Does >> anyone know how that would be done ? > If you have windows hosting you c

Re: noob: Where does print output go?

2008-08-22 Thread Gerard Petersen
Frantisek, It was, I just couldn't get it there because the print statement was in a view that was never invoked .. :-/ Thanx a lot. Regards, Gerard. Frantisek Malina wrote: > When using the development server, > print output is right in t

Noob: form class location

2008-08-23 Thread Gerard Petersen
()) sender = forms.EmailField(required=False) I'm torn between models.py and views.py. And I read about a forms.py, but that is not a 'standard' framework file. So, where do I put this? Thanx all! Regards, Gerard. -- urls = { 'fun': 'www.zonderbroodje

Re: Noob: form class location

2008-08-23 Thread Gerard Petersen
ould be an import statement somewhere then, right? Forgive my Django noobness. And thanx a lot!! Regards, Gerard. Russell Keith-Magee wrote: > On Sat, Aug 23, 2008 at 8:59 PM, Julien Phalip <[EMAIL PROTECTED]> wrote: >> Hi, >> >> In Django there are no 

Re: Noob: form class location

2008-08-24 Thread Gerard Petersen
Julien, It's working. It took some shuffling of import statements because I subclass ModelForm in there for use with form.as_table Anyway, thanx again! Regards, Gerard. Julien Phalip wrote: > The import is likely to be in your view: > > # views.py > from forms import M

Admin: Showing attributes in drop list

2008-08-24 Thread Gerard Petersen
s instead of a name (or field from the customer model) This clarifies: http://www.gp-net.nl/userdl/screens/screen1.png Is there a directive to specify this? Thanx a lot. Gerard. -- urls = { 'fun': 'www.zonderbroodje

Re: Admin: Showing attributes in drop list

2008-08-24 Thread Gerard Petersen
Erik, Marvelous! I saw this in the tutorial but I missed the part where admin uses it as well. Thanx and greetz! Gerard. Erik Allik wrote: > You could define the __unicode__ (or __str__) method for the Customer > class: > > class Customer(models.Model): > ...

Re: Noob: form class location

2008-08-24 Thread Gerard Petersen
stomer Regards, Gerard. phillc wrote: > if im moving my form related logic to another file, i wouldnt really > need to import forms else where? ;) > > On Aug 23, 9:10 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> > wrote: >> On Sat, Aug 23, 2008 at 8:59 PM

Re: File upload and access properties

2008-08-26 Thread Gerard Petersen
Possibly not the cleanest of solutions, but you could put a sticky bit on the parent directory to force this. Regards, Gerard. Malcolm Tredinnick wrote: > > On Mon, 2008-08-25 at 22:44 -0700, Julien Phalip wrote: >> Hi, >> >> I'm using the FileSystem storage to s

Re: Model cheat sheet

2008-08-26 Thread Gerard Petersen
Nice work! So well, shouldn't you put that on a regular page somewhere for quick cut and paste access instead of on scribd? Regards, Gerard. DavidY wrote: > Hi, I am doing a series of cheat sheets, this is on models. It is a > two page concise, example based demonstration of

droplist pre set selected

2008-08-27 Thread Gerard Petersen
form = ProjectForm() return render_to_response(template+'/project_add.html', {'form': form}) Thanx a lot! Regards, Gerard. -- urls = { 'fun': 'www.zonderbroodje.nl', 'tech': 'www.gp-net.nl' } --~--~-~--~~~-

Re: droplist pre set selected

2008-08-27 Thread Gerard Petersen
In addition .. I just seen this one: field1 = forms.ModelChoiceField(..., initial=1,...) But i'm using this in the template: {{ form.as_table }} In combination with the ModelForm class: class ProjectForm(ModelForm): class Meta: model = Project Thanx again. Regards, G

admin widgetry in myapp

2008-08-28 Thread Gerard Petersen
ugh source code does not seem to doe it for me .. :-/ Thanx a lot! Regards, Gerard. -- urls = { 'fun': 'www.zonderbroodje.nl', 'tech': 'www.gp-net.nl' } --~--~-~--~~~---~--~~ You received this message because you are su

Re: Model cheat sheet

2008-08-28 Thread Gerard Petersen
Thanx a lot! Regards, Gerard. Álvaro J. Iradier wrote: > Get them here: > > http://www.airadier.com/media/django/django_db.pdf > http://www.airadier.com/media/django/django_template.pdf > http://www.airadier.com/media/django/django_url.pdf > > Greets. > > On T

Setting Modelform exclude field after post

2008-08-28 Thread Gerard Petersen
n render_to_response(template+'/project_add.html', {'form': form, 'customer': customer}) Can anybody help me out? Thanx! Gerard. -- urls = { 'fun': 'www.zonderbroodje.nl', 'tech': 'www.gp-net.nl' } --~--~-~--~-

Re: cheatsheet of forms.Form

2008-08-29 Thread Gerard Petersen
A reguler download would be appreciated. Regards, Gerard. DavidY wrote: > Here is a two page, concise, example-based cheat sheet for > forms.Forms > > http://www.scribd.com/doc/5224358/cheatsheet-of-formsForm-for-django > > download is available on the page somewhere >

datetime formatting (model vs. form)

2008-08-29 Thread Gerard Petersen
form field definition? Thanx a lot! Regards Gerard. --~--~-~--~~~---~--~~ 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 th

Re: admin widgetry in myapp

2008-08-29 Thread Gerard Petersen
Martin, After a few days of diggin' I'm well on my way. Never saw the page you sent me. Marvelous docs. Thanx!! regards, Gerard. Martin Diers wrote: > I would suggest that first you learn about forms and widgets apart > from the admin. Once that is done, it's pretty

Revised: datetime formatting (mysql vs. django)

2008-08-29 Thread Gerard Petersen
date related settings like DATE_FORMAT (also the ones in Mysql). Then what leaves me is how Django's DATE_FORMAT fits in. And why does a 'now' button on the admin pages keep giving me the reverse version. Anybody who knows anything about this ... Please he

Re: ANNOUNCE: Django 1.0 released

2008-09-05 Thread Gerard Petersen
Dear Django Team. Congratz on the 1.0 release Into Django for a few weeks, and already have a robust application. Keep up the great work! Kind regards, Gerard. James Bennett wrote: > The Django team is pleased to announce the release of Django 1.0 this evening: > > Downl

How does django know the difference between INSERT and UPDATE

2008-09-06 Thread Gerard Petersen
myapp/customer/'+str(customer.id)) else: customer = get_object_or_404(Customer, pk=customer_id) form = CustomerForm(instance=customer) return render_to_response(template+'/customer_edit.html', {'form': form, 'customer': customer }) Thanx!! Gerar

Re: How does django know the difference between INSERT and UPDATE

2008-09-08 Thread Gerard Petersen
Jonknee, That cleared up major! Thanx for your teachings. Regards, Gerard. jonknee wrote: >> I read that Django knows the difference between a new and a updated record, >> but it replicates the customer if I don't set the customer_id before a >> customer.save. Would s

Re: Security question

2008-09-11 Thread Gerard Petersen
s a Django issue. Don't know if this helped, maybe you should drop a post at: http://lists.netfilter.org/ Regards, Gerard. OliverMarchand wrote: > Dear all, > > we are using Django as an application server. Now we want our website > server to be able to read from (an

Import error: Model based on another model

2008-09-13 Thread Gerard Petersen
known. And doing a 'from models import...' seems very weird when I'm IN the models module. when I move it to a myfunctions.py I get import errors. from models import Meta ImportError: cannot import name Meta Can anybody give me some insights on how, and more impor

Re: Import error: Model based on another model

2008-09-13 Thread Gerard Petersen
-attributes like ordering. Thanx for the tip. I already saw this one coming ... ;-) Regards, Gerard. > > -- > DR. > > -- urls = { 'fun': 'www.zonderbroodje.nl', 'tech': 'www.gp-net.nl' } --~--~-~--~~~-

Re: Import error: Model based on another model

2008-09-15 Thread Gerard Petersen
0', '6%'), ('19.0', '19%'), ) I hope this clearifies things. Thanx a lot for your interest and help! Regards, Gerard. Daniel Roseman wrote: > On Sep 13, 10:56 am, Gerard Petersen <[EMAIL PROTECTED]> wrote: >> Daniel, >> >

Re: Import error: Model based on another model

2008-09-16 Thread Gerard Petersen
ld' the BTW_CHOICES don't get executed in models.py and do get executed in the myforms.py Thanx again! Regards, Gerard. Daniel Roseman wrote: > On Sep 15, 9:34 pm, Gerard Petersen <[EMAIL PROTECTED]> wrote: >> Daniel, >> >> I'm building an invoice

Re: DjangoCon keynote transcript/summary

2008-09-16 Thread Gerard Petersen
onable > - Database migration is painful True! > - Not trendy enough Get a pair of Gucci sunglasses maybe that'll help! > - Needs more frequent releases Possibly > - Dev team needs beards. Show me some pictures > - Wants a pony. Literally. How about some rollerskates .. ;-

Re: DjangoCon keynote transcript/summary

2008-09-18 Thread Gerard Petersen
ack on the subjects. Thanx, and happy coding to all! Regards, Gerard -Just another sysadmin- P. Malcolm Tredinnick wrote: > The original summary wasn't a bad summary and Gerard's reactions were > also tongue-in-cheek. But it's important to realise that Cal's > presentati

Re: Import error: Model based on another model

2008-09-18 Thread Gerard Petersen
Daniel, Thanx for the answer on code execution. As far as the import issue is concerned. I'll have a look at importing specifics. I wouldn't want you to have to dig through my code to find a syntactic typo ... :-) Regards, Gerard. Daniel Roseman wrote: > On Sep 16, 10:08 pm, Ge

Re: IE Hell. Blank Page

2008-09-19 Thread Gerard Petersen
loads/details.aspx?FamilyID=e59c3964-672d-4511-bb3e-2d5e1db91038&displaylang=en And while looking ... lot's more fore IE: http://blogs.msdn.com/ie/archive/2007/06/22/from-microsoft-teched-2007-web-development-tools-for-internet-explorer.aspx Regards, Gerard. Daniele Procida wrote: > On

Re: sample app for beginner

2008-09-21 Thread Gerard Petersen
Chuck, The Django tutorial should get you going: http://docs.djangoproject.com/en/dev/intro/tutorial01/#intro-tutorial01 And an app. published earlier on this list: http://code.google.com/p/django-todo/ Happy coding. Gerard. Chuck Bai wrote: > Does anyone know a sample Django

function import errors model import in other file

2008-09-22 Thread Gerard Petersen
to specify more exact since it's a deviating filename? Do I need to add the deviating filenames (myforms.py, myfunctions.py) to settings.py or _init__.py? I'm completely lost. Thanx a lot! Regards, Gerard. ## __init__.py empty! ## urls.py from django.conf.urls.defaults import *

Re: function import errors model import in other file

2008-09-22 Thread Gerard Petersen
a lot!! Regards, Gerard. Norman Harman wrote: > Gerard Petersen wrote: >> Hi All, >> >> I'm trying to import a function. When adding this statement I get a Model >> import error in a completely different place, not even related. I've added >> the files from my

Concept Q: Extra model fields for clean templates sake

2008-09-25 Thread Gerard Petersen
ata to objects in a list, before it's rendered in a template? Thanx a lot, Gerard. Some source snippets if it's not clear: # Model class Product(models.Model): per_price = models.DecimalField('Product price', max_digits=15, decimal_places=2) total_price = models.Dec

Re: Concept Q: Extra model fields for clean templates sake

2008-09-25 Thread Gerard Petersen
in the future I want to be able to generate them in pdf or ms word as well. So doing the work in the view seems like easier transition to those filetypes in the future. Regards, Gerard. Daniel Roseman wrote: > On Sep 25, 10:33 am, Gerard Petersen <[EMAIL PROTECTED]> wrote: >> Hi

Re: Concept Q: Extra model fields for clean templates sake

2008-09-25 Thread Gerard Petersen
Brian, Now that I read it ... so obvious. I've come from a long history of procedural coding. So I understand OOP but don't take full advantage of it yet ... obviously .. :-) Thanx and Greetz! Gerard. Brian Neal wrote: > On Sep 25, 4:33 am, Gerard Petersen <[EMAIL PROTECTE

Re: Query

2008-09-25 Thread Gerard Petersen
eb applications. But there's more information to digest before you have working functionality. I'd look at the django tutorial: http://docs.djangoproject.com/en/dev/intro/tutorial01/ And ask yourself if you want to expand your described functionality in the future. Hope it helps. Rega

Date formatting between model and form output

2008-09-26 Thread Gerard Petersen
So the sequence is almost complete. But where do I format the value so the formfield shows the correct formatted value when editing. In the model, the form or the view method? Thanx a lot. Gerard. -- urls = { 'fun': 'www.zon

Update: Date formatting between model and form output

2008-09-26 Thread Gerard Petersen
Getting closer. This works: product.period_start_date.strftime('%d-%m-%Y') But I definitely do not want this in all view handlers. It should go in the model .. or the modelform. Thanx again! Gerard. Gerard Petersen wrote: > Hi all, > > I'm trying to have a

Re: Update: Date formatting between model and form output

2008-09-26 Thread Gerard Petersen
Anyway, thanx for the response. Regards, Gerard. koenb wrote: > On 26 sep, 16:00, Gerard Petersen <[EMAIL PROTECTED]> wrote: >> Getting closer. This works: product.period_start_date.strftime('%d-%m-%Y') >> >> But I definitely do not want this in all view handlers. I

Re: Update: Date formatting between model and form output

2008-09-26 Thread Gerard Petersen
Found an error in the model code. It should be this: if isinstance(self.period_start_date, datetime): Regards, Gerard, koenb wrote: > On 26 sep, 16:00, Gerard Petersen <[EMAIL PROTECTED]> wrote: >> Getting closer. This works: product.period_start_date.strftime('%d

admin.site.register breaks unittests

2008-09-26 Thread Gerard Petersen
rly. What am I misssing? Thanx! Gerard. -- urls = { 'fun': 'www.zonderbroodje.nl', 'tech': 'www.gp-net.nl' } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Dj

Why/where are field errors caught before form.is_valid is executed

2008-09-27 Thread Gerard Petersen
Elaborate google searches came up empty. And it's not like I'm inventing the wheel here. Thanx a lot for any pointers. Gerard. -- urls = { 'fun': 'www.zonderbroodje.nl', 'tech': 'www.gp-net.nl' } --~--~-~--~~

Re: Why/where are field errors caught before form.is_valid is executed

2008-09-27 Thread Gerard Petersen
x_length=2,) def __init__(self, *args, **kwargs): super(ProductForm, self).__init__(*args, **kwargs) # By this one!!! self.fields['description'].max_length = 2 Still would like a regex based check in the declarative one. Anybody done this before? Thanx n gree

Re: admin.site.register breaks unittests

2008-09-27 Thread Gerard Petersen
Russel, The example from the docs somehow doesn't work. I've turned on the autodiscover but under admin it stays empty. I don't know if this is related, but putting the register statements in urls.py does stop breaking my tests. Regards, Gerard. Russell Keith-Magee wrote: &

forms.DecimalField ... min_value=0.01 not honored

2008-09-27 Thread Gerard Petersen
does work. I didn't want to create a new ticket before being sure. I'm a correct? Regards, Gerard. -- urls = { 'fun': 'www.zonderbroodje.nl', 'tech': 'www.gp-net.nl' } --~--~-~--~~~---~--~~ You received t

Re: forms.DecimalField ... min_value=0.01 not honored

2008-09-28 Thread Gerard Petersen
Malcom, This seems so obvious, I'm working on an invoice system and already passed the chapter on rounding decimals. I still am somewhat overwhelmed I guess by all that Django does. Nevertheless, it's impressive how good Django keeps to (python) conventions. Thanx a lot. Regard

Re: admin.site.register breaks unittests

2008-09-28 Thread Gerard Petersen
-- snip-- {% for model in app.models %} It safe to say the app_list contains nothing. Thanx a lot for your effort. Regards, Gerard. Russell Keith-Magee wrote: > On Sat, Sep 27, 2008 at 9:54 PM, Gerard Petersen <[EMAIL PROTECTED]> wrote: >> Russel, >

Re: admin.site.register breaks unittests

2008-09-28 Thread Gerard Petersen
the models of the other apps? Looks like something I want to test for security reasons. Or does one put an app behind a different (for instance) apache vhost or location directive anyway? I'll stop with the questions now ... rtfm and all that ... ;-) Thanx again. Regards, Gerard. > &g

Re: blank vs. exclude

2008-09-28 Thread Gerard Petersen
uded fields have no null/blank/editable options set in the model itself. Regards, Gerard. johnny wrote: > I have a question about the exclude property in ModelForm. When I > have a Model and the ModelForm for it excludes a field from that > Model, shouldn't the ModelForm validation ex

  1   2   >