Re: Different model behaviour in template tag and python shell?

2010-04-13 Thread Sven Richter
Haha, just like always, short after mailing it flashed to my mind. I named the class Business the same like the model Business, which of course, clashes with each other. Greetings Sven On Tue, Apr 13, 2010 at 11:09 PM, Sven Richter wrote: > Hi everybody, > > i have some problem i

Different model behaviour in template tag and python shell?

2010-04-13 Thread Sven Richter
Hi everybody, i have some problem i just dont understand. I have a business model (derived from django namespace): class Business(models.Model): business = models.ForeignKey("self", related_name="other_business") name = models.CharField(max_length=50, unique=True) ... objects = Busines

Re: django, reportlab and basedoctemplate | simpledoctemplate

2010-03-30 Thread Sven Richter
styles = getSampleStyleSheet() Document = [Paragraph('rd', styles["Title"])] Document.append(Spacer(1,50)) doc.build(Document) return response Thanks all for the help! Sven On Wed, Mar 31, 2010 at 12:23 AM, Sven Richter wrote: > Hm, what makes me

Re: django, reportlab and basedoctemplate | simpledoctemplate

2010-03-30 Thread Sven Richter
Tue, Mar 30, 2010 at 10:55 PM, Sven Richter wrote: > On Tue, Mar 30, 2010 at 9:08 PM, Paulo Almeida > wrote: >> Ok, that is not easy to debug with so little information. Is the IndexError >> in views.py? Maybe there is a mistake in urls.py, caused by adding the url >> f

Re: django, reportlab and basedoctemplate | simpledoctemplate

2010-03-30 Thread Sven Richter
On Tue, Mar 30, 2010 at 9:08 PM, Paulo Almeida wrote: > Ok, that is not easy to debug with so little information. Is the IndexError > in views.py? Maybe there is a mistake in urls.py, caused by adding the url > for the generate_pdf view? Hm, its indeed hard. I really dont know what that Error wil

Re: django, reportlab and basedoctemplate | simpledoctemplate

2010-03-30 Thread Sven Richter
On Tue, Mar 30, 2010 at 8:21 PM, palmeida wrote: > Is that all your code? I don't see a line like this (from my > generate_pdf function): > > doc = SimpleDocTemplate(response, pagesize=A4) I missed that one out of my example. You're right. But it doesnt generate a pdf like that, it just complains

Re: django, reportlab and basedoctemplate | simpledoctemplate

2010-03-30 Thread Sven Richter
ion for many more elements and options. > These are my reportlab imports: > from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, > TableStyle > from reportlab.platypus import KeepTogether > from reportlab.platypus import Table as Platypus_Table > from reportlab.p

django, reportlab and basedoctemplate | simpledoctemplate

2010-03-30 Thread Sven Richter
Hi everybody, i am looking for a way to get BaseDocTemplate from the reportlab library working, connected with a httpresponse. I found the documentation for a simple reportlab page, using canvas. But to me it seems, that i need more options than basic Canvas offers. Like a page header or footer, t

Re: extend admin interface - chang_list_results.html

2010-03-27 Thread Sven Richter
Thank you very much. Do you know if there is something planned for future releases? Greetings Sven -- 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 gro

Re: extend admin interface - chang_list_results.html

2010-03-26 Thread Sven Richter
e tag in question and giving it a different name. That way you can use it selectively." So, i'm gonna do it myself. Greetings Sven On Fri, Mar 26, 2010 at 7:24 PM, Sven Richter wrote: > Hi, > > i am about to extend the admin interface and came to the following problem. > I w

extend admin interface - chang_list_results.html

2010-03-26 Thread Sven Richter
Hi, i am about to extend the admin interface and came to the following problem. I want to add some information to the overview of an application model. Now, i look in the change_list.html and see that the {% result_list cl %} template tag is the one i need to adapt. Now, when i look in the templ

Re: admin user, groups unregister deleted applications?

2010-03-23 Thread Sven Richter
On Tue, Mar 23, 2010 at 10:10 AM, Grigory Javadyan wrote: > On 03/23/2010 12:53 PM, Sven Richter wrote: >> >> Hi, >> >> i just mentioned that in the admin interface, in the user and groups >> section i still can see all the applications i once installed, bu

admin user, groups unregister deleted applications?

2010-03-23 Thread Sven Richter
Hi, i just mentioned that in the admin interface, in the user and groups section i still can see all the applications i once installed, but that are deleted now from my project. How can i get rid of them? Greetings Sven -- You received this message because you are subscribed to the Google Grou

Re: Permissions for groups and users

2010-03-23 Thread Sven Richter
Hi Tim, On Tue, Mar 23, 2010 at 1:03 AM, Tim Shaffer wrote: > Ah, yes I see the problem. Good catch. I hadn't tested that > functionality. Luckily it is a simple change to admin.py. It's a > matter of removing line 25: > once again, thanks for the good work. Now it works perfectly. You did a grea

Re: Permissions for groups and users

2010-03-22 Thread Sven Richter
Hi Tim, I just tried your app and, wow, this is exactly what i was looking for. It works instantly, but, as always, there must be a but. One thing doesnt work. I did all as you said, and, like i wrote, it worked out of the box, except my ForeignKeys. In my example i have: class Task(NamespacedMod

Permissions for groups and users

2010-03-22 Thread Sven Richter
Hi, this might be offtopic, so i excuse for that in advance, but i dont know a better place to ask for it, cause its not completely offtopic at all. Let's start with what i want to achieve. I am building some sort of a groupware, and i want it to fully support different domains, and with it diffe

Re: convert mysql database to django model

2010-02-27 Thread Sven Richter
Wow, this is cool. Django is so cool! I love it more and more every day! Greetings and thanks Sven On Sat, Feb 27, 2010 at 11:49 AM, rebus_ wrote: > On 27 February 2010 11:46, Sven Richter wrote: >> Hi everybody, >> >> i am wondering if there is a tool which co

convert mysql database to django model

2010-02-27 Thread Sven Richter
Hi everybody, i am wondering if there is a tool which converts existing mysql databases with table structure into a django model? Greetings Sven Richter -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, sen

Re: [solved] admin interface, nginx and fawps

2009-09-15 Thread Sven Richter
I solved the problem myself. I had to set the SESSION_COOKIE_DOMAIN = '.domain.de' and delete the old cookie then everything worked as it should. Greetings Sven On Mon, Sep 14, 2009 at 3:33 PM, Sven Richter wrote: > Hi all, > i am running a django project with fapws ( >

admin interface, nginx and fawps

2009-09-14 Thread Sven Richter
Hi all, i am running a django project with fapws ( http://github.com/william-os4y/fapws3) as server managed through nginx as webserver (nginx just forwards to the running fapws instance). Fapws deploys the django project as wsgi app. Now i have a weird problem, i am using the admin interface very

Re: method import error

2009-09-07 Thread Sven Richter
Indeed, that was the problem. Thank you very much. Greetings Sven On Mon, Sep 7, 2009 at 1:53 PM, Karen Tracey wrote: > On Mon, Sep 7, 2009 at 6:21 AM, Sven Richter wrote: > >> Hi all, >> >> i must have a simple error somewhere in my code, everytime i try to import &

method import error

2009-09-07 Thread Sven Richter
Hi all, i must have a simple error somewhere in my code, everytime i try to import a certain method i get the following error: cannot import name send_entry_created This is my code: entry.models: from entry.signals import send_entry_created ... dispatcher.connect(send_entry_created, signal=signa

cookie handling session management

2009-09-02 Thread Sven Richter
Hi everybody, i've been tinkering around with cookies scinc some days. They work so far for me, but i fear the way that i use them right now is not the django way and it isn't a DRY way. This is how i do it right now, i have some views and everytime the view is called it checks if there is a certa

Re: Many-to-many column admin interface

2009-08-28 Thread Sven Richter
;B') > > when editing either A or B, you could use C as inlines. > > regards, > patrick > > > On 28 Aug., 17:18, Sven Richter wrote: > > But i wonder how this would help me further. > > In the End it doesnt matter for me on which model i define the M2M >

Re: Many-to-many column admin interface

2009-08-28 Thread Sven Richter
that. Any Ideas? Greetings Sven On Fri, Aug 28, 2009 at 3:04 PM, Sven Richter wrote: > I've opened a bug/feature request at: > http://code.djangoproject.com/ticket/11795#comment:2 > if someone is interested. > > > Greetings > Sven > > > On Fri, Aug 28, 2009

Re: Many-to-many column admin interface

2009-08-28 Thread Sven Richter
, Aug 28, 2009 at 5:18 PM, Sven Richter wrote: > But i wonder how this would help me further. > In the End it doesnt matter for me on which model i define the M2M > relation. > But i need to access the M2M Table from both models, at least in the view > or in the template if n

Re: Many-to-many column admin interface

2009-08-28 Thread Sven Richter
I've opened a bug/feature request at: http://code.djangoproject.com/ticket/11795#comment:2 if someone is interested. Greetings Sven On Fri, Aug 28, 2009 at 6:59 AM, Craig McClanahan wrote: > > On Thu, Aug 27, 2009 at 10:00 AM, Sven Richter > wrote: > > I found thi

Re: Many-to-many column admin interface

2009-08-27 Thread Sven Richter
: > > Hi, > > I had the same question some time ago and found no answer, > but maybe you try harder. > > Sven Richter schrieb: > > Hi, > > > > i have a new problem with my many-to-many field. > > > > I have two models A and B. > > A(models.mode

Many-to-many column admin interface

2009-08-27 Thread Sven Richter
Hi, i have a new problem with my many-to-many field. I have two models A and B. A(models.model): b = models.ManyToManyField('app.B') Now when i edit A in the admin interface everything is ok, i can select all B instances A belongs to. What i need now is to be able to do the same thing from B'

Re: Many-to-many column

2009-08-26 Thread Sven Richter
nts = [] > get_all_parents(parents, current) > print parents > > Excuse me if I didn't get it right but it should get you started. > > On Aug 25, 10:11 am, Sven Richter wrote: > > Hi, > > > > i implemented a many-to-many field in my model like: > > cla

Many-to-many column

2009-08-25 Thread Sven Richter
Hi, i implemented a many-to-many field in my model like: class Entries(models.Model): following_to = models.ManyToManyField('self', blank=True, null=True) Now i can get all related Entries in a template with entry.following_to.all. But i want to go deeper in relationships. Lets say i have 4 En

Re: adapt admin interface

2009-08-13 Thread Sven Richter
basically the same as to question one? Greetings Sven On Thu, Aug 13, 2009 at 10:33 AM, Sven Richter wrote: > Hi everybody, > > i have two questions regarding the admin interface. > > 1. Is it possible to make on column be dependent of the choice of another > one? > For examp

adapt admin interface

2009-08-13 Thread Sven Richter
Hi everybody, i have two questions regarding the admin interface. 1. Is it possible to make on column be dependent of the choice of another one? For example, i have to columns in my model: Party and Politician. If i choose a party now i want only the politicians belonging to that party to be show

Re: javascript variable in url resolver template tag

2009-08-10 Thread Sven Richter
Ok, thank you very much, thats how i am gonna do it. I just didnt think about the fact that django is being done on the server side and the script on the client side. Greetings Sven On Sun, Aug 9, 2009 at 8:20 PM, Daniel Roseman wrote: > > On Aug 9, 4:59 pm, Sven Richter wrote: &g

Re: javascript variable in url resolver template tag

2009-08-09 Thread Sven Richter
Ok, i think i understand the problem now. So i have to hardcode the url in my javascript function? That was what i wanted to circumvent. Sven On Sun, Aug 9, 2009 at 5:57 PM, Daniel Roseman wrote: > > On Aug 9, 4:43 pm, Sven Richter wrote: > > Hi all, > > > > i wanted t

Re: javascript variable in url resolver template tag

2009-08-09 Thread Sven Richter
I am looking for a rating function AJAX style. So what i am trying to do is the following: Click on a link wrote: > > On Sun, Aug 9, 2009 at 5:43 PM, Sven Richter > wrote: > > Hi all, > > > > i wanted to know if it is possible to pass a Javascript variable

javascript variable in url resolver template tag

2009-08-09 Thread Sven Richter
Hi all, i wanted to know if it is possible to pass a Javascript variable to the url template tag? Like: ...

Re: slow django builtin webserver

2008-11-16 Thread Sven Richter
Steve Holden wrote: > Sven Richter wrote: > >> Hi all, >> >> i recently reinstalled my workingstation. Nothing wild, just >> changed from single hdd to a raid system. However, scince >> that day my django server has a horrible response on >> the new sy

slow django builtin webserver

2008-11-12 Thread Sven Richter
Hi all, i recently reinstalled my workingstation. Nothing wild, just changed from single hdd to a raid system. However, scince that day my django server has a horrible response on the new system. Loading the server takes up to ca. 5 secs and requesting a site from it the same amount of time. Fir

ImageField upload Media root confusion

2008-10-22 Thread Sven Richter
Hi all, respective to my thread from yesterday: http://groups.google.com/group/django-users/browse_thread/thread/c5816db50ed0ef9/1455790f9220bb30?lnk=gst&q=image+upload#1455790f9220bb30 i got more irritated now and think i found a bug or something like that. If i try to store the uploaded pictur

Re: Image upload Field

2008-10-22 Thread Sven Richter
Nevermind my Mail, right after i sent this message it works. I dont know what went wrong exactly but right now i can see all of a sudden like 10 pictures i was loading up. Greetings Sven Sven Richter wrote: > Hi, > > i have a model which defines a ImageField with > a path which e

Image upload Field

2008-10-22 Thread Sven Richter
Hi, i have a model which defines a ImageField with a path which exists in the media root. Then i created a form which is bound to the Model with Modelform. All the fields in the Form are working as expected despite the Image field. I mean, i can choose an image, but it wont upload to my path, n

Re: resolving urls template error

2008-09-18 Thread Sven Richter
Sven Richter wrote: > Hi, > > i get the following error message: > TemplateSyntaxError at /community/profile/sveris/ > Caught an exception while rendering: Reverse for 'youriq.profile_myiq' with > arguments '('',)' and keyword arguments '{}

resolving urls template error

2008-09-18 Thread Sven Richter
Hi, i get the following error message: TemplateSyntaxError at /community/profile/sveris/ Caught an exception while rendering: Reverse for 'youriq.profile_myiq' with arguments '('',)' and keyword arguments '{}' not found. Original Traceback (most recent call last): File "/usr/lib/python2.5/si

Re: overwrite get_absolute_url /contrib/auth/User

2008-09-16 Thread Sven Richter
On Tue, 2008-09-16 at 15:11 -0300, Eduardo O. Padoan wrote: > On Tue, Sep 16, 2008 at 2:59 PM, Sven Richter <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > i am wondering if the "users" path in get_absolute_url > > from the User class is hardc

overwrite get_absolute_url /contrib/auth/User

2008-09-16 Thread Sven Richter
Hi, i am wondering if the "users" path in get_absolute_url from the User class is hardcoded? I mean this line: return "/users/%s/" % urllib.quote(smart_str(self.username)) I have the problem that all my profiles want to reside under /profile/username and not /users/username. Can i subclass this

Re: Tests catch Errors

2008-09-09 Thread Sven Richter
On Tue, 2008-09-09 at 21:28 +0200, Sven Richter wrote: > On Tue, 2008-09-09 at 20:25 +0200, Sven Richter wrote: > > > i was playing around with unittests and found the > > failUnlessRaises(excClass, callableObj) Method. > > If i understand it right the Method catches

Re: Tests catch Errors

2008-09-09 Thread Sven Richter
On Tue, 2008-09-09 at 20:25 +0200, Sven Richter wrote: > i was playing around with unittests and found the > failUnlessRaises(excClass, callableObj) Method. > If i understand it right the Method catches Exceptions > that are thrown by django. > > I tried to send a post to a

Tests catch Errors

2008-09-09 Thread Sven Richter
Hi, i was playing around with unittests and found the failUnlessRaises(excClass, callableObj) Method. If i understand it right the Method catches Exceptions that are thrown by django. I tried to send a post to a register form with: res = Client().post('/register/', {data}) which works so far. N

Re: error when using User.get_profile()

2008-09-08 Thread Sven Richter
Karen Tracey wrote: > On Mon, Sep 8, 2008 at 6:42 AM, sveri <[EMAIL PROTECTED] > > wrote: > > > Hi, > > i am using Django 1.0 and try to extent the usermodel, which works so > far > for adding new users. > > But when i want to retrieve a user profile