select_related() - suddenly to result

2013-02-01 Thread Szabo, Patrick (LNG-VIE)
Hi, I have the following query: Buch = Buchung.objects.filter(Produkt = int(POSTvalues['Produkt'])) Later I'm using stuff like: Buch.Produkt.Bestell_Nr To speed things up i wan't to use select_related() on the query but no mather where I add it if I add it i get 0 entries as a result

AW: Kindly help for an interview with Google on python django

2013-01-31 Thread Szabo, Patrick (LNG-VIE)
I’d be interessted if they are still using python or if they moved to „go“ entirely. Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von laxmikant ratnaparkhi Gesendet: Donnerstag, 31. Jänner 2013 16:15 An: django-users@googlegroups.com Betreff: Kindly help

AW: Execution time of a long process results in an Internal Server Error 500

2013-01-10 Thread Szabo, Patrick (LNG-VIE)
I’ve had the exact same problem a couple of weeks ago. There is a timout that you can define for apache however it somehow didn’t take when i tried it. You really should consider a background task, as Bill suggested. For me it was a query that took forever. I was able to cut the time in half by

AW: problem with timeout

2012-12-17 Thread Szabo, Patrick (LNG-VIE)
; Tel.: +43 1 53452 1573 Fax.: +43 1 534 52 146 . . . . . . . . . . . . . . . . . . . . . . . . . . Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von Szabo, Patrick (LNG-VIE) Gesendet: Dienstag, 18. Dezember 2012 08:08 An: django-users@googlegroups.com Betre

AW: problem with timeout

2012-12-17 Thread Szabo, Patrick (LNG-VIE)
groups.com Betreff: Re: problem with timeout On Mon, Dec 17, 2012 at 7:34 PM, Szabo, Patrick (LNG-VIE) <patrick.sz...@lexisnexis.at<mailto:patrick.sz...@lexisnexis.at>> wrote: Hi, I have an operation that takes about 10 minutes to befinished. It takes that long because our DB is pre

problem with timeout

2012-12-17 Thread Szabo, Patrick (LNG-VIE)
Hi, I have an operation that takes about 10 minutes to befinished. It takes that long because our DB is pretty big. This produces a timeout. I have tried so set the timeout in apache higher but it seems that apache is not taking this directivejust keeps timing out after 300 seconds. Is

AW: DetailView

2012-11-21 Thread Szabo, Patrick (LNG-VIE)
Hi, Code looks fine to me, maybe you could give us the exact error message ? You could also try request.user.id or something to get the actual pk and not only the user object but that’s just a guess. Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von

AW: Post data Query Dict - Why not a list ?

2012-02-29 Thread Szabo, Patrick (LNG-VIE)
: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von Masklinn Gesendet: Mittwoch, 29. Februar 2012 10:03 An: django-users@googlegroups.com Betreff: Re: Post data Query Dict - Why not a list ? On 2012-02-29, at 09:46 , Szabo, Patrick (LNG-VIE) wrote: > Hi, >

Post data Query Dict - Why not a list ?

2012-02-29 Thread Szabo, Patrick (LNG-VIE)
Hi, If i do for key in request.POST.keys(): print request.POST[key] Over this (which is the result of print request.Post): I get: Monatsreport 42 Should I not get lists ? i.e: [Monatsreport] [2,29,42] I need those other information from

AW: custom tag not working

2012-02-28 Thread Szabo, Patrick (LNG-VIE)
Nevermind...i loaded the filter.py in the wrong template -.- Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von Szabo, Patrick (LNG-VIE) Gesendet: Dienstag, 28. Februar 2012 13:15 An: django-users@googlegroups.com Betreff: custom tag not working Hi

custom tag not working

2012-02-28 Thread Szabo, Patrick (LNG-VIE)
Hi, I want to perform a substring on certain texts in my template (I can't substring beforelong story -.-). I already have custom tags working so I really don't know why this one isn't. In the files where I have the other tags as well I did this: @register.filter(name ="cutnr")

AW: Need "edit" and "delete" buttons on each line of a rendered table

2012-01-16 Thread Szabo, Patrick (LNG-VIE)
Hi, I'm doing the exact same thing. What i do is i add the id of the object of a row to the url that the button is linking to. Then I use urls.py and views.py to identify that id and delete or add the object. cheers . . . . . . . . . . . . . . . . . . . . . . . . . . Ing. Patrick Szabo

AW: help optimizing a snippet

2011-12-06 Thread Szabo, Patrick (LNG-VIE)
a snippet Hi, Maybe I can't understand you, but try with u = User.objects.filter(groups__name__in = gruppe).exclude(groups__name__in='Timesheet-Boss','TimeSheet-Manager','Projektleiter','Normal-User','Manager']).values_list('id', 'username') 2011/12/6 Szabo, Patrick (LNG-VIE

help optimizing a snippet

2011-12-06 Thread Szabo, Patrick (LNG-VIE)
Hi, I'v got this piece of code: def get_my_choices(gruppe): users = User.objects.all() choices_list = () for user in users: try: for groupe in gruppe: for groupe2 in user.groups.all(): if groupe2 == groupe and

AW: AW: Performance

2011-12-05 Thread Szabo, Patrick (LNG-VIE)
Okay it seems that specifying which Foreign-Keys it should follow solves the problem. Is this a known issue and can I be sure that this won't cause any further trouble !? Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von Szabo, Patrick (LNG-VIE

AW: AW: Performance

2011-12-05 Thread Szabo, Patrick (LNG-VIE)
e some examples? _NIk On Dec 5, 2011, at 3:18 AM, Szabo, Patrick (LNG-VIE) wrote: Okay that toolbar is really useful and also looks kind of nice J...Thanks for that. I've already found the problemsomehow my app triggers 800 queries just for a simple page. Can I somehow find out whic

AW: AW: Performance

2011-12-05 Thread Szabo, Patrick (LNG-VIE)
to query, and allow you to see the stack trace for the code that caused the query to be executed. Hope that helps, Tim. > On Dec 5, 2011, at 3:18 AM, Szabo, Patrick (LNG-VIE) wrote: > >> Okay that toolbar is really useful and also looks kind of nice J...Thanks >> for that. >

AW: Performance

2011-12-05 Thread Szabo, Patrick (LNG-VIE)
(assuming you're using Django via WSGI): http://repoze.org/ Others here may have more experience with profiling web apps. _Nik On Dec 4, 2011, at 10:55 PM, Szabo, Patrick (LNG-VIE) wrote: Hi, In the last couple of weeks my app has become quite slowly and I'm wondering why

AW: Performance

2011-12-05 Thread Szabo, Patrick (LNG-VIE)
profiler. Here's one project that facilitates profiling a WSGI app (assuming you're using Django via WSGI): http://repoze.org/ Others here may have more experience with profiling web apps. _Nik On Dec 4, 2011, at 10:55 PM, Szabo, Patrick (LNG-VIE) wrote: Hi, In the last couple

Performance

2011-12-04 Thread Szabo, Patrick (LNG-VIE)
Hi, In the last couple of weeks my app has become quite slowly and I'm wondering why that is. Are there any debugging tools where I can see what takes how much time ? cheers . . . . . . . . . . . . . . . . . . . . . . . . . . Ing. Patrick Szabo XSLT Developer LexisNexis Marxergasse

AW: controlling user access

2011-11-17 Thread Szabo, Patrick (LNG-VIE)
To Clarify...you dont really need to make diffrent authentifications you just have to make a clever query ;-)= Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von Szabo, Patrick (LNG-VIE) Gesendet: Donnerstag, 17. November 2011 09:41 An: django-users

AW: controlling user access

2011-11-17 Thread Szabo, Patrick (LNG-VIE)
Hi, Well if i understand you correctly it doesnt sound so hard. Every user can have one or more businesses and every artikel can have on business. So you just query for all articles where the business matches one of the businesses the user belongs to. Hope that helps Patrick

weird behavoir of Excel

2011-10-06 Thread Szabo, Patrick (LNG-VIE)
Hi, I'm creating an EXCEL-Sheet out of Django with the following code: response = render_to_response('reportsexcel.html', {'produkte': dict(buch_pool), 'gesamt_string':gesamt_string} ,context_instance=RequestContext(request)) filename = "report.xls" response['Content-Disposition'] =

AW: New user login problem

2011-09-16 Thread Szabo, Patrick (LNG-VIE)
Are you sure you've used the right credentials ?! Can you log as the admin ?! If so try to create another user and log in as such. . . . . . . . . . . . . . . . . . . . . . . . . . . Ing. Patrick Szabo XSLT Developer LexisNexis Marxergasse 25, 1030 Wien mailto:patrick.sz...@lexisnexis.at

AW: How To send arguments Along with Calling an .Html page

2011-09-01 Thread Szabo, Patrick (LNG-VIE)
I'm unsure in which direction you want to go so I'm just wrinting for both: Fom view to template: I think there are several ways but this is the one I'm using: return render_to_response('index.html', {'user' : request.user, 'form' : f,

AW: custom templatetag that checks groups

2011-09-01 Thread Szabo, Patrick (LNG-VIE)
Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von Szabo, Patrick (LNG-VIE) Gesendet: Donnerstag, 01. September 2011 11:39 An: django-users@googlegroups.com Betreff: custom templatetag that checks groups Hi, I want to create my own templatetag that re

custom templatetag that checks groups

2011-09-01 Thread Szabo, Patrick (LNG-VIE)
Hi, I want to create my own templatetag that returns true if a user is member of a certain group. I did the following: Created a package "templatetags" in my app. Wrote a module: from django import template register = template.Library() def check(user): if

AW: __init__() got an unexpected keyword argument 'city'

2011-07-25 Thread Szabo, Patrick (LNG-VIE)
Glad it works now :-) . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT Developer LexisNexis Marxergasse 25, 1030 Wien mailto:patrick.sz...@lexisnexis.at Tel.: 00431 534521573 Fax: +43 (1) 534 52 - 146 -Ursprüngliche Nachricht- Von:

AW: __init__() got an unexpected keyword argument 'city'

2011-07-25 Thread Szabo, Patrick (LNG-VIE)
I guess you question is how you tell the view to use your template right ?! Im not a pro myself but here is how i understand it: You need to return a rendered response in your view. Now you can directly refer to your template like this: return direct_to_template(request,'xxx.html') or if you

AW: __init__() got an unexpected keyword argument 'city'

2011-07-25 Thread Szabo, Patrick (LNG-VIE)
Plz post the code of your model, form and view so we can take a look at it. . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT Developer LexisNexis Marxergasse 25, 1030 Wien mailto:patrick.sz...@lexisnexis.at Tel.: 00431 534521573 Fax: +43 (1) 534 52 - 146

AW: __init__() got an unexpected keyword argument 'city'

2011-07-25 Thread Szabo, Patrick (LNG-VIE)
I think you should complete the tutorial here: https://docs.djangoproject.com/en/1.3/intro/tutorial01/ It gives you a good overview of what django does and how. A big part of what youre trying to accomplish is already covered in this tutorial so it might be all you need :-) . . . . . . . . .

AW: __init__() got an unexpected keyword argument 'city'

2011-07-25 Thread Szabo, Patrick (LNG-VIE)
Hi, So you want a form to store a news student in your DB right ?! If that's correct you also have a Model for the Student so you could simply use a ModelForm instead of a Form. Example: class Buchung(models.Model): Mitarbeiter = models.IntegerField(max_length=3) Produkt =

AW: unable to show headline

2011-07-18 Thread Szabo, Patrick (LNG-VIE)
Take a look at the sourcecode of the html. Maybe it's there but has a weird style or if it's not there at all you might want to show us what's actually in "My_Model_Name.Attribute1" Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von bahare hoseini

AW: Delete a record

2011-07-18 Thread Szabo, Patrick (LNG-VIE)
Do you mean actually deleting an entry in the db https://docs.djangoproject.com/en/dev/topics/db/queries/#topics-db-queri es-delete or removing (not showing) it from the form that is shown in html: https://docs.djangoproject.com/en/dev/topics/forms/modelforms/#using-a-s

AW: AW: admin_media_prefix in page source is wrong

2011-07-18 Thread Szabo, Patrick (LNG-VIE)
Maybe I'm still not getting it but I think what you want to set is admin_media_url instead of admin_media_prefix. . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT Developer LexisNexis Marxergasse 25, 1030 Wien mailto:patrick.sz...@lexisnexis.at Tel.: 00431 534521573

AW: creating a simple mailbox

2011-07-15 Thread Szabo, Patrick (LNG-VIE)
Maybe one of those is something for you http://djangopackages.com/grids/g/email/ . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT Developer LexisNexis Marxergasse 25, 1030 Wien mailto:patrick.sz...@lexisnexis.at Tel.: 00431 534521573 Fax: +43 (1) 534 52 - 146

AW: Django: forms and custom templates

2011-07-15 Thread Szabo, Patrick (LNG-VIE)
I'm not sure if i understood your problem a 100 percent so i'll just write what i think you want ^^ >From what i understand i think you can use the code that has already been >written. Of course you might want to edit it a little bit for it to comply >with the other templates. If you want to

AW: admin_media_prefix in page source is wrong

2011-07-15 Thread Szabo, Patrick (LNG-VIE)
I'm sorry maybe this is a dumb question but what do you mean when you say " Inside static-folder I made a link to ../../lib/python2.7/site-packages/django/contrib/admin/static/admin for the admin-media files." ?! . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT

AW: Managing objects spred among several tables/databases.

2011-07-14 Thread Szabo, Patrick (LNG-VIE)
Hi, Are those tables somehow related to each other per FK ?! In that case i think you might be able to use a model form for that purpose. I'm not really good with django myself so i might be talking bs. . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT Developer

AW: Trouble overriding registration templates

2011-07-13 Thread Szabo, Patrick (LNG-VIE)
Did you write your own view for that purpose ?! In that view you could use render_to_response and pass you own template to that. Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von Joshua Russo Gesendet: Mittwoch, 13. Juli 2011 04:24 An:

AW: change values in "select list"

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
d two together. Consider it homework =) > > > Cheers, > André Terra > > On 7/4/11, Szabo, Patrick (LNG-VIE) <patrick.sz...@lexisnexis.at> wrote: >> Okay i think i'm close but i can't figure it out. >> I did this: >> >> class ReportingForm_ProduktField(Mode

AW: change values in "select list"

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
) Cheers, André Terra On 7/4/11, Szabo, Patrick (LNG-VIE) <patrick.sz...@lexisnexis.at> wrote: > Okay i think i'm close but i can't figure it out. > I did this: > > class ReportingForm_ProduktField(ModelChoiceField): > def label_from_instance(self, obj): >

AW: change values in "select list"

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
4 52 - 146 -Ursprüngliche Nachricht- Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von Tom Evans Gesendet: Montag, 04. Juli 2011 13:10 An: django-users@googlegroups.com Betreff: Re: change values in "select list" On Mon, Jul 4, 2011 at 11:4

AW: change values in "select list"

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
ers@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von Tom Evans Gesendet: Montag, 04. Juli 2011 13:10 An: django-users@googlegroups.com Betreff: Re: change values in "select list" On Mon, Jul 4, 2011 at 11:46 AM, Szabo, Patrick (LNG-VIE) <patrick.sz...@lexisnexis.a

AW: change values in "select list"

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
in "select list" On Mon, Jul 4, 2011 at 11:34 AM, Szabo, Patrick (LNG-VIE) <patrick.sz...@lexisnexis.at> wrote: > Okay my Model now looks like this: > > ... > > but that didn't really change anything :-( > That is because you didn't read the documentation I linked y

AW: change values in "select list"

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
ps.com Betreff: Re: change values in "select list" On Mon, Jul 4, 2011 at 11:12 AM, Szabo, Patrick (LNG-VIE) <patrick.sz...@lexisnexis.at> wrote: > Hi, > > > > I have a forum that looks like this: > > > > class ReportingForm_Produkt(ModelForm): > >

change values in "select list"

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
Hi, I have a forum that looks like this: class ReportingForm_Produkt(ModelForm): class Meta: model = Buchung Where Buchung and Produkt looks like this: class Buchung(models.Model): Mitarbeiter = models.IntegerField(max_length=3) Produkt =

AW: unique_together doesn't work

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
:53 An: django-users@googlegroups.com Betreff: Re: unique_together doesn't work On Mon, Jul 4, 2011 at 10:43 AM, Szabo, Patrick (LNG-VIE) <patrick.sz...@lexisnexis.at> wrote: > Hi, > > Sry, i was a little bit unclear. > Of course i tried to store identical entries (all fie

AW: AW: unique_together doesn't work

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
: Re: AW: unique_together doesn't work On Mon, 2011-07-04 at 11:43 +0200, Szabo, Patrick (LNG-VIE) wrote: > Sry, i was a little bit unclear. > Of course i tried to store identical entries (all fields have the same > values) and i had no problem doing so. Since most of the files i want &

AW: unique_together doesn't work

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
-Ursprüngliche Nachricht- Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von Kenneth Gonsalves Gesendet: Montag, 04. Juli 2011 11:40 An: django-users@googlegroups.com Betreff: Re: unique_together doesn't work On Mon, 2011-07-04 at 11:33 +0200, Szabo, Patrick

AW: unique_together doesn't work

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
. Juli 2011 11:38 An: django-users@googlegroups.com Betreff: Re: unique_together doesn't work On Mon, Jul 4, 2011 at 10:33 AM, Szabo, Patrick (LNG-VIE) <patrick.sz...@lexisnexis.at> wrote: > Hi, > ... > class Meta: > unique_together = ("Kategorie",

unique_together doesn't work

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
Hi, I have the following model: class Produkte(models.Model): Kategorie = models.ForeignKey(Kategorien) Titel = models.CharField(max_length=100) Auflage = models.IntegerField(max_length=2, blank=True) Bestell_Nr = models.CharField(max_length=30, blank=True) ISBN

AW: Advice needed: more advanced user capability

2011-05-20 Thread Szabo, Patrick (LNG-VIE)
Maybe you should take look at this: https://django-userena.org/ The role- and profile- thing could be realized via the normal groups in django. pat . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT Developer LexisNexis Marxergasse 25, 1030 Wien

AW: unpredictable CSRF error on mobile devices

2011-05-10 Thread Szabo, Patrick (LNG-VIE)
Maybe they should try to log in simulatneously with the same user while one uses his iPhone and the other one a PC. If the error still occurs you know it's not about the devices but about using the same user or same wifi-network. cheers . . . . . . . . . . . . . . . . . . . . . . . . . .

AW: outer joins, raw sql or one-to-many?

2011-05-10 Thread Szabo, Patrick (LNG-VIE)
think I mixed up the tables before: submitter = models.ForeignKey(Author, db_column='SubmitterID') vs submitter = models.ForeignKey(Author, db_column='authorid') the latter doesn't work obviously.. Thanks all, I think this will help me on my way! On May 10, 9:38 am, "Szabo, Patrick

AW: outer joins, raw sql or one-to-many?

2011-05-10 Thread Szabo, Patrick (LNG-VIE)
The lather should work... . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT Developer LexisNexis Marxergasse 25, 1030 Wien mailto:patrick.sz...@lexisnexis.at Tel.: +43 (1) 534 52 - 1573 Fax: +43 (1) 534 52 - 146 -Ursprüngliche Nachricht- Von:

AW: Problem in Configuring the database

2011-05-06 Thread Szabo, Patrick (LNG-VIE)
Hi, Well, are u using a MySQL database or sqilite ?! Of course that's what it depends on wether to use mysql oder sqlite driver. Mabe you could give us a little more information about your DB cheers . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT Developer LexisNexis

AW: problems: python manage.py syncdb

2011-04-22 Thread Szabo, Patrick (LNG-VIE)
Try to connect to the DB with a „real“ client and see i fit works at all. The webserver (manage.py runserver) does not need to be running when you call syncdb. Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von ??? Gesendet: Freitag, 22. April 2011

AW: filtering drop downs according to logged in user

2011-04-22 Thread Szabo, Patrick (LNG-VIE)
-users@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von Szabo, Patrick (LNG-VIE) Gesendet: Freitag, 22. April 2011 09:10 An: django-users@googlegroups.com Betreff: AW: filtering drop downs according to logged in user Hi, I like that idea. I have a problem with implementing

AW: filtering drop downs according to logged in user

2011-04-22 Thread Szabo, Patrick (LNG-VIE)
'].choices = choices Works in a similar fashion with a ModelChoiceField and the queryset attribute. On Apr 21, 10:10 am, "Szabo, Patrick \(LNG-VIE\)" <patrick.sz...@lexisnexis.at> wrote: > Hi, > > I want to filter the dropdownlists that are automatically used to select &g

AW: filtering drop downs according to logged in user

2011-04-22 Thread Szabo, Patrick (LNG-VIE)
but, what exactly does an "XSLT Developer" do? On Thu, Apr 21, 2011 at 3:10 PM, Szabo, Patrick (LNG-VIE) <patrick.sz...@lexisnexis.at> wrote: Hi, I want to filter the dropdownlists that are automatically used to select a foreign-key in forms (in my views). Normally that could

filtering drop downs according to logged in user

2011-04-21 Thread Szabo, Patrick (LNG-VIE)
Hi, I want to filter the dropdownlists that are automatically used to select a foreign-key in forms (in my views). Normally that could easily be done with "class Meta" in the Modelform. Thing is i want to filter by an attribute of the current userspecificly the groups that the user is

AW: queries gone wild

2011-04-20 Thread Szabo, Patrick (LNG-VIE)
and as dates in mysql. Try this queryset: Duchung.objeccts.filter(Mitarbeiter=request.user.id, Datum__year=str(tag).split('-')[0]) On Wed, Apr 20, 2011 at 11:51 AM, Szabo, Patrick (LNG-VIE) <patrick.sz...@lexisnexis.at> wrote: For developement i've used sqlite and now i want to tr

queries gone wild

2011-04-20 Thread Szabo, Patrick (LNG-VIE)
Hi, For developement i've used sqlite and now i want to transfer to mysql. The transfer itself worked fine but now a couple of queries don't work anymore. Example: Buchung.objects.filter(Mitarbeiter = request.user.id, Datum__startswith=str(tag).split('-')[0]) "tag" looks like

LDAP and 1.2

2011-04-05 Thread Szabo, Patrick (LNG-VIE)
Hi, has anyone sucessfully conncted their django 1.2 app with Active Directory ?! Which snippet did you use ?! I'm concastantly getting "Invalid credentials" Error -.- Kind regards . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT Developer LexisNexis

AW: form has not attribute cleaned_data

2011-03-28 Thread Szabo, Patrick (LNG-VIE)
Strange. I'm new to python and django myself but im wondering how form.is_valid() works when form is only initiated a line later. Doesnt it have to look like this: if request.user.is_superuser: if request.method == 'POST': form = Form_news(request.POST) if

AW: MEDIA_URL not treated like static

2011-03-28 Thread Szabo, Patrick (LNG-VIE)
I have a static folder in my Prject and my MEDIA_URL looks like this: http://127.0.0.1:8000/static/ Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von galgal Gesendet: Montag, 28. März 2011 13:38 An: django-users@googlegroups.com Betreff: MEDIA_URL not

AW: acces lists by index

2011-03-10 Thread Szabo, Patrick (LNG-VIE)
Nevermind: This did it: {% for x in akt %} {% if forloop.last %} {{ x }} {% endif %} {% endfor %} Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von Szabo, Patrick (LNG-VIE) Gesendet: Donnerstag, 10

acces lists by index

2011-03-10 Thread Szabo, Patrick (LNG-VIE)
Hi, I'm trying to acces the last index of a list in my template but list[-1] throws the following error: Could not parse the remainder: '[-1]' from 'list[-1]' How can i do it right !? Kind regards . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT

AW: acces to dict

2011-03-10 Thread Szabo, Patrick (LNG-VIE)
a defaultdict get key call is creating a new entry with key "items" and empty list as value. Try passing dict(prod_pool) to your template. Regards, Matías Excerpts from Szabo, Patrick \(LNG-VIE\)'s message of Thu Mar 10 11:28:00 -0200 2011: > Hi, > > > > I'

acces to dict

2011-03-10 Thread Szabo, Patrick (LNG-VIE)
Hi, I'm passing a dict of lists on to a template like this: return render_to_response('reports.html', {'produkte': prod_pool} ,context_instance=RequestContext(request)) prod_pool looks like this: defaultdict(, {'Dumme G\xc3\xa4nge revisited': ['Absatzkontrolle'], 'Das Sparschwein

redirect and still pass dict

2011-03-09 Thread Szabo, Patrick (LNG-VIE)
Hi, I want to redirect to a certains url, but still pass a dict like in render_to_response...is that possible ?! Kind regards . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT Developer LexisNexis Marxergasse 25, 1030 Wien mailto:patrick.sz...@lexisnexis.at Tel.:

AW: automated query if already exists

2011-03-09 Thread Szabo, Patrick (LNG-VIE)
://docs.djangoproject.com/en/dev/topics/db/queries/#retrieving-a-single-object-with-get Hope this helps, Casey On 03/09/2011 08:03 AM, Szabo, Patrick (LNG-VIE) wrote: > Hi, > > Since django is able to do so much so easy i was wandering if there was > some kind of possibility to check

automated query if already exists

2011-03-09 Thread Szabo, Patrick (LNG-VIE)
Hi, Since django is able to do so much so easy i was wandering if there was some kind of possibility to check if an entry with the same values already exists. I've tried unique_together but this only does the job on the database end and if i want to store an not unique object i get an

dependend fields

2011-03-08 Thread Szabo, Patrick (LNG-VIE)
Hi, I want to make the choices of a dropdown menu dependend on what is chosen from another field. One field is a normal Textfield and the other one is created by the model. What is the best and easiest way of doing that ?! Kind regards . . . . . . . . . . . . . . . . . . . . .

AW: AW: parameter, but not in the URL

2011-03-04 Thread Szabo, Patrick (LNG-VIE)
@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von Shamail Tayyab Gesendet: Freitag, 04. März 2011 11:59 An: django-users@googlegroups.com Betreff: Re: AW: parameter, but not in the URL On 04/03/11 4:08 PM, Eric Abrahamsen wrote: > On Fri, Mar 04 2011, Szabo, Patrick (LNG-

AW: parameter, but not in the URL

2011-03-04 Thread Szabo, Patrick (LNG-VIE)
:46 An: django-users@googlegroups.com Betreff: Re: parameter, but not in the URL On Fri, Mar 04 2011, Szabo, Patrick (LNG-VIE) wrote: > 127.0.0.1:800/93/1 > > > > This would delete an object with the id 93. > > This is very unsecure and once the user notices how this works

parameter, but not in the URL

2011-03-04 Thread Szabo, Patrick (LNG-VIE)
Hi, Currently i pass all my parameterst hat a views needs over the URL. Eg. 127.0.0.1:800/93/1 This would delete an object with the id 93. This is very unsecure and once the user notices how this works he could delete any object he wants. How can i make this more secure ?!

JavaScript Parameter

2011-03-03 Thread Szabo, Patrick (LNG-VIE)
Hi, I finally found a JavaScript that gives me autosuggest functionality for a textfield. Unfortunately this script uses a hard-coded array for the suggestions and of courese i want to use values from my database. Any idea how i could pass the javascript an array that contains all my values ?!

AW: UnicodeDecodeError: 'ASCII' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

2011-03-03 Thread Szabo, Patrick (LNG-VIE)
If you want to see errors in the browser you might want to set "DEBUG = True" in your settings.py Kind regards . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT Developer LexisNexis Marxergasse 25, 1030 Wien mailto:patrick.sz...@lexisnexis.at Tel.: +43 (1) 534 52 - 1573

AW: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

2011-03-02 Thread Szabo, Patrick (LNG-VIE)
Good morning ! Unfortunately i cant help you with your problem because i have the same problem here ;) I can however answer youre question if this is a common problem for django beginners. I don't think it's common for django beginners, i'd rather say it's common for python beginners - like me

django and mod_wsgi

2011-02-28 Thread Szabo, Patrick (LNG-VIE)
I'm trying to get my django-app running on apache 2.2 on windows XP. I've installed everything and the Hello Worlf wsgi ran fine. Now i wanted to run my django ap and did the following in a django.wsgi : import os import sys path = 'C:\\Programme\\Apache Software

autocomplete omg

2011-02-28 Thread Szabo, Patrick (LNG-VIE)
Hi, I'm using the latest version of Django with sqlite and want to implement autocomplete for one of my fields. I've tried 4 diffrent tutorials an non oft them works. Has anyone got a full tutorial for me that definetely works with the current version ?! Maybe one youre using

AW: combobox

2011-02-27 Thread Szabo, Patrick (LNG-VIE)
@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von Marc DM Gesendet: Freitag, 25. Februar 2011 19:36 An: Django users Betreff: Re: combobox On Feb 25, 11:18 am, "Szabo, Patrick \(LNG-VIE\)" <patrick.sz...@lexisnexis.at> wrote: > Hi, > > I was tryi

combobox

2011-02-25 Thread Szabo, Patrick (LNG-VIE)
Hi, I was trying to get "An AJAX Select Widget for Django" (http://code.djangoproject.com/wiki/AJAXWidgetComboBox ) running but i found out that it doesn't work with newer versions of django (correct me if I'm wrong.) Is there an alternative or a way to make it work with the newest version

custom formfield submit

2011-02-23 Thread Szabo, Patrick (LNG-VIE)
Hi, I have a form that - of course - creates new entry in my database. I created the form out of a model except for 1 field. Now if i click submit only the values of the fields that are created out of the form are stored in the DB - also not suprising What i want to to is take the

Datefield

2011-02-16 Thread Szabo, Patrick (LNG-VIE)
Hi, I built my own view where users can add new DB-entries. I have a DateField and generated the Form for it directly from the model but i don't see this calender-icon like i do in the admin panel. How can I add it ?! Is it enough to just reference to the .js in the template !?

'str' object is not callable

2011-02-16 Thread Szabo, Patrick (LNG-VIE)
Hi, Im getting 'str' object is not callable and i have no idea why. What I'm doing is the following: delete buchung is a list and the 6th element oft hat list is an object with an attribute id. In my urls.py i did this: (r'deletion_time/(?P\d+)/$', 'deletion_time'), And the view looks like

AW: list to template

2011-02-15 Thread Szabo, Patrick (LNG-VIE)
, Feb 15, 2011 at 2:36 PM, Szabo, Patrick (LNG-VIE) <patrick.sz...@lexisnexis.at> wrote: > According to youre link my synthax was correct: > >* Dictionary lookup. Example: foo["bar"] >* Attribute lookup. Example: foo.bar >* Method call. Example: foo.bar() &g

AW: list to template

2011-02-15 Thread Szabo, Patrick (LNG-VIE)
Tom Evans Gesendet: Dienstag, 15. Februar 2011 15:24 An: django-users@googlegroups.com Betreff: Re: list to template On Tue, Feb 15, 2011 at 2:09 PM, Szabo, Patrick (LNG-VIE) <patrick.sz...@lexisnexis.at> wrote: > Hi, > > Now when i try to acces that lists with > > {{

list to template

2011-02-15 Thread Szabo, Patrick (LNG-VIE)
Sry a part of my code was wrong i use {%for buchung in result %} {{ buchung[0][0] }} {%endfor%} To acces the list... Von: Szabo, Patrick (LNG-VIE) Gesendet: Dienstag, 15. Februar 2011 15:09 An: 'django-users@googlegroups.com' Betreff: list to template Hi

list to template

2011-02-15 Thread Szabo, Patrick (LNG-VIE)
Hi, What i want to do is show all DB-entries of a certain user. These entries include foreign keys and i need to get the related objects too and print them in a template So what i do is this: First i get all the objects that i need. buchungen = Buchung.objects.filter(Mitarbeiter

AW: AW: images

2011-02-15 Thread Szabo, Patrick (LNG-VIE)
Now it works...Thanks a lot everybody ! . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT-Entwickler LexisNexis Marxergasse 25, 1030 Wien mailto:patrick.sz...@lexisnexis.at Tel.: +43 (1) 534 52 - 1573 Fax: +43 (1) 534 52 - 146 -- You received this message because

AW: images

2011-02-15 Thread Szabo, Patrick (LNG-VIE)
-Ursprüngliche Nachricht- Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von Kenneth Gonsalves Gesendet: Dienstag, 15. Februar 2011 11:05 An: django-users@googlegroups.com Betreff: Re: images On Tue, 2011-02-15 at 11:00 +0100, Szabo, Patrick (LNG-VIE

images

2011-02-15 Thread Szabo, Patrick (LNG-VIE)
Hi, I just want an image to be shown in my header so i just added it in my template like this: Unfortunately i only get the "alt text" shown and not the image. The image is in the same directory as the template. Why doesn't this work ?! Kind regards . . . . . . . . . . . . . . . . . . . .

AW: Having trouble synchronizing the database, can someone help?

2011-02-15 Thread Szabo, Patrick (LNG-VIE)
commands (ex: sqlclear ) that allows me to only remove the tables in particular app?? Thanks On Mon, Feb 14, 2011 at 11:51 PM, Szabo, Patrick (LNG-VIE) <patrick.sz...@lexisnexis.at> wrote: I think sqlflush just prints the SQL-Statement. Flush will actually du the job Hope that

AW: Having trouble synchronizing the database, can someone help?

2011-02-14 Thread Szabo, Patrick (LNG-VIE)
I think sqlflush just prints the SQL-Statement. Flush will actually du the job Hope that helps ! Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von Chen Xu Gesendet: Dienstag, 15. Februar 2011 08:45 An: django-users@googlegroups.com Betreff: Re:

AW: AW: Form to add data

2011-02-14 Thread Szabo, Patrick (LNG-VIE)
okay your first linked helped me...thank you ! I guess the documentaion is just too fragmented for me. So now my view looks like this: def main(request): f = BuchungForm(request.POST) return render_to_response('main/index.html', {'user' : request.user, 'form' : f}) and my template

AW: AW: Form to add data

2011-02-14 Thread Szabo, Patrick (LNG-VIE)
Ahh stupid mistake...okay no error anymore. But i still dont see any field in my view :-( How do show the form ?! I guess i have to pass the form onto the template and then reference to it in the template ?! If so, how do I do that ?! I swear I'm reading the documentaion but i really can't

AW: Form to add data

2011-02-14 Thread Szabo, Patrick (LNG-VIE)
Re: Form to add data On Monday, February 14, 2011 12:42:48 PM UTC, Szabo, Patrick (LNG-VIE) wrote: Hi, How do i add a form to a template/view that let's me add a Databaseentry. I also want to list all the entries from a certain table in on the same site. Now I'm reading the documentaion and it s

  1   2   >