Re: How to format datetime stamp in JS like it is doing by the date template tag?

2024-03-21 Thread Matthias Yeni
To format the timestamp in JavaScript according to the format defined by Django, you can use Django settings to determine the format and adapt it in JavaScript. Here's how you can do it: Retrieve the date and time format defined by Django in your JavaScript file using a Django template rendering

Re: Django-Channels: Debugging

2018-01-30 Thread 'Matthias Brück' via Django users
ee if that makes it work. > > Andrew > > On Mon, Jan 29, 2018 at 6:49 AM, 'Matthias Brück' via Django users < > django...@googlegroups.com > wrote: > >> Ok, i found the problem, the authentification is not working because of >> django-tenant-schemas. But I

Re: Django-Channels: Debugging

2018-01-29 Thread &#x27;Matthias Brück' via Django users
Ok, i found the problem, the authentification is not working because of django-tenant-schemas. But I'm still wondering why the print messages only gets output after a restart of the worker. Am Montag, 29. Januar 2018 12:30:54 UTC+1 schrieb Matthias Brück: > > Hi everyone, > &g

Django-Channels: Debugging

2018-01-29 Thread &#x27;Matthias Brück' via Django users
? Thanks, Matthias -- 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 e

Re: Django 2.0 Tutorial Template

2017-12-10 Thread Matthias Müller
It look s fine also to me. What do you expect ? 2017-12-10 5:50 GMT+01:00 Dylan Reinhold : > That looks fine. how about your view.py. > > Dylan > > On Sat, Dec 9, 2017 at 6:05 PM, Carl Brubaker > wrote: > >> I copied it from the django tutorial page: >> >> {% if latest_question_list %} >> >

Re: new to django

2017-06-12 Thread Matthias Müller
The tutorial in the documentation is a good start. cheers Matthias 2017-06-12 5:49 GMT+02:00 jlew921 : > hi guys new to django...and directions pls??? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To uns

Re: Unique app name error problem when building a Wagtail multisite solution

2016-12-22 Thread &#x27;Matthias Brück' via Django users
erstag, 22. Dezember 2016 13:16:45 UTC+1 schrieb Melvyn Sopacua: > > Hi, > > On Wednesday 21 December 2016 14:30:32 'Matthias Brück' via Django users > wrote: > > is this really just not possible? What I found is this: > > > > you can't have two

Re: Unique app name error problem when building a Wagtail multisite solution

2016-12-21 Thread &#x27;Matthias Brück' via Django users
is this really just not possible? What I found is this: you can't have two apps with the same name, even if they have different > fully qualified module paths https://groups.google.com/forum/#!msg/django-users/AMYLfQo6Ba4/Y-57B0i7qy4J How would you guys handle this? -- You received this mes

Unique app name error problem when building a Wagtail multisite solution

2016-12-21 Thread &#x27;Matthias Brück' via Django users
keep things separated? Thanks! Matthias -- 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

[Feedback requested] Django Debug Toolbar: Removal of automatic setup

2016-08-19 Thread Matthias Kestenholz
rs to use the explicit setup, and automatic setup is only kept for backwards compatibility[2] therefore this change shouldn't be too surprising, at least for those reading the documentation. Thanks, Matthias [1]: https://github.com/jazzband/django-debug-toolbar/pull/851 [2]: http://dj

Re: How o run shell command in Django ?

2016-08-08 Thread Matthias Müller
Hi Asad, run system calls in django means run system calls in python. Python has a library called "os". https://docs.python.org/3/library/os.html See 16.1.6 process management HTH -- Viele Grüße / Best Regards Matthias Müller 2016-08-08 11:33 GMT+02:00 Asad ur Rehman : >

Re: Django Beginner

2016-05-26 Thread Matthias Müller
h, what about making the tutorial ? https://docs.djangoproject.com/en/1.9/intro/tutorial01/ enjoy it ! 2016-05-26 9:16 GMT+02:00 Atchuta Saikumar : > Hello ... > I want to learn Django.I have some basic knowledge in python but don't > know oop concepts in python.what to do now? > > -- > Y

Re: Django on CentOS

2015-11-09 Thread Matthias Runge
obin. CentOS 6 is fine, as you saw your developer server already worked. Looking at your project, I can not find a file pizzaclub.settings, but pizza_club.settings (see the '_' ?) Matthias -- You received this message because you are subscribed to the Google Groups "Django user

Re: Django formset hidden id field

2015-05-27 Thread Matthias Müller
t would be > difficult to fake the CSRF string. > > Just in general, is it a good idea to expose primary keys like this? > sometimes you can see them in urls too, like: www.yoursite/blog/1/, 1 > would be the primary key of a blog. > > On Wednesday, 27 May 2015 22:01:37 UTC+8, M

Re: Django formset hidden id field

2015-05-27 Thread Matthias Müller
being updated from any illegal source. In your example there is this csrf missing, Most probably for didactical reasons. Refer to https://docs.djangoproject.com/en/1.8/ref/csrf/ Cheers Matthias 2015-05-27 15:47 GMT+02:00 Cheng Guo : > Hello, > > I have a formset and when I render it

Re: Django 1.7 I just installed postgres, it works but I cannot see my data in postgres database

2015-03-13 Thread Matthias Müller
I do agree to John. Check out the commands createuser --help and createdb --help Matthias 2015-03-13 12:09 GMT+01:00 John : > Sabine, > > It is a really Bad Idea to use the postgres user and database for your > data. Create a new user and database and use that inste

Re: How to install django in redhat where i have python 2.6 and 2.7 and i need to install django in python 2.7

2015-02-19 Thread Matthias Runge
L package repository. Matthias -- 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 em

Re: db performance with model inheritance vs. alternatives

2013-12-04 Thread Matthias Dahl
Hello @all, just to be clear and honest upfront: I've just posted this question on http://stackoverflow.com/questions/20373194/db-performance-with-model-inheritance-vs-alternatives as well. I hope this is okay and doesn't upset anyone. Thanks again. So long, Matthias -- Dipl

db performance with model inheritance vs. alternatives

2013-12-04 Thread Matthias Dahl
solution above or if this is something that just stinks of problems and should be avoided at all costs? ;) Thanks in advance for any help and hints in advance. It is very much appreciated... So long, Matthias -- Dipl.-Inf. (FH) Matthias Dahl | Software Engineer | binary-island.eu services: cust

Re: Psycopg2 on Mac OS X (Snow Leopard)

2013-11-10 Thread Matthias Fripp
riseDB might take care of this automatically? Matthias On Monday, October 28, 2013 9:54:05 AM UTC-10, Skip Montanaro wrote: > > > I just had this exact same problem and it took me a while to find the > > solution. > > > > On OSx there is a separate library path va

Re: Ubuntu, Postgres, and psycopg2.

2013-10-17 Thread Matthias Müller
You need the python header as well: sudo apt-get install python-dev -- Viele Grüße / Best Regards Matthias Müller 2013/10/17 Nigel Legg > Thanks Thomas, that worked, so some progress, but now when I do sudo pip > psycopg2, I get an error: Python.h not found - > In file included fro

Re: PostgresSQL or MySql with django?

2013-03-18 Thread Matthias Müller
more used in productive applications. My 2 cents. Matthias 2013/3/18 frocco > Hello, > > What is the recommended database for django? > > I have used MySQL, but am interested in Postgres. > > Thanks > > -- > You received this message because you are subscribed t

Re: [feincms] [ANN]: FeinCMS v1.7

2013-02-27 Thread Matthias Kestenholz
On Wed, Feb 27, 2013 at 8:16 AM, Andi Albrecht wrote: > Hi Matthias, > > first of all thanks for the new release and all the work (this goes to > all developers of course!). > > On Tue, Feb 26, 2013 at 10:00 PM, Matthias Kestenholz > wrote: > > > > > > C

[ANN]: FeinCMS v1.7

2013-02-26 Thread Matthias Kestenholz
Hello everyone This might seem like perfect timing, and nobody'll believe that it wasn't. Anway, FeinCMS v1.7 has been released and is available at the usual places. Thanks to everyone who supported this release with suggestions, prodding and/or code. Best, Matt

Re: What are projects/apps a beginner python developer should look?

2012-11-10 Thread Matthias Müller
Try youtube. Pretty cool series of django tutorial from HackedExistence. https://www.youtube.com/watch?v=yAyWM-iEIos&feature=youtube_gdata_player If the link does not work, search for HackedExistence and django. Good luck. Regards Matthias Am 10.11.2012 16:29 schrieb "HackTheDay"

Re: Choosing a Django-based CMS

2012-08-07 Thread Matthias Kestenholz
t happens on the `next` branch in the github repository. `master` normally does not get much activity since `master` tracks the official maintenance branch (v1.6.x at the moment). Thanks, Matthias -- You received this message because you are subscribed to the Google Groups "Django users&qu

[ANN]: FeinCMS v1.6.0

2012-06-14 Thread Matthias Kestenholz
Hello everyone FeinCMS v1.6.0 has been released this noon and is available from usual places. What is FeinCMS anyway? === FeinCMS is one of the most advanced Content Management Systems built on top of Django. FeinCMS not only includes a page module with many bundled content

[ANN]: Plata v1.1 (django-based shop no. 42)

2012-04-04 Thread Matthias Kestenholz
Hi fellow Djangonauts I'm very proud to announce the release of Plata v1.1. Plata is the BSD licensed Django-based shop by the makers of FeinCMS. (It does not have any FeinCMS-dependencies though.) Like many other shop projects such as django-shop, cartridge etc. it grew out of the frustration of

Re: Creating pdf files

2012-03-25 Thread Matthias Mintert
This should help with reportlab issues on windows: http://www.lfd.uci.edu/~gohlke/pythonlibs/#reportlab -- 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/-/z9v

Re: Query Set to search for a combination of model fields?

2012-03-16 Thread Matthias Kestenholz
/matthiask/towel/blob/master/towel/managers.py It supports grouping ("term1 term2"), inclusion ("term" or "+term") and exclusion ("-term") too. Matthias -- You received this message because you are subscribed to the Google Groups "Django users&

Re: Seeking sample template code for iterating nested QuerySet

2012-03-01 Thread Matthias Kestenholz
gory = categories.setdefault(answer.question.category, SortedDict()) category.setdefault(answer.question, []).append(answer) I hope something like this gets you started. Btw, the BIG advantage of the approach outlined above is that you only need one SQL query to fetch all results you need inst

[ANN]: FeinCMS v1.5.0

2012-02-20 Thread Matthias Kestenholz
Hello everyone FeinCMS v1.5.0 has been released this noon and is available from usual places. The differences to v1.5.0.rc1 are very small, only an update of the AUTHORS file and a few fixes to the thumbnail template filters. What is FeinCMS anyway? === FeinCMS is one of t

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

2012-02-16 Thread Matthias Kestenholz
of pain for us too. On the other hand we finally have explicit instead of fragile behavior, so I think the pain is still worth it (besides being a better citizen in the Django ecosystem, because now we do not rely on any monkey-patching of Django proper anymore.) Best regards Matthias -- You received

[ANN]: FeinCMS v1.5.0.rc1

2012-02-15 Thread Matthias Kestenholz
Hello everyone The first release candidate of FeinCMS v1.5 has just hit the streets, late as always. The release is available at the following places: PyPI: http://pypi.python.org/pypi/FeinCMS Github: https://github.com/feincms/feincms Documentation: http://readthedocs.org/docs/feincms-django-c

Re: Selecting an E-commerce Application

2012-01-16 Thread Matthias Kestenholz
ve to customize the shop in several ways, choosing a lightweight option with a small LOC count which solves the hard problems in a reusable way (order tracking, payments, total calculation with taxes and discounts), Plata might be the right choice for you. Best regards Matthias -- You received

[ANN]: FeinCMS 1.5.0.pre1

2011-11-30 Thread Matthias Kestenholz
Hello everyone I'm finally starting the release process for FeinCMS v1.5 (sorry for waiting so long). The release is available at the following places: PyPI: http://pypi.python.org/pypi/FeinCMS Github: https://github.com/feincms/feincms Documentation: http://readthedocs.org/docs/feincms-django-

Re: Django ORM - Am I trying to do the impossible?

2011-10-21 Thread Matthias Kestenholz
e and compare all fields' values for differences, f.e. like this: http://dpaste.com/hold/638491/ (Note: You have to create the first AssignmentUpdate when creating the Assignment itself, otherwise you'll be unable to compare the first update to the initial values of all Assignment'

Re: FieldError on ManyToMany after upgrading to Django 1.3

2011-09-26 Thread Matthias Kestenholz
On Mon, Sep 26, 2011 at 12:36 PM, Matthias Kestenholz wrote: > On Mon, Sep 26, 2011 at 12:34 PM, Philip Mountifield > wrote: >> I also have a great deal of dynamically generated models. Interestingly in >> my case I find the issue when using the development server with DEBUG =

Re: FieldError on ManyToMany after upgrading to Django 1.3

2011-09-26 Thread Matthias Kestenholz
ake a look at your github, thanks for sharing the link. > > Out of interest, with respect to David's comment about postgres versions, do > you use version 8.1 or another? > We don't (unfortunately, but that's a different topic) on the site in question. Matthias -- You rec

Re: FieldError on ManyToMany after upgrading to Django 1.3

2011-09-26 Thread Matthias Kestenholz
manifest itself again, hoping it wont: https://github.com/matthiask/feincms/commit/f2de708a09f8b6cf4fdbca6b3583747b6ebbc2e2 Matthias -- 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@goog

[ANN]: FeinCMS v1.4.1 final

2011-08-16 Thread Matthias Kestenholz
er. Best regards Matthias -- 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

[ANN]: FeinCMS v1.4.0 final

2011-08-15 Thread Matthias Kestenholz
Hello everyone FeinCMS v1.4.0 has been released this morning and is available from usual places. The differences to v1.4.0.rc1 are a small (cosmetic) bugfix and documentation updates. Please note that the official repository has been moved to the feincms organization on github and does not live in

[ANN]: FeinCMS v1.4.0.rc1

2011-08-08 Thread Matthias Kestenholz
Hello everyone The first release candidate of FeinCMS v1.4 hit the streets yesterday and is available at the usual places. Please note that the official repository has been moved to the feincms organization on github and does not live in my personal account anymore. Development of 1.5 has started

Re: Looking for recommendations for Custom Forms from Admin

2011-06-25 Thread Matthias Kestenholz
er It contains a FeinCMS content type (form_designer.models.FormContent), the rest of it isn't FeinCMS-specific. A FeinCMS installation isn't needed either. If you want to write a view yourself, the code should be structured similarly to the render() method of FormContent. Matthias -- Yo

Re: Best django ecommerce aplication?

2011-05-19 Thread Matthias Kestenholz
n any case, have a look here for alternatives: http://djangopackages.com/grids/g/ecommerce/ Matthias -- 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 g

FeinCMS 1.3.0 final has been released!

2011-04-10 Thread Matthias Kestenholz
Hello everyone FeinCMS 1.3.0 has just been released and is available at the usual places. What is FeinCMS anyway? === FeinCMS is one of the most advanced Content Management Systems built on top of Django. FeinCMS not only includes a page module with many bundled content ty

[ANN]: FeinCMS 1.3 release candidate

2011-03-30 Thread Matthias Kestenholz
e': lambda page: page._cached_url, } * The copy/replace and preview mechanisms never worked quite right. They were completely dropped from this release. If you still need the ability to create copies of objects, use the standard Django ``ModelAdmin.save_as`` feature. -- Mat

Re: Slow query. Any way to speed things up?

2011-03-29 Thread Matthias Kestenholz
#x27;t a bug because this could potentially cause different results depending on the table and table content. Matthias -- Django CMS building toolkit: http://www.feinheit.ch/labs/feincms-django-cms/ -- You received this message because you are subscribed to the Google Groups "Django

Re: Is there any Open Source Django Newspaper CMS?

2011-03-23 Thread Matthias Kestenholz
On Wed, Mar 23, 2011 at 12:31 PM, Mika Sjöman wrote: > django-cms.org > That wasn't very helpful. He could tell it himself, but you should really read the messages you are replying to. Quoting Rehmetjan: > I am heard about Django is comes from a Newspaper group, but never found > a Newspaper C

[ANN]: FeinCMS 1.3 preview release

2011-03-18 Thread Matthias Kestenholz
Today is a good day for rolling another release. FeinCMS 1.3.0.pre1 was released today and is ready for testing and feedback. Please keep in mind that this isn't a final release yet. PyPI: http://pypi.python.org/pypi/FeinCMS/1.3.0.pre1 Github: https://github.com/matthiask/feincms/tree/v1.3.0.pre1

Re: Problem with FileField (file upload) and generic views

2011-03-10 Thread Matthias Kestenholz
blem but was fixed years ago. > Any suggestions would be appreciated, TIA. Which enctype do you use when submitting the form? It does not work with the default POST enctype, you have to use the following: Matthias -- Matthias Kestenholz - Dipl. Umwelt-Natw. ETH - Konzept & Programmie

Re: necessary of python

2011-02-12 Thread Matthias Kestenholz
e as Django (it's not necessary to know Python beforehand), but you still have to learn Python if you want to be any good with Django. There's no way around it. Matthias -- Matthias Kestenholz - Dipl. Umwelt-Natw. ETH - Konzept & Programmierung FEINHEIT GmbH - Molkenstrasse

Re: E-commerce site

2011-02-08 Thread Matthias Kestenholz
urrently > I'm happy with geany (a text editor + some more) Whatever suits you. IDEs are a topic for religious wars, I won't give advice here. > Don't worry about the fact I'm new to django, I'm fast to adapt. > HTH Matthias -- Matthias Kestenholz - Dip

Re: SESSION_EXPIRE_AT_BROWSER_CLOSE = True, session expiry date wrong when browser closed?

2010-12-10 Thread Matthias Runge
AFAIK there is a known bug in FireFox preventing it from working correctly. Try (nearly) any other browser. "Stodge" schrieb: >I have SESSION_EXPIRE_AT_BROWSER_CLOSE set to True in my settings. >When the user visits my custom login page a new session is created for >them in the database. The

Re: Django book

2010-11-28 Thread Matthias Runge
Djangobook is available as printed edition from apress, as well as "practical django projects". The latter, I think, aims to more advanced django programmers. "The definitive guide to django" was a good starting point for me. I hope, this helps for you, Matthias "

Re: -bash: django-admin.py: command not found

2010-11-16 Thread Matthias Runge
Make sure wether django is properly installed on your system. I think your problem lies there. Matthias "ErritG" schrieb: >Hello everybody, > >Even though many posts on the internet address this issue I haven't >been able to tackle it using version Python 2.7. A

Re: What's the best way to develop an app that is similar the django admin?

2010-09-22 Thread Matthias Kestenholz
r you or does not fit your needs, maybe it can still serve as an inspiration for your own project. Matthias -- Django CMS building toolkit: http://www.feinheit.ch/labs/feincms-django-cms/ -- You received this message because you are subscribed to the Google Groups "Django users" gro

Re: CSRF verification failures (admin)

2010-08-19 Thread Matthias Runge
es :-) > I've seen some strange errors with Django and python 2.4 on RHEL 5.x. Solution for me was to deploy the same code on fedora using python 2.5 or higher. Matthias -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Filter based on result of model method

2010-07-07 Thread Matthias Kestenholz
On Sat, Jul 3, 2010 at 7:20 PM, Wiiboy wrote: > Is there a way to filter based on the result of a model instance > method? > > I've got a Permission model with a one-to-one relationship with an > Article.  The Permission model stores the different groups that the > Article author said could read t

Re: LAMPP + Django on Fedora 13 Linux

2010-06-30 Thread Matthias Runge
both, php and django. Matthias -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.c

Re: QuerySet Behaviour Question (Django 1.1)

2010-06-29 Thread Matthias Kestenholz
Hi On Mon, Jun 28, 2010 at 4:37 PM, Jeff wrote: > Hi, > > I have a question concerning some queryset behaviour in Django 1.1. > > In this example, I have an article model that can contain 1 or more > authors who are users registered through Django's auth system. > > I get the following output whe

Re: Open source CMS (if based on Django better)

2010-05-06 Thread Matthias Kestenholz
Btw, did you take a look at the following page on the Django wiki? http://code.djangoproject.com/wiki/CMSAppsComparison Thanks, Matthias -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@goo

Re: Multi-table inheritance, post_save and fixtures

2010-04-08 Thread Matthias Kestenholz
On Thu, Apr 8, 2010 at 1:04 PM, Phui Hock wrote: > Given the following block of code: > --- models.py --- > from django.db import models > from django.db.models.signals import post_save > > class Animal(models.Model): >    category = models.CharField(max_length=20) > > class Dog(Animal): >    colo

Re: django-paypal

2010-04-06 Thread Matthias Kestenholz
On Tue, Apr 6, 2010 at 8:12 PM, Ramdas S wrote: > > Hey Thanks! > > Should I exempt all the views > I don't know django-paypal that well, but you should only exempt those which are supposed to receive POST requests from external domains (paypal) and which are secured against CSRF attacks in some

Re: django-paypal

2010-04-06 Thread Matthias Kestenholz
decorating the paypal IPN view with the @csrf_exempt decorator: http://docs.djangoproject.com/en/dev/ref/contrib/csrf/#exceptions Matthias -- FeinCMS Django CMS building toolkit: http://spinlock.ch/pub/feincms/ -- You received this message because you are subscribed to the Google Groups

Re: 'template_key' that is missing from the form

2010-04-03 Thread Matthias Kestenholz
d/9bc3293f5a2199d0> This problem has nothing to do with Django itself, it's a FeinCMS issue and is therefore better discussed on the django-feincms list: http://groups.google.com/group/django-feincms Thanks Matthias -- You received this message because you are subscribed to the Google Gr

Re: Multiple tables, is Django suited for this?

2010-03-30 Thread Matthias
hings hopefully won't blow up on my at some point during this process. I know this probably isn't exactly a "common" problem, but are there any recommendations on a place to put my solution other than here once I have one worked out? Thanks, Matthias Welsh On Mar 30, 8:06 am, j

Multiple tables, is Django suited for this?

2010-03-29 Thread Matthias
able the part needs to go in from a drop down menu). Any insight here would be much appreciated. Thanks, Matthias Welsh. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com.

Re: Website themes in django

2010-02-03 Thread Matthias Kestenholz
nd images. If you create a polished HTML structure which lends itself to themeing via CSS, you can create astonishing results without changing the generated HTML code. If you need inspiration, take a look at CSS Zen Garden: http://www.csszengarden.com/ Matthias -- You received this message b

Re: Dealing with polyhierarchical data

2010-01-28 Thread Matthias Kestenholz
n, such as country, region, city, > village, etc.. > > The nested set would be perfect for this, but apparently can't handle multiple > parents. > > Do you see a fast and elegant way to handle this ? > > [1] http://dev.mysql.com/tech-resources/articles/hierarchical-data.

Re: Saving several copies of an object

2010-01-05 Thread Matthias Kestenholz
ment, but it doesn't make sense anyway to use it. > You can try ns.id = None; ns.save() instead. > This won't do it, because ns is a Form, not a Model object. Something like this might work though: obj = ns.save(commit=False) for language in languages: obj.id = None obj.

Re: Creating dynamic models?

2009-11-26 Thread Matthias Kestenholz
a': Meta, 'method1': method1, # ... more fields and methods } for field in fields: attrs[field] = models.DecimalField(...) MyModel = type('MyModel', (models.Model,), attrs) Of course, the usual caveats apply. It might make your code harder to read and understa

Re: Recursion without breaking MVC!

2009-09-29 Thread Matthias Kestenholz
st/ > dictionary with the category tree so I can iterate through it in the > Template. > > Can you point me in the right direction on how to do it? > Have a look at django-mptt, and especially the tree_info template tag for a much better way to do this: http://code.google.com

Re: Django error

2009-09-20 Thread Matthias Kestenholz
#x27;Content-Disposition'] = 'attachment; filename=' + fname That being said, generating a zip archive of all files contained in `filepath` and sending this would make more sense than sending only the first file in the list. Matthias --~--~-~--~~~---~--

Re: Custom form validation request or user-based

2009-09-02 Thread Matthias Kestenholz
mean overriding the ModelAdmin.form object, that doesn't solve the > problem as far as i can see, cause i can't provide arguments there (in that > case, the user). That's correct, but luckily there are more customization hooks available. Matthias --~--~-~--~~---

Re: Custom form validation request or user-based

2009-09-02 Thread Matthias Kestenholz
in site, so I can't >> deal with it directly (in fact, I can't instantiate it and provide >> additional arguments). >> if you need this only for the administration site you'd hvae other hooks that you could override. Either take a look a

Re: Custom form validation request or user-based

2009-08-31 Thread Matthias Kestenholz
Of course that isn't the only possibility to achieve what you want, but it's quite straightforward to do it like this. Matthias -- FeinCMS Django CMS building toolkit: http://spinlock.ch/pub/feincms/ --~--~-~--~~~---~--~~ You received this message bec

Re: Django POST data errors

2009-08-31 Thread Matthias Kestenholz
ng this too, in a satchmo store administration interface. I've no idea what causes this either except that it seems related to Internet Explorer in some way (as you noticed too). I'd be interested in a way to debug this too, or gather hopefully helpful information about what's ca

Re: need help: unique_together in both directions

2009-08-29 Thread Matthias Kestenholz
SinglePoint in p2 in a custom save method. If that isn't an option, you might want to implement a check in your save method. I don't know how you could implement a database UNIQUE index which would reject reversed relationships. Matthias -- FeinCMS Django CMS bui

Re: Execute code after sending a http response?

2009-08-28 Thread Matthias Kestenholz
store the fact that an email should be sent later. Wouldn't you want to show the user an error message if sending the email failed? Btw, the time needed to send an email is not so long normally. I think the benefits (possibility of showing an error message, less complexity) outweigh the downsides (

Re: redirect in django

2009-08-27 Thread Matthias Kestenholz
f, ...): ... admin.site.register(MyModel, MyModelAdmin) I've never seen the need to do such a thing up to now, but this code snippet should be enough to get you started. Matthias -- FeinCMS Django CMS building toolkit: http://spinlock.ch/pub/feincms/ --~--~-~--~~-

Re: Closures, Django Request Object, Django architecture

2009-08-25 Thread Matthias Kestenholz
ect with an authenticated user etc. It's much better to cope with the need of having to pass the request around than pick up the pieces afterwards when choosing the simple path now. Matthias -- FeinCMS Django CMS building toolkit: http://spinlock.ch/pub/feincms/ --~--~-~--~~-

Re: Closures, Django Request Object, Django architecture

2009-08-25 Thread Matthias Kestenholz
.e. the current path), only pass in the current path. It seems like more work for now, but will lead to cleaner, better and more maintainable code in the future. Remember, "Explicit is better than implicit." Matthias -- FeinCMS Django CMS building toolkit: http://spinlock.ch

Re: Documenting Django with sphinx: autodoc doesn't pick up field definitions

2009-08-25 Thread Matthias Kestenholz
IPython session transscript: In [1]: from feincms.module.page.models import Page In [2]: Page.parent Out[2]: In [3]: Page._cached_url --- AttributeErrorTraceback (most recent call last) /home/mk/tmp/feincms/example/ in () AttributeError: type object 'Page' ha

Re: Image Location

2009-08-23 Thread Matthias Kestenholz
he error log > it says: > > File does not exist: /home/mysite/public_html/content, referer: > http://www.mysite.net > > so it has added public_html to the path, how can i solve this issue? > By using the documented way to output the URL of a FileField / ImageField: Look he

Re: From a relative noob

2009-08-22 Thread Matthias Kestenholz
oesn't want to) > > Any thoughts of another way to pass this integer or make this work? Is there a reason why you cannot simply do the following? Some.object.filter(id = var1).filter(value = var2).filter(Cost__gt=var4) HTH Matthias -- FeinCMS Django CMS building toolkit: ht

Re: Dynamically add a line to an inlineformset

2009-08-22 Thread Matthias Kestenholz
to check would be whether the said input fields exist twice inside your form, and the later overwrite the former when the browser is collecting the form fields' values. Matthias --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

Re: How to run a static html page as a section of django website?

2009-08-20 Thread Matthias Kestenholz
or serving static files on the production server; take a look at the server software documentation to find out how to do it there. (The method used on the production server is the same as if you were not using Django at all.) It's hard to give tipps when knowing nothing about the server

Re: how to return an html snippet using ajax $.post()?

2009-08-20 Thread Matthias Kestenholz
ou should take a look at the jquery form plugin[1]; I use it (nearly) all the time. (No disclaimer, it's not my project and I'm not affiliated with it in any way.) Matthias [1]: http://malsup.com/jquery/form/ --~--~-~--~~~---~--~~ You received this messa

Re: how to return an html snippet using ajax $.post()?

2009-08-20 Thread Matthias Kestenholz
I've got to say it looks quite messed up. This won't work. Try something like that: (Parentheses in $.post removed, # added in $('#id_comment'), added quotes around {% get_my_url %} ) Matthias -- FeinCMS Django CMS building toolkit: http://spinlock.ch/pub/feincms/ --~--~-

Re: Dynamically add a line to an inlineformset

2009-08-20 Thread Matthias Kestenholz
ostic, but it's quite easy to do it anyway. Maybe you find some inspiration how to do it in the admin-ui GSoC branch? There, jQuery is used to provide exactly what you want. Matthias -- FeinCMS Django CMS building toolkit: http://spinlock.ch/pub/feincms/ --~--~-~--~~~

Re: Template Filters

2009-08-20 Thread Matthias Kestenholz
On Thu, Aug 20, 2009 at 4:11 AM, WilsonOfCanada wrote: > > Hellos, > > I was wondering if there is a filter that can remove these '\' that > python added when strings are appended to a list or dictionary.  I > cannot use cut because I still need one of the '\' > > ex.  C:\\moo > > Code: > > arrPla

Re: Raw Strings with Variables

2009-08-18 Thread Matthias Kestenholz
On Wed, Aug 19, 2009 at 2:51 AM, WilsonOfCanada wrote: > > However, when I send the list over as a dictionary for HTML: > > d["places"] = arrPlaces > > return render_to_response('rentSearch.html', d) > > the HTML using Django has: > > {{ places }} but returns ['C:\\moo', 'C:\\supermoo'] > And wha

Re: Admin dashboard : hide and merge modules

2009-08-17 Thread Matthias Kestenholz
missions will be hidden. > - merge modules (Auth entries with my User module) > - rename existing modules (not for now, just to know) I think these aren't possible currently. Matthias -- FeinCMS Django CMS building toolkit: http://spinlock.ch/pub/feincms/ --~--~-~--~

Re: Master / Slave Database Replication Scenario

2009-08-16 Thread Matthias Kestenholz
On Sun, Aug 16, 2009 at 11:44 AM, Haes wrote: > > Hi, > > we are using master / slave database replication, no partitioning, > just replicating the complete database to several slaves for > performance reasons. This is making some problems with a newly > developed Django project, which makes use o

Re: Django, CMS, CSS newbie question

2009-08-13 Thread Matthias Kestenholz
On Thu, Aug 13, 2009 at 11:55 PM, eldonp2 wrote: > > Thanks. > > I've gone through the book and done the tutorial on djangoproject.com > > Basically, my qyestion is still not answered - how do I start with a > CSS template and bring Django and Django-CMS in afterward? The problem > is with learnin

Re: Psyco

2009-08-13 Thread Matthias Kestenholz
m. Have you profiled your website / webapplication? Maybe the reason for the slowness lies elsewhere? F.e. complicated Javascript code, too many DB queries or something else? Matthias -- FeinCMS Django CMS building toolkit: http://spinlock.ch/pub/feincms/ --~--~-~--~~~---

Re: More Than Two Models With inlineformset_factory

2009-08-12 Thread Matthias Kestenholz
rom Formset1 and Formset2 intertwined. You need to output the mangement forms and the individual fields by hand. It's very similar to outputting form elements by hand instead of using the as_ul/as_table convenience methods. Hope it helps, Matthias -- FeinCMS Django CMS building toolkit:

Re: More Than Two Models With inlineformset_factory

2009-08-11 Thread Matthias Kestenholz
On Wed, Aug 12, 2009 at 12:51 AM, Geraldo wrote: > > Excellent, Matthias...  That should work nicely.  It does appear, > however, that there is no way to have more than 2 forms in a single > formset.  If inlineformset_factory had an append method things might > be a bit cleaner. &

Re: More Than Two Models With inlineformset_factory

2009-08-11 Thread Matthias Kestenholz
request.method == 'POST': child1_formset = Formset1(request.POST, ..., prefix='child1') child2_formset = Formset2(request.POST, ..., prefix='child2') else: child1_formset = Formset1(..., prefix='child1') child2_formset = Formset2(..., prefix='ch

  1   2   3   >