Re: compiler
I have tryed your input, but i have always the same problem... i cant fix it. it doesent work and i dont know why. (i have it in pycharm and there are only these 2 return problems marked.) Am Freitag, 2. November 2012 18:44:46 UTC+1 schrieb ke1g: > Surely the error message included a line number? > > Also, probably not related, but check that there is no whitespace after > your line ending back-slashes. (Hint it is safer to put the opening triple > quote before the backslash, and safer yet to put the triple quoted string > in a pare of parentheses, the opening one where you have the backslash.) > > On Wed, Oct 31, 2012 at 3:28 AM, Markus Christen > <markusch...@gmail.com > > wrote: > >> Good Morning >> I have downloaded files, that can helps by my mssql-odbc connection. This >> is my downloaded file: >> >> http://code.google.com/p/django-pyodbc/source/browse/trunk/sql_server/pyodbc/compiler.py?r=190 >> >> On lines 188 and 273, i become the message "'return' outside of >> function". It's not a space/tab fail, i have checked this. >> How can i fix this? >> >> -- >> 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/-/uvBBHw13tokJ. >> To post to this group, send email to django...@googlegroups.com >> . >> To unsubscribe from this group, send email to >> django-users...@googlegroups.com . >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> > > -- 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/-/DMb-vkIM5xsJ. 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 options, visit this group at http://groups.google.com/group/django-users?hl=en.
compiler
Good Morning I have downloaded files, that can helps by my mssql-odbc connection. This is my downloaded file: http://code.google.com/p/django-pyodbc/source/browse/trunk/sql_server/pyodbc/compiler.py?r=190 On lines 188 and 273, i become the message "'return' outside of function". It's not a space/tab fail, i have checked this. How can i fix this? -- 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/-/uvBBHw13tokJ. 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 options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Database setup
> > What i know now: > > -- > > DATABASES = { > 'default': { > 'ENGINE': 'django.db.backends.mysql', > 'NAME': 'baan5c', > 'USER': '***', > 'PASSWORD': '*', > 'HOST': 'MAURITIUS', > 'PORT': '1433', > } > } > -- > > This will works, if my DB is a mysql. But I use MsSql. > The pyodbc is installed and i made connects over it, to the DB. But for > settings.py, i cant find the base.py of this pyodbc. > Any idea where i can find it? > -- 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/-/-SD8TV-mOV4J. 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 options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Database setup
EDIT: I have a second to implements. Its a Lotus Notes DB, and for the userauth there is a file on my computer. I tryed it with the odbc of IBM: --- import pyodbc conn = pyodbc.connect('DRIVER={Lotus Notes SQL Driver (*.nsf)};SERVER=Wind/Sefar;DATABASE=Kopie_SCHSales.nsf;UID=***/M/CHTHA/Sefar;PWD=*'); --- I can connect, but i cant read out data, thats my i try with this Admin Site. Do someone know how to implements? I know how to make Multiple DB's... -- 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/-/uyf5Zc1AhB8J. 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 options, visit this group at http://groups.google.com/group/django-users?hl=en.
Database setup
Good Morning First i made an odbc connect liek this: - import pyodbc cnxn = pyodbc.connect('DRIVER={SQL Server};SERVER=MAURITIUS;DATABASE=baan5c;UID=***;PWD=*') cursor = cnxn.cursor() cursor.execute("SELECT x.t_name, y.t_mail FROM tttaad20 as x, tttcmf20 as y WHERE (x.t_name = y.t_name) AND (x.t_user = 'muster')") row = cursor.fetchall() if row: print row This gave me out the correct data (name + e-mail) from a user. I tryed now to use this database in the Admin site, but i'm to stupid to implements this correct into the Database Setup. The server is not on my computer, it is in the same LAN Can someone help me please? -- 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/-/a8cnBtTu1RYJ. 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 options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: implement of view
> > How can i create 2 views on one page? >> def sql(request): and def portal(request): >> > -- 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/-/xneUlf_fSGAJ. 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 options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: implement of view
Hmm ok, i can use return render_to_response("sql.html", { 'row': row }) and when i call now http://127.0.0.1:8000/sql/, i can see the correct data. But i will call http://127.0.0.1:8000/portal/ and try to implements the sql code in this page. I have by base.html in addition now " {% include "sql.html" %} ", the sql looks like: sql.html--- {% block content %}Kundendaten {{ row }}.{% endblock %} -- my output by portal call is: - PortalAusgabe Kundendaten Zeit der Aktualisierung Oct. 25, 2012, 8:16 a.m.. Kundendaten . -- Danke fuer die Benutzung meiner Seite. - the data output is not there, but it must look like: Kundendaten [('Niederer Hansruedi (THA) ', 'hansruedi.bl...@blobb.ch ')]. i hope my problem is now better descibed... maybe i find a way, but i hope for input. :) -- 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/-/_bOenlD205AJ. 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 options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: implement of view
Ok, when i use now http://127.0.0.1:8000/sql/, the output is Kundendaten [('bla Hansruedi (THA) ', 'hansruedi@blubb.ch ')]. i have in base.html now " {% include "sql.html" %}" in addition. when i use now http://127.0.0.1:8000/portal/, my output is just: Kundendaten . how can i fix this problem? -- 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/-/iaebQXum0yMJ. 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 options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: implement of view
> > Thank you for this page. I take my time today, to learn on it. :) > -- 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/-/a9kvWj-zSjAJ. 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 options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: implement of view
> > Thank you for your answer. i have chapter 1-4 of > http://www.djangobook.com/en/2.0/index.html done, but not much time to go > throught the hole book atm. i will try it with your code. :) > -- 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/-/OhKq_pl-TqkJ. 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 options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: implement of view
> > I forgot, sql is now hardcodet and i have to change it. on first page i > have to give the filter and the username... > -- 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/-/aq_OCQt8vxkJ. 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 options, visit this group at http://groups.google.com/group/django-users?hl=en.
implement of view
Hi all i have there a little problem and my knowhow with django is not existent. ^^ What i have... --- urls.py - from django.conf.urls import patterns, include, url from klasse.views import portal, sql urlpatterns = patterns('', (r'^portal/$', portal), (r'^sql/$', sql), ) - views.py from django.shortcuts import render_to_response import datetime def portal(request): now = datetime.datetime.now() return render_to_response('portal.html', {'current_date': now}) def sql(request): cnxn = pyodbc.connect('DRIVER={SQL Server};SERVER=MAURITIUS;DATABASE=baan5c;UID=***;PWD=***') cursor = cnxn.cursor() cursor.execute("SELECT x.t_name, y.t_mail FROM tttaad20 as x, tttcmf20 as y WHERE (x.t_name = y.t_name) AND (x.t_user = '***')") row = cursor.fetchall() return HttpResponse(row) --- The Settings are correct... The output of sql works - portal.html {% extends "base.html" %} {% block title %}Kundendaten{% endblock %} {% block content %}Zeit der Aktualisierung {{ current_date }}.{% endblock %} - --- base.html --- {% include "header.html" %} {% block title %}{% endblock %} Portal Ausgabe Kundendaten {% block content %}{% endblock %} {% include "footer.html" %} - how can i implements now these "def sql(request):" into my html code? pls help me... -- 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/-/YtO3FCGz1UMJ. 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 options, visit this group at http://groups.google.com/group/django-users?hl=en.
WebPage with MsSql access
Hi all I have to make a WebPage with Django. It must be possible to connect from the page to the mssql database. i have an odbc program know atm, and this works... - import pyodbc cnxn = pyodbc.connect('DRIVER={SQL Server}; SERVER=MAURITIUS;DATABASE=baan5c;UID=portal;PWD=P0rtalReader') cursor = cnxn.cursor() cursor.execute("SELECT x.t_name, y.t_mail FROM tttaad20 as x, tttcmf20 as y WHERE (x.t_name = y.t_name) AND (x.t_user = 'niedereh')") row = cursor.fetchall() if row: print row - How i have to make the page, that i can change UID, PWD and the filter with a textfield and how can i make the field for the data output from server? I know now only how to draw up the page thx http://www.djangobook.com/en/2.0/index.html i worked chapter 1-3 but i have not more time... :( i hope you can help me... greeze Markus -- 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/-/JKtPhUUvfmIJ. 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 options, visit this group at http://groups.google.com/group/django-users?hl=en.
Django - Lotus Notes
I have to create a web-service and i hope it works with Django. My plan is connecting to a Lotus Notes database. Can this work? If yes, how? Else no, how can i do this, witch programm do i need? I will programm it based on a Python language. I am a new programmer and used Python just for one week till now... -- 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/-/t7Nwc7_WX-cJ. 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 options, visit this group at http://groups.google.com/group/django-users?hl=en.