#cherrypy #tornado #sqlalchemy

Next Topic
 
classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

#cherrypy #tornado #sqlalchemy

vahid peivandy
hi dears
I wanna write code for a hospital project
can anybody help me to a segment that I can't solve it?????????
this project needs 3 tables to include (with SQLAlchemy):


1- a patient table that has:
id static for every patient, name record, family record, telephone record


2- a study table for Referral patient that has:
the number of referral patient record for every patient, date of referral patient record. for example, study table must include a list of the patients that when clicked with the mouse (in web server clicked), show Specifications patient (include: the number of referral patient record for every patient, date of referral patient record)
note: the study table connected with the patiend_id record


3- a file table that connected with study_id and includes:
files for every patient that for example, Alex referral 3 times, for every referral create Separate file in the file table


and that end run web server tornado or cherrypy


thanks a lot

happy new years

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: #cherrypy #tornado #sqlalchemy

Tim Roberts
vahid peivandy wrote:
>
> I wanna write code for a hospital project
> can anybody help me to a segment that I can't solve it?????????

What you've described here is pretty much the whole project. What have
you already done?  Generally, once you've done the database schema, the
data entry stuff falls right out.

--
Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: #cherrypy #tornado #sqlalchemy

vahid peivandy
I write db but now connect to the web server and this is my problem and need help

On Wed, Jan 2, 2019 at 9:18 PM Tim Roberts <[hidden email]> wrote:
vahid peivandy wrote:
>
> I wanna write code for a hospital project
> can anybody help me to a segment that I can't solve it?????????

What you've described here is pretty much the whole project. What have
you already done?  Generally, once you've done the database schema, the
data entry stuff falls right out.

--
Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: #cherrypy #tornado #sqlalchemy

Tim Roberts
vahid peivandy wrote:

I write db but now connect to the web server and this is my problem and need help

Well, you take it one step at a time.  You will want to sketch out on paper what forms you will need.  What is the user story?  What will they see first?  Is there a menu?  Is there a search?  Which tables do they need to see?  How does the flow go?  Where do the buttons go?

After that, you're going to want to sketch out some simple HTML forms, just so you can see how they look with data in them.  How can you present the fields in an attractive and useful way?

After that, I usually do a couple of the pages as CGI scripts behind an Apache server somewhere, so I can check out the flow without having to worry about a web server.

Once you have that basic outline, then you can choose your web server and start doing more coding.  You can adapt the CGI pages you've already done, and switch over to whatever template engine is provided.

-- 
Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.

smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: #cherrypy #tornado #sqlalchemy

vahid peivandy
I want on the first-page show a simple list page HTML that shows Patient order by id, name, family name
and when a user clicked to for example  Patient Alex goes to the second page that includes lists of Patient Referral order by id, date and when the user clicked to special date go to the last page that shows pictures of for example hand, foot, etc of Alex.

On Fri, Jan 4, 2019 at 10:27 PM Tim Roberts <[hidden email]> wrote:
vahid peivandy wrote:

I write db but now connect to the web server and this is my problem and need help

Well, you take it one step at a time.  You will want to sketch out on paper what forms you will need.  What is the user story?  What will they see first?  Is there a menu?  Is there a search?  Which tables do they need to see?  How does the flow go?  Where do the buttons go?

After that, you're going to want to sketch out some simple HTML forms, just so you can see how they look with data in them.  How can you present the fields in an attractive and useful way?

After that, I usually do a couple of the pages as CGI scripts behind an Apache server somewhere, so I can check out the flow without having to worry about a web server.

Once you have that basic outline, then you can choose your web server and start doing more coding.  You can adapt the CGI pages you've already done, and switch over to whatever template engine is provided.

-- 
Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: #cherrypy #tornado #sqlalchemy

Sviatoslav Sydorenko (@webknjaz)
Hi Vahid,

I'm not sure where are you stuck at? I have a feeling that you just don't know how to integrate SA with CherryPy. Am I right? If so, here's some app example: https://github.com/Lawouach/Twiseless/blob/master/lib/tool/db.py

пт, 4 січ. 2019 о 20:16 vahid peivandy <[hidden email]> пише:
I want on the first-page show a simple list page HTML that shows Patient order by id, name, family name
and when a user clicked to for example  Patient Alex goes to the second page that includes lists of Patient Referral order by id, date and when the user clicked to special date go to the last page that shows pictures of for example hand, foot, etc of Alex.

On Fri, Jan 4, 2019 at 10:27 PM Tim Roberts <[hidden email]> wrote:
vahid peivandy wrote:

I write db but now connect to the web server and this is my problem and need help

Well, you take it one step at a time.  You will want to sketch out on paper what forms you will need.  What is the user story?  What will they see first?  Is there a menu?  Is there a search?  Which tables do they need to see?  How does the flow go?  Where do the buttons go?

After that, you're going to want to sketch out some simple HTML forms, just so you can see how they look with data in them.  How can you present the fields in an attractive and useful way?

After that, I usually do a couple of the pages as CGI scripts behind an Apache server somewhere, so I can check out the flow without having to worry about a web server.

Once you have that basic outline, then you can choose your web server and start doing more coding.  You can adapt the CGI pages you've already done, and switch over to whatever template engine is provided.

-- 
Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.


--
Cheers,
Sviatoslav.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: #cherrypy #tornado #sqlalchemy

vahid peivandy
I cannot connect mu db on web server tornado or web server cherrypy this is my problem and see this page but not help me

On Fri, Jan 4, 2019 at 10:54 PM Sviatoslav Sydorenko <[hidden email]> wrote:
Hi Vahid,

I'm not sure where are you stuck at? I have a feeling that you just don't know how to integrate SA with CherryPy. Am I right? If so, here's some app example: https://github.com/Lawouach/Twiseless/blob/master/lib/tool/db.py

пт, 4 січ. 2019 о 20:16 vahid peivandy <[hidden email]> пише:
I want on the first-page show a simple list page HTML that shows Patient order by id, name, family name
and when a user clicked to for example  Patient Alex goes to the second page that includes lists of Patient Referral order by id, date and when the user clicked to special date go to the last page that shows pictures of for example hand, foot, etc of Alex.

On Fri, Jan 4, 2019 at 10:27 PM Tim Roberts <[hidden email]> wrote:
vahid peivandy wrote:

I write db but now connect to the web server and this is my problem and need help

Well, you take it one step at a time.  You will want to sketch out on paper what forms you will need.  What is the user story?  What will they see first?  Is there a menu?  Is there a search?  Which tables do they need to see?  How does the flow go?  Where do the buttons go?

After that, you're going to want to sketch out some simple HTML forms, just so you can see how they look with data in them.  How can you present the fields in an attractive and useful way?

After that, I usually do a couple of the pages as CGI scripts behind an Apache server somewhere, so I can check out the flow without having to worry about a web server.

Once you have that basic outline, then you can choose your web server and start doing more coding.  You can adapt the CGI pages you've already done, and switch over to whatever template engine is provided.

-- 
Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.


--
Cheers,
Sviatoslav.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: #cherrypy #tornado #sqlalchemy

Sviatoslav Sydorenko (@webknjaz)
This is actually a CherryPy users group, not Tornado. So I'm not sure how much insight you could get from us.
But OTOH nobody is going to guess what failed for you unless you actually describe what you have tried already.
Current dialogue is in style of "- It doesn't work! - Yes, it doesn't." isn't helpful, is it?

Show us the code.

пт, 4 січ. 2019 о 20:30 vahid peivandy <[hidden email]> пише:
I cannot connect mu db on web server tornado or web server cherrypy this is my problem and see this page but not help me

On Fri, Jan 4, 2019 at 10:54 PM Sviatoslav Sydorenko <[hidden email]> wrote:
Hi Vahid,

I'm not sure where are you stuck at? I have a feeling that you just don't know how to integrate SA with CherryPy. Am I right? If so, here's some app example: https://github.com/Lawouach/Twiseless/blob/master/lib/tool/db.py

пт, 4 січ. 2019 о 20:16 vahid peivandy <[hidden email]> пише:
I want on the first-page show a simple list page HTML that shows Patient order by id, name, family name
and when a user clicked to for example  Patient Alex goes to the second page that includes lists of Patient Referral order by id, date and when the user clicked to special date go to the last page that shows pictures of for example hand, foot, etc of Alex.

On Fri, Jan 4, 2019 at 10:27 PM Tim Roberts <[hidden email]> wrote:
vahid peivandy wrote:

I write db but now connect to the web server and this is my problem and need help

Well, you take it one step at a time.  You will want to sketch out on paper what forms you will need.  What is the user story?  What will they see first?  Is there a menu?  Is there a search?  Which tables do they need to see?  How does the flow go?  Where do the buttons go?

After that, you're going to want to sketch out some simple HTML forms, just so you can see how they look with data in them.  How can you present the fields in an attractive and useful way?

After that, I usually do a couple of the pages as CGI scripts behind an Apache server somewhere, so I can check out the flow without having to worry about a web server.

Once you have that basic outline, then you can choose your web server and start doing more coding.  You can adapt the CGI pages you've already done, and switch over to whatever template engine is provided.

-- 
Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.


--
Cheers,
Sviatoslav.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.


--
Cheers,
Sviatoslav.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: #cherrypy #tornado #sqlalchemy

vahid peivandy

On Fri, Jan 4, 2019 at 11:05 PM Sviatoslav Sydorenko <[hidden email]> wrote:
This is actually a CherryPy users group, not Tornado. So I'm not sure how much insight you could get from us.
But OTOH nobody is going to guess what failed for you unless you actually describe what you have tried already.
Current dialogue is in style of "- It doesn't work! - Yes, it doesn't." isn't helpful, is it?

Show us the code.

пт, 4 січ. 2019 о 20:30 vahid peivandy <[hidden email]> пише:
I cannot connect mu db on web server tornado or web server cherrypy this is my problem and see this page but not help me

On Fri, Jan 4, 2019 at 10:54 PM Sviatoslav Sydorenko <[hidden email]> wrote:
Hi Vahid,

I'm not sure where are you stuck at? I have a feeling that you just don't know how to integrate SA with CherryPy. Am I right? If so, here's some app example: https://github.com/Lawouach/Twiseless/blob/master/lib/tool/db.py

пт, 4 січ. 2019 о 20:16 vahid peivandy <[hidden email]> пише:
I want on the first-page show a simple list page HTML that shows Patient order by id, name, family name
and when a user clicked to for example  Patient Alex goes to the second page that includes lists of Patient Referral order by id, date and when the user clicked to special date go to the last page that shows pictures of for example hand, foot, etc of Alex.

On Fri, Jan 4, 2019 at 10:27 PM Tim Roberts <[hidden email]> wrote:
vahid peivandy wrote:

I write db but now connect to the web server and this is my problem and need help

Well, you take it one step at a time.  You will want to sketch out on paper what forms you will need.  What is the user story?  What will they see first?  Is there a menu?  Is there a search?  Which tables do they need to see?  How does the flow go?  Where do the buttons go?

After that, you're going to want to sketch out some simple HTML forms, just so you can see how they look with data in them.  How can you present the fields in an attractive and useful way?

After that, I usually do a couple of the pages as CGI scripts behind an Apache server somewhere, so I can check out the flow without having to worry about a web server.

Once you have that basic outline, then you can choose your web server and start doing more coding.  You can adapt the CGI pages you've already done, and switch over to whatever template engine is provided.

-- 
Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.


--
Cheers,
Sviatoslav.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.


--
Cheers,
Sviatoslav.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: #cherrypy #tornado #sqlalchemy

Sviatoslav Sydorenko (@webknjaz)
It looks okay'ish, besides the fact that you probably don't need custom initializers on models...

пт, 4 січ. 2019 о 20:38 vahid peivandy <[hidden email]> пише:

On Fri, Jan 4, 2019 at 11:05 PM Sviatoslav Sydorenko <[hidden email]> wrote:
This is actually a CherryPy users group, not Tornado. So I'm not sure how much insight you could get from us.
But OTOH nobody is going to guess what failed for you unless you actually describe what you have tried already.
Current dialogue is in style of "- It doesn't work! - Yes, it doesn't." isn't helpful, is it?

Show us the code.

пт, 4 січ. 2019 о 20:30 vahid peivandy <[hidden email]> пише:
I cannot connect mu db on web server tornado or web server cherrypy this is my problem and see this page but not help me

On Fri, Jan 4, 2019 at 10:54 PM Sviatoslav Sydorenko <[hidden email]> wrote:
Hi Vahid,

I'm not sure where are you stuck at? I have a feeling that you just don't know how to integrate SA with CherryPy. Am I right? If so, here's some app example: https://github.com/Lawouach/Twiseless/blob/master/lib/tool/db.py

пт, 4 січ. 2019 о 20:16 vahid peivandy <[hidden email]> пише:
I want on the first-page show a simple list page HTML that shows Patient order by id, name, family name
and when a user clicked to for example  Patient Alex goes to the second page that includes lists of Patient Referral order by id, date and when the user clicked to special date go to the last page that shows pictures of for example hand, foot, etc of Alex.

On Fri, Jan 4, 2019 at 10:27 PM Tim Roberts <[hidden email]> wrote:
vahid peivandy wrote:

I write db but now connect to the web server and this is my problem and need help

Well, you take it one step at a time.  You will want to sketch out on paper what forms you will need.  What is the user story?  What will they see first?  Is there a menu?  Is there a search?  Which tables do they need to see?  How does the flow go?  Where do the buttons go?

After that, you're going to want to sketch out some simple HTML forms, just so you can see how they look with data in them.  How can you present the fields in an attractive and useful way?

After that, I usually do a couple of the pages as CGI scripts behind an Apache server somewhere, so I can check out the flow without having to worry about a web server.

Once you have that basic outline, then you can choose your web server and start doing more coding.  You can adapt the CGI pages you've already done, and switch over to whatever template engine is provided.

-- 
Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.


--
Cheers,
Sviatoslav.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.


--
Cheers,
Sviatoslav.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.


--
Cheers,
Sviatoslav.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: #cherrypy #tornado #sqlalchemy

Sviatoslav Sydorenko (@webknjaz)
Oh and feel free to show up at our Gitter chat room and explain more details @ https://gitter.im/cherrypy/cherrypy.

I still cannot understand what your problem is, honestly.

пт, 4 січ. 2019 о 22:47 Sviatoslav Sydorenko <[hidden email]> пише:
It looks okay'ish, besides the fact that you probably don't need custom initializers on models...

пт, 4 січ. 2019 о 20:38 vahid peivandy <[hidden email]> пише:

On Fri, Jan 4, 2019 at 11:05 PM Sviatoslav Sydorenko <[hidden email]> wrote:
This is actually a CherryPy users group, not Tornado. So I'm not sure how much insight you could get from us.
But OTOH nobody is going to guess what failed for you unless you actually describe what you have tried already.
Current dialogue is in style of "- It doesn't work! - Yes, it doesn't." isn't helpful, is it?

Show us the code.

пт, 4 січ. 2019 о 20:30 vahid peivandy <[hidden email]> пише:
I cannot connect mu db on web server tornado or web server cherrypy this is my problem and see this page but not help me

On Fri, Jan 4, 2019 at 10:54 PM Sviatoslav Sydorenko <[hidden email]> wrote:
Hi Vahid,

I'm not sure where are you stuck at? I have a feeling that you just don't know how to integrate SA with CherryPy. Am I right? If so, here's some app example: https://github.com/Lawouach/Twiseless/blob/master/lib/tool/db.py

пт, 4 січ. 2019 о 20:16 vahid peivandy <[hidden email]> пише:
I want on the first-page show a simple list page HTML that shows Patient order by id, name, family name
and when a user clicked to for example  Patient Alex goes to the second page that includes lists of Patient Referral order by id, date and when the user clicked to special date go to the last page that shows pictures of for example hand, foot, etc of Alex.

On Fri, Jan 4, 2019 at 10:27 PM Tim Roberts <[hidden email]> wrote:
vahid peivandy wrote:

I write db but now connect to the web server and this is my problem and need help

Well, you take it one step at a time.  You will want to sketch out on paper what forms you will need.  What is the user story?  What will they see first?  Is there a menu?  Is there a search?  Which tables do they need to see?  How does the flow go?  Where do the buttons go?

After that, you're going to want to sketch out some simple HTML forms, just so you can see how they look with data in them.  How can you present the fields in an attractive and useful way?

After that, I usually do a couple of the pages as CGI scripts behind an Apache server somewhere, so I can check out the flow without having to worry about a web server.

Once you have that basic outline, then you can choose your web server and start doing more coding.  You can adapt the CGI pages you've already done, and switch over to whatever template engine is provided.

-- 
Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.


--
Cheers,
Sviatoslav.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.


--
Cheers,
Sviatoslav.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.


--
Cheers,
Sviatoslav.


--
Cheers,
Sviatoslav.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: #cherrypy #tornado #sqlalchemy

Tim Roberts
In reply to this post by vahid peivandy
vahid peivandy wrote:
I cannot connect mu db on web server tornado or web server cherrypy this is my problem and see this page but not help me

Have you ever done a web application of any kind before?  To me, it looks like you are trying to jump straight to the final steps of building a web app, when you haven't taken any of the early steps yet.  Don't take on too many new things at once.  Can you make a basic Tornado or CherryPy application work?  You start by displaying the basic "hello world" page.  Then you add a couple of very basic pages with buttons or links to flip back and forth between them.  Then you substitute in some of your own text, to prove you understand the templating scheme.  At that point, you'll be more familiar with the framework, and the explanation on how to integrate SQLAlchemy will make more sense.

No one here is going to write your application for you.  We can offer guidelines, and we can help you work through the problems you encounter, but you have to do the work.

-- 
Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.

smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: #cherrypy #tornado #sqlalchemy

vahid peivandy
yes I write this tornado: https://paste.ubuntu.com/p/3kcj6ZRgFQ/
and now wanna connect this code: https://paste.ubuntu.com/p/BzmBTnrN54/     to tornado or cherrypy

On Sat, Jan 5, 2019 at 4:43 AM Tim Roberts <[hidden email]> wrote:
vahid peivandy wrote:
I cannot connect mu db on web server tornado or web server cherrypy this is my problem and see this page but not help me

Have you ever done a web application of any kind before?  To me, it looks like you are trying to jump straight to the final steps of building a web app, when you haven't taken any of the early steps yet.  Don't take on too many new things at once.  Can you make a basic Tornado or CherryPy application work?  You start by displaying the basic "hello world" page.  Then you add a couple of very basic pages with buttons or links to flip back and forth between them.  Then you substitute in some of your own text, to prove you understand the templating scheme.  At that point, you'll be more familiar with the framework, and the explanation on how to integrate SQLAlchemy will make more sense.

No one here is going to write your application for you.  We can offer guidelines, and we can help you work through the problems you encounter, but you have to do the work.

-- 
Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: #cherrypy #tornado #sqlalchemy

Sviatoslav Sydorenko (@webknjaz)
You shouldn't be mixing several web frameworks (especially not sync + async). I think you need to learn more about how the web works now (HTTP, html, templating, etc.)

Regarding connecting SA to CherryPy, I've already sent you a repo with such app example. Essential parts are db plugin (https://github.com/Lawouach/Twiseless/blob/master/lib/plugin/db.py), db tool (https://github.com/Lawouach/Twiseless/blob/master/lib/tool/db.py) and models package (https://github.com/Lawouach/Twiseless/tree/master/lib/model).

Other parts are important too, like this user tool https://github.com/Lawouach/Twiseless/blob/master/lib/tool/user.py#L30-L32 which retrieves a user from db shielding handlers from unauthorized access.

You have to learn the concepts of your chosen framework and then learn how to operate them.

For CherryPy the process is roughly:
1. Have HTTP handlers which are bound to URLs. CherryPy will then call them whenever incoming HTTP request matches URLs.
2. HTTP handlers should return HTML (in common case). Since you'll probably want to render it from templates instead of hardcoded strings you'll probably need to learn Jinja2 or similar.
3. Since you want to access DB you'll need to use a DB driver or an ORM (SQLAlchemy in your case). You'll want to separate it's initialization code and put it into the plugin which will be your interface to the DB and will provide you a session object to work with it. Plugins are run in separate threads and are accessible via a publish-subscribe bus.
4. To make accessing DB session easier you add a db tool which binds the session to current request object so that it's accessible through something like `cherrypy.request.db`. Tools are callables executed at certain points of request-response cycle, before and after request handler is called.
5. With those things above in place it's possible to access a db from handlers (IRL you might want to separate the logic part into its own entity as well).

нд, 6 січ. 2019 о 14:51 vahid peivandy <[hidden email]> пише:
yes I write this tornado: https://paste.ubuntu.com/p/3kcj6ZRgFQ/
and now wanna connect this code: https://paste.ubuntu.com/p/BzmBTnrN54/     to tornado or cherrypy

On Sat, Jan 5, 2019 at 4:43 AM Tim Roberts <[hidden email]> wrote:
vahid peivandy wrote:
I cannot connect mu db on web server tornado or web server cherrypy this is my problem and see this page but not help me

Have you ever done a web application of any kind before?  To me, it looks like you are trying to jump straight to the final steps of building a web app, when you haven't taken any of the early steps yet.  Don't take on too many new things at once.  Can you make a basic Tornado or CherryPy application work?  You start by displaying the basic "hello world" page.  Then you add a couple of very basic pages with buttons or links to flip back and forth between them.  Then you substitute in some of your own text, to prove you understand the templating scheme.  At that point, you'll be more familiar with the framework, and the explanation on how to integrate SQLAlchemy will make more sense.

No one here is going to write your application for you.  We can offer guidelines, and we can help you work through the problems you encounter, but you have to do the work.

-- 
Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.


--
Cheers,
Sviatoslav.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: #cherrypy #tornado #sqlalchemy

vahid peivandy
thanks a lot

On Sun, Jan 6, 2019 at 5:58 PM Sviatoslav Sydorenko <[hidden email]> wrote:
You shouldn't be mixing several web frameworks (especially not sync + async). I think you need to learn more about how the web works now (HTTP, html, templating, etc.)

Regarding connecting SA to CherryPy, I've already sent you a repo with such app example. Essential parts are db plugin (https://github.com/Lawouach/Twiseless/blob/master/lib/plugin/db.py), db tool (https://github.com/Lawouach/Twiseless/blob/master/lib/tool/db.py) and models package (https://github.com/Lawouach/Twiseless/tree/master/lib/model).

Other parts are important too, like this user tool https://github.com/Lawouach/Twiseless/blob/master/lib/tool/user.py#L30-L32 which retrieves a user from db shielding handlers from unauthorized access.

You have to learn the concepts of your chosen framework and then learn how to operate them.

For CherryPy the process is roughly:
1. Have HTTP handlers which are bound to URLs. CherryPy will then call them whenever incoming HTTP request matches URLs.
2. HTTP handlers should return HTML (in common case). Since you'll probably want to render it from templates instead of hardcoded strings you'll probably need to learn Jinja2 or similar.
3. Since you want to access DB you'll need to use a DB driver or an ORM (SQLAlchemy in your case). You'll want to separate it's initialization code and put it into the plugin which will be your interface to the DB and will provide you a session object to work with it. Plugins are run in separate threads and are accessible via a publish-subscribe bus.
4. To make accessing DB session easier you add a db tool which binds the session to current request object so that it's accessible through something like `cherrypy.request.db`. Tools are callables executed at certain points of request-response cycle, before and after request handler is called.
5. With those things above in place it's possible to access a db from handlers (IRL you might want to separate the logic part into its own entity as well).

нд, 6 січ. 2019 о 14:51 vahid peivandy <[hidden email]> пише:
yes I write this tornado: https://paste.ubuntu.com/p/3kcj6ZRgFQ/
and now wanna connect this code: https://paste.ubuntu.com/p/BzmBTnrN54/     to tornado or cherrypy

On Sat, Jan 5, 2019 at 4:43 AM Tim Roberts <[hidden email]> wrote:
vahid peivandy wrote:
I cannot connect mu db on web server tornado or web server cherrypy this is my problem and see this page but not help me

Have you ever done a web application of any kind before?  To me, it looks like you are trying to jump straight to the final steps of building a web app, when you haven't taken any of the early steps yet.  Don't take on too many new things at once.  Can you make a basic Tornado or CherryPy application work?  You start by displaying the basic "hello world" page.  Then you add a couple of very basic pages with buttons or links to flip back and forth between them.  Then you substitute in some of your own text, to prove you understand the templating scheme.  At that point, you'll be more familiar with the framework, and the explanation on how to integrate SQLAlchemy will make more sense.

No one here is going to write your application for you.  We can offer guidelines, and we can help you work through the problems you encounter, but you have to do the work.

-- 
Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.


--
Cheers,
Sviatoslav.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.