Re: Python Django Training

2020-12-07 Thread Master Stock Mart
I wanna also interested joining training group

On Mon., 7 Dec. 2020, 2:09 pm narendra thapa, 
wrote:

> hello please add me also in training group?
>
>
> On Fri, Feb 21, 2020 at 7:27 PM Bharati Nilam 
> wrote:
>
>> Hi,
>> I also from Hyderabad and I'm also interested in the training. please
>> tell me how to join?
>>
>> Regards,
>> Bharati
>>
>> On Thu, 20 Feb, 2020, 6:19 PM Thiagu Palaniappan, <
>> thiagarajan@gmail.com> wrote:
>>
>>> I'm also interested. Please add me in the group.
>>>
>>>
>>> Thanks & Regards,
>>> Thiagu
>>>
>>> On Mon, Feb 17, 2020 at 12:41 AM Akshay Raul 
>>> wrote:
>>>
 I am interested also. Please let me know the details.

 On Sat 1 Feb, 2020, 2:42 PM Srikanth K,  wrote:

> Hi,
>
> I am from Hyderabad. I am Python Developer by Profession. I am eager
> take up any Python , Django Training (online Preferrable or Weekends).
> Members who require can contact me or share me  there idea.
>
> Regards,
> Srikanth.K
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CACPyz-gXb7wo9E0Uhs_pnxF9X52uA10__Fq1xt4trjXUaN3ehQ%40mail.gmail.com
> 
> .
>
 --
 You received this message because you are subscribed to the Google
 Groups "Django users" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to django-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CAEd%2Bv%3D0gE2dEMXKJ0Nm8FcH2ZxUPAdQspkQKB%2Bg5pZbSc_uZnQ%40mail.gmail.com
 
 .

>>>
>>>
>>> --
>>>
>>> Thanks & Regards,
>>>
>>> *Thiagu Palaniappan*
>>>
>>> M +91 (0) 9994318799
>>>
>>> *DXC Technology*
>>> 8th Floor, Tower 1 B DLF IT Park, 1/124 - Shivaji Garden, Nandambakkam
>>> post, Ramapuram, Chennai - 600 089.
>>>
>>> dxc.technology  / Twitter
>>>  / Facebook
>>>  / LinkedIn
>>> 
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAK%3DQXNMzH-iL6BQ3_vfrvTpeY%2BSe5%3DbZm9h5wPW_Dw%2BM2BsvQg%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAPGVBeOgomb94NXAm347QqGcJ%3D3MzxULU7eQnY-M56EbC2D9vg%40mail.gmail.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAEtntjXVaVAyDCJJzS748zfNVm242U%2B6vsFkynevf5ghnPgDhw%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAO5wgB93XEvc1jWP7QcViNw0x9pc2QqwLuY2QF62km8%3DRbrJfg%40mail.gmail.com.


Re: __init__.py file executed twice ?

2010-12-15 Thread mart
Yes it seems usual referring to the blog post. So if the serveur
restart, that's not a problem that the init are executed several times...

With the mod_wsgi and apache where can I see the results of my "print" ?

On 14-12-10 15:41, Brian Bouterse wrote:
> Why do things get started twice in django sometimes?  I see the
> framework being started twice here.  Also if you overload the
> __init__(self): of models, that too gets called twice.  I've never
> understood this, but the singleton pattern seems to provide a nice
> workaround.
>
> Brian
>
> On Mon, Dec 13, 2010 at 5:19 PM, Mike Dewhirst  > wrote:
>
>
> Here is some research by Graham Dumpleton earlier this year and which
> explains the process in detail ...
>
> http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html
>
> If you decide to use a singleton to monitor state you might have to
> look for somewhere safe to start it.
>
> >
> > And anyway I just realised another problem : I'll need to have
> access to
> > the objects I created from views.
>
> I think it would work from anywhere you can call the code but you need
> to test it.
>
> Mike
>
> > The idea is to send a message to the thread when a certain action is
> > done (like user registration, validate choices...) but to do
> that I need
> > an access to this object (I cannot create another one because of
> > concurrency safety)
> >
> > Any idea ?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> 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.
>
>
>
>
> -- 
> Brian Bouterse
> ITng Services
> -- 
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this 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.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this 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.



Update user page after thread execution

2010-12-15 Thread mart
Hello,

In my architecture, I send messages to a port object (implemented as a
queue in a thread). I'm giving callback function with the result of the
call.

For example, after filling the registration form,

# views.py
...
def createprofile(request):
...
gui_port.send_to(port_profile,('recordprofile',[arg1, arg2,..],
callback,
request))
return render_to_response('wait.html', locals())

def callback(request, status):
if status:
return render_to_response('success.html', locals())
else:
return render_to_response('fail.html', locals())


# profilemanager.py (the port object related to profiles)
...
# when received the message
try:
# some operations, update db,...
except:
# callback function with status = False
threading.Thread(target = msg[2], args = (msg[3],False)).start()
else:
# callback function with status = False
threading.Thread(target = msg[2], args = (msg[3],True)).start()


The problem is that (as expected) the callback function doesn't change
the user webpage when it happens.

Is there a way to do it (using AJAX maybe)

Thank you

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this 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: Send email : from_email ignored

2010-12-14 Thread mart
On 14-12-10 10:09, Dan Fairs wrote:
>> I'd like to send an email from django. This is the code I'm using :
>>
>> # views.py
>> def hello(request):
>>send_mail('subject', "body", "anot...@email.com", ["d...@gmail.com"])
>>return render_to_response('hello.html', locals())
>>
>> # settings.py
>> EMAIL_USE_TLS = True
>> EMAIL_HOST = "smtp.gmail.com"
>> EMAIL_HOST_USER = "myem...@gmail.com"
>> EMAIL_HOST_PASSWORD = "mypassword"
>> EMAIL_PORT = 587
>> DEFAULT_FROM_EMAIL = "notexi...@email.com"
>>
>> The email is correctly send to d...@gmail.com but there is no mention of
>> anot...@email.com. The email is received as coming from
>> myem...@gmail.com. I was expecting that it would be anot...@email.com
>> (or at least a mention of it).
>>
> My guess is that your SMTP provider (gmail) will only allow the From: header 
> to be set to the owner of the account (myem...@gmail.com) as a spam 
> prevention measure. I don't think this is a Django issue per se.
>
> Cheers,
> Dan
>
> --
> Dan Fairs | dan.fa...@gmail.com | www.fezconsulting.com
>
Yes indeed, I tried with another SMTP provider and it works

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this 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.



Send email : from_email ignored

2010-12-14 Thread mart
Hi,

I'd like to send an email from django. This is the code I'm using :

# views.py
def hello(request):
send_mail('subject', "body", "anot...@email.com", ["d...@gmail.com"])
return render_to_response('hello.html', locals())

# settings.py
EMAIL_USE_TLS = True
EMAIL_HOST = "smtp.gmail.com"
EMAIL_HOST_USER = "myem...@gmail.com"
EMAIL_HOST_PASSWORD = "mypassword"
EMAIL_PORT = 587
DEFAULT_FROM_EMAIL = "notexi...@email.com"

The email is correctly send to d...@gmail.com but there is no mention of
anot...@email.com. The email is received as coming from
myem...@gmail.com. I was expecting that it would be anot...@email.com
(or at least a mention of it).

Thank you

mart

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this 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 design

2009-09-30 Thread mart


On Sep 30, 2009, at 4:17 PM, Thomas Guettler wrote:

>
> In OrderDetail you have a ForeignKey to Product. But you need to  
> *copy*
> the price. Example: if someone orders something at day1 for 1 dollar,
> and you set the price on day2 to 3 dollar, you need to ship your
> product cheap for all who odered before day2.
>

thanks thomas,

i am aware of that, it is more the basic layout principle of such a  
"cart"
the fixed price (and discount or such) of day1 would go into the  
ordered_products "through" table
if its gonna be a many-to-many-field in "orders"


> max kalinski wrote:
>> hi djangos,
>>
>> i switched from symfony to django :)
>> its fun, thanks!
>>
>> but i am stuck with my database/model design.
>>
>> now it gets OT (sorry)
>> but i need an opinion on how to design
>> a typical order process:
>>
>> class Order(models.Model):
>>user = models.ForeignKey(User, verbose_name=_("Customer"),
>> related_name=_("orders"))
>>status = models.ForeignKey("OrderStatus",related_name=_("orders"))
>>
>> and then i got Product, OrderDetail, ShippingAddress, Shipment etc...
>>
> ...
>
> -- 
> Thomas Guettler, http://www.thomas-guettler.de/
> E-Mail: guettli (*) thomas-guettler + de
>
> >


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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 design

2009-09-30 Thread mart


On Sep 30, 2009, at 1:54 PM, Tim Chase wrote:

>
>> products_ordered = models.ManyToManyField(Product)
>>
>> i don't like it (as i would have to create my own "through" table/
>> class)
>> for saving the recent price, qty, date etc.
>
> I'm not sure what your complaint about the "through" table is --
> is it that you'd have to create it (which you do below), or is it
> that you're looking for some other way to do it?
>
thanks for your fast reply!

My question is more if that is considered to be best practice?

I am sure many others do have similar scenarios here and there.
do you set it up the same way?

are there any caveats to use many-to-many relations?

things like putting more than one many-to-many field in e.g.
"order":

>   class Product(Model):
> pass # your code here
  class Job(Model)

>   class Order(Model):
> products = ManyToMany("Product", through="ProductOrdered")

jobstodo = ManyToMany("Jobs",through="JobsToDo")



>> blow up the Order-Class with all the Details and many
>> ManyToManyFields,ForeignKeyFields
>>
>> or create some Classes that contain foreignKeys references to
>> OrderInstances:
>> e.g.:
>> class ProductOrdered(models.Model):
>>order = models.ForeignKey(Order, related_name=_
>> ("products_ordered"))
>>product = models.ForeignKey(Product,related_name=_
>> ("products_ordered"))
>>qty = models.PositiveIntegerField(_("Quantity"))
>>price_per_piece = models.DecimalField(max_digits=10,
>> decimal_places=3)
>
> because Django offers a "through" attribute for ManyToMany fields:
>
> http://docs.djangoproject.com/en/dev/topics/db/models/#extra-fields-on-many-to-many-relationships
>
> that allows you to specify
>
>   class Product(Model):
> pass # your code here
>   class Order(Model):
> products = ManyToMany("Product", through="ProductOrdered")
>   class ProductOrdered(Model):
> pass # your code here
>
> which sounds exactly like what you want to do.
>




> -tim
>
>
>
>
> >


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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
-~--~~~~--~~--~--~---