Django Site(s) looks ugly with ?None as query parameter.

2014-03-06 Thread Christian Schmitt
Hello, currently I have some Django sites one of them is http://www.schnooge-hansili.de/ if i open it with http://www.schnooge-hansili.de/?None It looks really ugly. Currently the first site is just a simple CBV view. Nothing really special. -- You received this message because you are

Message Framework fails on Django 1.6

2013-11-08 Thread Christian Schmitt
Hello, currently I try to use the Django Message Framework, but it will always fail with: > You cannot add messages without installing django.contrib.messages.middleware.MessageMiddleware My middleware, etc: MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware',

Re: PDF generator in Django

2013-08-06 Thread Christian Schmitt
We use Weasyprint. http://weasyprint.org/ Am Montag, 5. August 2013 08:48:40 UTC+2 schrieb navnath gadakh: > > Which is best tool to generate PDF in python django > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group

Re: Django App - Accessing Remote MySQL Database

2013-08-02 Thread Christian Schmitt
You could use django's inbuild ORM: https://docs.djangoproject.com/en/dev/topics/db/multi-db/ And just copy the database. Am Freitag, 2. August 2013 02:50:35 UTC+2 schrieb Ji Park: > > Hello, I'm trying to make an app that can periodically access a remote > mysql database. > > This app will

Re: Ajax

2013-06-30 Thread Christian Schmitt
Every Framework supports Ajax. But as i already mentioned and as already talked about in the django-developers, the support of serialization and other things is really really crappy and needs to be fixed. Especially SPA sites needs some love. I mean in the core Django is cool, and since the new

Re: Ajax

2013-06-29 Thread Christian Schmitt
It would be great if serializers also supports a single object, that would make ajax requests better and / or json support for forms. like that: serializers.serialize('json', object) and not [object] and then i need to strip the [] tags. also the serializers is really hard to use to make more

Re: How to divide my apps? Good practices?

2013-06-21 Thread Christian Schmitt
That is fine in one app. just seperate them. delete models.py and make a package named models. import every model in the __init__.py file from models.py, make sure u set a class Meta: app_label = 'your app name' to every model and you have a very clean app structure. Am Freitag, 21. Juni 2013

Re: How to divide my apps? Good practices?

2013-06-21 Thread Christian Schmitt
You shouldn't divine things that should be together. Better make things together like, game, forum, blog. Don't make a app for too many things. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: Object Lookup after Save

2013-05-22 Thread Christian Schmitt
if you want transactions you need to do : with transaction.atomic(): like described here: https://docs.djangoproject.com/en/dev/topics/db/transactions/ Am Mittwoch, 22. Mai 2013 10:40:15 UTC+2 schrieb Christian Schmitt: > > In Django the normal behavior should be that when you do

Re: Object Lookup after Save

2013-05-22 Thread Christian Schmitt
In Django the normal behavior should be that when you do a save() it will automatically commit() your query's to the database. so that in obj.save() you should just could access the pk with obj.id after you did a obj.save(). If you want to maybe stop the commit you need to do a obj =

Custom RadioSelect() Label from Model Data

2013-05-21 Thread Christian Schmitt
Hello, is there a way to get a Custom Label for a RadioSelect() widget? I have a Model and wanted to get a label like: ' {{ customer.name }} {{ customer.address.city }} {{ customer.address.zip }} ' Is there a way to get certain output? I heard about the RadioSelect Renderer but i can only

Re: ajax get json not receive data from django

2013-05-17 Thread Christian Schmitt
Its better to use json instead of simplejosn : json.dumps() also csrf shouldn't be your case else you would've get an 405 error. 200 requests are fine, what does firebug says about the request? normally there would be a tab called json where you could see the values that got through the

ModelForm localize on Select()??

2013-05-15 Thread Christian Schmitt
Hello, I have a problem with localization and Select() Box, I have the values: 2.00 2.40 3.20 4.00 in my Database, but in Germany we use the number format: 2,00 2,40 3,20 4,00 Now I tried to Localize my modelform with: class LocalizedModelForm(django.forms.ModelForm): def __new__(cls, *args,

Creating Tables w/o SyncDB (Django ORM)

2013-05-03 Thread Christian Schmitt
Hi there, is there a possible way of creating tables with Django's ORM w/o SyncDB. It would be really helpfull, to make new tables while doing some UI interactions. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Re: Django 1.5 CBV - DeleteView - CustomQuery

2013-03-21 Thread Christian Schmitt
object.date_deleted = now.strftime("%Y-%m-%d %H:%M:%S") >> object.save() >> return HttpResponseRedirect(self.redirect_url) >> >> Then you can create a different view for each model you need this >> behavior on, like so... >>

Re: Django 1.5 CBV - DeleteView - CustomQuery

2013-03-21 Thread Christian Schmitt
H:%M:%S") > object.save() > return HttpResponseRedirect(self.redirect_url) > > Then you can create a different view for each model you need this behavior > on, like so... > > class CustomerDeleteView(MarkDeletedView): > mode

Django 1.5 CBV - DeleteView - CustomQuery

2013-03-21 Thread Christian Schmitt
Hello guys, I have a question about the django CBV DeleteView, I want to use it but not delete the element, i just want to set a delete_date so that it isn't visible anymore. With FBV my view looked like this: def delete(request, customer_id): customer = get_object_or_404(Customer,

Re: django generate pdf with tables and charts

2013-02-15 Thread Christian Schmitt
Maybe this Issue could help you http://code.google.com/p/wkhtmltopdf/issues/detail?id=948 Also pass --enable javascript and the javascript delay to wkhtmltopdf Am Donnerstag, 14. Februar 2013 15:45:38 UTC+1 schrieb Jaimin Patel: > > Sure. > > I had tried to render PDF with pisa, > > template