Re: I need orientation on what to do and how to do it (procedure)

2021-12-16 Thread Vishesh Mangla
https://stackoverflow.com/a/2218134/4213362 On Thu, Dec 16, 2021 at 9:56 PM addani Raghavender < addaniraghaven...@gmail.com> wrote: > No not that much > > On Thu, 16 Dec, 2021, 7:43 am Amor Zamora, wrote: > >> >> Can you help me? >> I need to obtain the country of where the users access from

Re: I need orientation on what to do and how to do it (procedure)

2021-12-16 Thread addani Raghavender
No not that much On Thu, 16 Dec, 2021, 7:43 am Amor Zamora, wrote: > > Can you help me? > I need to obtain the country of where the users access from the IP and > insert that information into the sqlite3 database. > > Little description. > I have an application that I have to do the statistics

Re: I need orientation on what to do and how to do it (procedure)

2021-12-15 Thread Amor Zamora
Thank you very much I review it and let you know if it served me. El jue, 16 dic 2021 a las 3:25, Muhammad Juwaini Abdul Rahman (< juwa...@gmail.com>) escribió: > You can try this json api. > https://www.geoplugin.com/webservices/json > > I believe there's a lot of services out there with this

Re: I need orientation on what to do and how to do it (procedure)

2021-12-15 Thread Muhammad Juwaini Abdul Rahman
You can try this json api. https://www.geoplugin.com/webservices/json I believe there's a lot of services out there with this capability. On Thu, 16 Dec 2021 at 10:13, Amor Zamora wrote: > > Can you help me? > I need to obtain the country of where the users access from the IP and > insert that

Fwd: I need orientation on what to do and how to do it (procedure)

2021-12-15 Thread Amor Zamora
Can you help me? I need to obtain the country of where the users access from the IP and insert that information into the sqlite3 database. Little description. I have an application that I have to do the statistics and insert into the sqlite3 database, the IP information, the country from which it

I need orientation on what to do and how to do it (procedure)

2021-12-03 Thread Amor Zamora
and that this be saved in the same folder, but with the name results. Suggestions on how I can do this. Escrip that will process the information in the pdf. import pdfAWAM import sys, os import optparse import time import config import requests import io USAGE="""%s [options] pdffile - Chec

How to do calculations in Model

2021-09-15 Thread joji...@gmail.com
Hello there, I am creating a salary & payroll application in Django. I need your guidance in calcuating the salary and insert to salarydetails table. I wanted to know how we can do the calculation using models. For example first we need to calculate the salary details for each salary head a

Re: how to do social login with github in python/django

2021-03-10 Thread DJANGO DEVELOPER
I am new and learning it. On Thu, Mar 11, 2021 at 4:33 AM DJANGO DEVELOPER wrote: > please help me. > > On Thu, Mar 11, 2021 at 4:30 AM Kasper Laudrup > wrote: > >> On 10/03/2021 23.59, DJANGO DEVELOPER wrote: >> > are you able to solve the issue? >> > >> >> Yes >> >> -- >> You received this

Re: how to do social login with github in python/django

2021-03-10 Thread DJANGO DEVELOPER
please help me. On Thu, Mar 11, 2021 at 4:30 AM Kasper Laudrup wrote: > On 10/03/2021 23.59, DJANGO DEVELOPER wrote: > > are you able to solve the issue? > > > > Yes > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from

Re: how to do social login with github in python/django

2021-03-10 Thread Kasper Laudrup
On 10/03/2021 23.59, DJANGO DEVELOPER wrote: are you able to solve the issue? Yes -- 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

Re: how to do social login with github in python/django

2021-03-10 Thread DJANGO DEVELOPER
are you able to solve the issue? On Thu, Mar 11, 2021 at 3:45 AM DJANGO DEVELOPER wrote: > please this is the question I have asked on stack overflow. > https://stackoverflow.com/questions/66573665/github-social-login-in-django > > On Thu, Mar 11, 2021 at 3:41 AM boyuanl...@gmail.com > wrote:

Re: how to do social login with github in python/django

2021-03-10 Thread DJANGO DEVELOPER
please this is the question I have asked on stack overflow. https://stackoverflow.com/questions/66573665/github-social-login-in-django On Thu, Mar 11, 2021 at 3:41 AM boyuanl...@gmail.com wrote: > Can you share your code? > > On Wednesday, March 10, 2021, 02:24:21 PM PST, DJANGO DEVELOPER < >

Re: how to do social login with github in python/django

2021-03-10 Thread boyuanl...@gmail.com
Can you share your code? On Wednesday, March 10, 2021, 02:24:21 PM PST, DJANGO DEVELOPER wrote: I have been working since this afternoon and everything is working fine. when I login via github and github redirects to me on home page after logging in then it is not displaying me the

how to do social login with github in python/django

2021-03-10 Thread DJANGO DEVELOPER
I have been working since this afternoon and everything is working fine. when I login via github and github redirects to me on home page after logging in then it is not displaying me the github's username. can anyone help me out right now? it is urgent please. -- You received this message

Re: How to do the chrome extension work only with logged users?

2020-08-02 Thread Kasper Laudrup
Hi Bruno, On 02/08/2020 07.04, Bruno Salles Pereira wrote: How to do the chrome extension work only with logged users This is not the place for Chrome extension development. Try here instead: https://groups.google.com/a/chromium.org/forum/#!forum/chromium-extensions Kind regards, Kasper

How to do the chrome extension work only with logged users?

2020-08-02 Thread Bruno Salles Pereira
How to do the chrome extension work only with logged users -- 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.co

Re: How to do SEO for my django website

2020-03-23 Thread Saifur Rahman
Hi Yash Garg, I'm an SEO Expert & working more than 8 years. I have done more 3 Django website SEO. So it's easy for me. Please feel free contact through Skype: rsaifur7, Email: saifurs...@gmail.com, WhatsApp: +880 1688-255 244 Thanks On Friday, January 3, 2020 at 6:41:28 PM UTC+6, Yash Garg

Re: How to do validation on a form which is opened by clicking a button

2020-03-01 Thread Sunil BK
Hey Guys Thanks for your reply!! I finally managed to get the code running. The reason for no showing up the validation messages was, that I my action within the form action method was set to POST. When I have switched that to GET, everything worked as expected. Thanks Sunil Am Freitag,

Re: How to do validation on a form which is opened by clicking a button

2020-02-28 Thread Naveen Arora
Use this as below in your view - context["form"] = YourForm(request.POST or None) and just a method if form.is_valid(), there is no need for the else part. On Friday, 28 February 2020 02:41:04 UTC+5:30, Sunil BK wrote: > > Hello community > > I am trying to build a simple form which can be

Re: How to do validation on a form which is opened by clicking a button

2020-02-27 Thread 'rossm6' via Django users
If the form is not valid you are creating a new form and returning this to the user. So you need to remove the line where you create this second form object within the else clause of the view and it will work. On Thu, Feb 27, 2020 at 9:10 PM Sunil BK wrote: > Hello community > > I am trying to

How to do validation on a form which is opened by clicking a button

2020-02-27 Thread Sunil BK
Hello community I am trying to build a simple form which can be opened using a button. It should offer some fields which should be further process after validation. And there is exactly my issue. When I write some data into the fields and click the submit button. the validation error is NOT

Re: How to do SEO for my django website

2020-02-20 Thread savaş özkarakaya
I don't know is there ? *seo hizmeti * 3 Ocak 2020 Cuma 15:41:28 UTC+3 tarihinde Yash Garg yazdı: > > Is there any package or module available for SEO of django website ? > > -- You received this message because you are subscribed to the Google Groups "Django

How to do an override of fields based on it's value in an aggregation query (join on multiple columns)

2020-02-03 Thread Vladimir K.
Hi My case is fully depicted here: https://stackoverflow.com/questions/59991771/django-how-to-do-an-override-of-fields-based-on-its-value-in-an-aggregation-qu Any ideas? The next step would be to do a RawSQL but I think that it should be possible with the ORM. Best regards and thanks

Re: How to do SEO for my django website

2020-01-14 Thread Ram
Hi, I'm also interested in the default SEO module that comes with DJango FWK. Thanks, ~Ram On Tue, Jan 14, 2020 at 5:39 AM Mohamed A wrote: > Please, check an alternative from here > https://djangopackages.org/grids/g/seo/ > > On Mon, Jan 13, 2020 at 10:40 PM Roshan Shah > wrote: > >>

Re: How to do SEO for my django website

2020-01-14 Thread Mohamed A
Please, check an alternative from here https://djangopackages.org/grids/g/seo/ On Mon, Jan 13, 2020 at 10:40 PM Roshan Shah wrote: > Anyone fixing django-seo to be compatible with Django 3.0? > > On Fri, Jan 3, 2020 at 7:54 AM Yash Garg wrote: > >> rollyourown.seo in not compatible with

Re: How to do SEO for my django website

2020-01-13 Thread Roshan Shah
Anyone fixing django-seo to be compatible with Django 3.0? On Fri, Jan 3, 2020 at 7:54 AM Yash Garg wrote: > rollyourown.seo in not compatible with latest version of django > > > On Friday, January 3, 2020 at 6:18:11 PM UTC+5:30, sagar ninave wrote: >> >>

Re: How to do SEO for my django website

2020-01-03 Thread Yash Garg
rollyourown.seo in not compatible with latest version of django On Friday, January 3, 2020 at 6:18:11 PM UTC+5:30, sagar ninave wrote: > > https://django-seo.readthedocs.io/en/latest/introduction/tutorial.html > > > On Fri, Jan 3, 2020 at 6:11 PM Yash Garg > > wrote: > >> Is there any package

Re: How to do SEO for my django website

2020-01-03 Thread DANIEL URBANO DE LA RUA
here you have a good example to what to use and how https://github.com/mirumee/saleor El vie., 3 ene. 2020 a las 13:42, Yash Garg () escribió: > Is there any package or module available for SEO of django website ? > > -- > You received this message because you are subscribed to the Google Groups

Re: How to do SEO for my django website

2020-01-03 Thread DANIEL URBANO DE LA RUA
https://github.com/mirumee/saleor here you have a good example how an what to use to do the SEO El vie., 3 ene. 2020 a las 13:48, sagar ninave () escribió: > https://www.bedjango.com/blog/4-tips-position-your-website-using-django/ > > On Fri, Jan 3, 2020 at 6:19 PM sagar ninave wrote: > >>

Re: How to do SEO for my django website

2020-01-03 Thread sagar ninave
https://www.bedjango.com/blog/4-tips-position-your-website-using-django/ On Fri, Jan 3, 2020 at 6:19 PM sagar ninave wrote: > https://django-seo.readthedocs.io/en/latest/introduction/tutorial.html > > > On Fri, Jan 3, 2020 at 6:11 PM Yash Garg wrote: > >> Is there any package or module

Re: How to do SEO for my django website

2020-01-03 Thread sagar ninave
https://django-seo.readthedocs.io/en/latest/introduction/tutorial.html On Fri, Jan 3, 2020 at 6:11 PM Yash Garg wrote: > Is there any package or module available for SEO of django website ? > > -- > You received this message because you are subscribed to the Google Groups > "Django users"

How to do SEO for my django website

2020-01-03 Thread Yash Garg
Is there any package or module available for SEO of django website ? -- 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.

Re: How t do Login using Gmail, twtter or facebook

2019-11-12 Thread Balaji Shetty
Thank You very much to all Django Experts * Andréas Kühne, Nick Sarbicki, Kasper Laudrup, Andréas Kühne *for your nice reply about my Query. On Mon, Nov 11, 2019 at 3:08 PM Nick Sarbicki wrote: > I generally like to implement things like Google auth myself, as it's not > too complex and down

Re: How t do Login using Gmail, twtter or facebook

2019-11-11 Thread Kasper Laudrup
Hi, On 10/11/2019 23.01, Balaji Shetty wrote: Hi can anyone give me web resource to login into Application using Gmail Account. https://support.google.com/accounts/ If that's not what you're looking for, you probably need to be a bit more specific. Kind regards, Kasper Laudrup --

Re: How t do Login using Gmail, twtter or facebook

2019-11-11 Thread Nick Sarbicki
I generally like to implement things like Google auth myself, as it's not too complex and down the line it often makes things easier (e.g. you can easily use a single backend for both a web login and an API login). Google provide plenty of guides on this for their setup e.g:

Re: How t do Login using Gmail, twtter or facebook

2019-11-11 Thread Andréas Kühne
https://simpleisbetterthancomplex.com/tutorial/2016/10/24/how-to-add-social-login-to-django.html Regards, Andréas Den mån 11 nov. 2019 kl 10:27 skrev Balaji Shetty : > Hi > > can anyone give me web resource to login into Application using Gmail > Account. > > -- > > > *Mr. Shetty Balaji

How t do Login using Gmail, twtter or facebook

2019-11-11 Thread Balaji Shetty
Hi can anyone give me web resource to login into Application using Gmail Account. -- *Mr. Shetty Balaji S.Asst. ProfessorDepartment of Information Technology,* *SGGS Institute of Engineering & Technology, Vishnupuri, Nanded.MH.India* *Official: bsshe...@sggs.ac.in * * Mobile:

How to do arthimetic operations on database values in django

2018-11-13 Thread Mohan Goud
I have Prof:AssociateProf:AssistantProf = x:y:z in database and I have to do these operations x/(x+y+z) : y/(x+y+z) : z/(x+y+z) in django. Can anyone help me on this and models.py is class Show(models.Model) :Total = models.IntegerField(default = 0)Prof = models.IntegerField(default =

Re: how to do inner join using 3 tables

2018-03-08 Thread Simon Charette
Hello Angel, Did you try the following transaction = Transaction.objects.filter( user=user, status=F('detail__status'), ).first() Best, Simon Le jeudi 8 mars 2018 09:52:44 UTC-5, Angel Rojas a écrit : > > Hello friends, I have a little problem with a relationship with 3 tables > >

Re: how to do inner join using 3 tables

2018-03-08 Thread Angel Rojas
thank you for your answer, but I need a next result select * select User as u inner join transaction as tr on u.id=user_id.id inner join transactionDetail as trd on tr.id=trd.transaction_id where tr.current_status=trd.status please how can I do that thanks for your attention

Re: how to do inner join using 3 tables

2018-03-08 Thread C. Kirby
As written it looks like you want to get all the 0 status transactions for a given user, and then get all the transaction details for those transactions (.filter allows for any number of results) Since your var transaction is a list, and you really only care about the ids to pull the

how to do inner join using 3 tables

2018-03-08 Thread Angel Rojas
Hello friends, I have a little problem with a relationship with 3 tables tables - User - Transaction - TransactionDetail my query is class TransactionInitiated(generics.ListAPIView): """ List Transaction Initiated """ serializer_class = TransactionSerializer def

Re: How to do "choices" from DB in form field without breaking migrations and such

2018-02-15 Thread C Kirby
Yeah, I meant to write about that. If you put a database filter in a field definition (model or form) it only runs it on start/restart. Using the method I put, or a callback function in the choices, allows the choices to reflect reality of the data. On Thu, Feb 15, 2018 at 12:24 PM,

Re: How to do "choices" from DB in form field without breaking migrations and such

2018-02-15 Thread jasonbnance
Thank you very much. This worked perfectly. Consequently it also fixed my issue of those select boxes not reflecting changes in the list until the web server was restarted since the data is now being pulled at instantiation instead of in the class definition. j On Thursday, February 15,

Re: How to do "choices" from DB in form field without breaking migrations and such

2018-02-15 Thread C. Kirby
You can set the choices in the form __init__ to handle the issue: class FooJBossForm(Form): biz_service = MultipleChoiceField( choices=[], required=False, label='Business Service', widget=SelectMultiple(attrs={'class': 'form-control'}), ) def

Re: How to do "choices" from DB in form field without breaking migrations and such

2018-02-15 Thread jasonbnance
I should have included that the reason I'm using a `MultipleChoiceField` instead of a `ModelMultipleChoiceField` here is because I want the POSTed variable to be the business service name (string) not the primary key of the selected record. j On Thursday, February 15, 2018 at 8:56:56 AM

How to do "choices" from DB in form field without breaking migrations and such

2018-02-15 Thread jasonbnance
Hello everyone, I have a form field that is pulling choices from the database: class FooJBossForm(Form): biz_service = MultipleChoiceField( choices=BizService.objects.filter( biz_unit__bu_name='Foo', ).order_by('bs_name').values_list('bs_name',

Re: How to do query inner join in django rest framework

2017-11-17 Thread Jason
I would look at the django beginner tutorial first https://docs.djangoproject.com/en/1.11/intro/tutorial01/ what you're asking for is covered in part 2 -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: how to do query inner join in django 1.11

2017-11-17 Thread Angel Omar Rojas Pacheco
Hello Cristiano, my relation ship data base is in this case one to many. thanks On Thursday, November 16, 2017 at 11:38:27 PM UTC-2, Cristiano Coelho wrote: > > .select_related or prefetch_related? Depends on if it's a 1-Many or > Many-Many relationship. > > El jueves, 16 de noviembre de 2017,

How to do query inner join in django rest framework

2017-11-16 Thread Angel Omar Rojas Pacheco
hello everyone, I am a new in django, need to inner join in django, it searching in documentation DJANGO REST FRAMEWORK / SERIALIZER, but is not looking for I am, My query in sql is: select * from auth_user as auser inner join profile_user_colony as profileu on auser.id=profileu.user_id

how to do query inner join in django 1.11

2017-11-16 Thread Angel Omar Rojas Pacheco
hello peolpe I need your help please, I read documentation django rest framework/serialize, but isn't find my solution, I need this query in django: select * from auth_user as auser inner join profilecolonybit_profile as profileu on auser.id=profileu.user_id this show me all users and

Re: how to do ces monitoring on django application

2017-01-17 Thread Fred Stluka
I want to do ces monitoring for my application. I got one module as statsd but that wasn't helpful. Can anyone provide me suggestions how I can do that. Thanks in advance, Anjali -- You received this message b

how to do ces monitoring on django application

2017-01-17 Thread anjalimk68
I want to do ces monitoring for my application. I got one module as statsd but that wasn't helpful. Can anyone provide me suggestions how I can do that. Thanks in advance, Anjali -- You received this message because you are subscribed to the Google Groups "Django users" group. To u

Re: How to do a generic field in an app.

2016-09-20 Thread Jonty Needham
So now, I'd like to do the following: class AppConfig(models.Model): my_content_type = ForeighnKey(ContentType)

Re: How to do a generic field in an app.

2016-09-20 Thread Jonty Needham
Awesome -- thanks! On Mon, Sep 19, 2016 at 6:48 PM, Tim Graham wrote: > Do you know about https://docs.djangoproject.com/en/stable/ref/contrib/ > contenttypes/#generic-relations ? > > > On Monday, September 19, 2016 at 12:30:01 PM UTC-4, Jonty Needham wrote: >> >> I want

Re: How to do a generic field in an app.

2016-09-19 Thread Tim Graham
Do you know about https://docs.djangoproject.com/en/stable/ref/contrib/contenttypes/#generic-relations ? On Monday, September 19, 2016 at 12:30:01 PM UTC-4, Jonty Needham wrote: > > I want to have a model that has a foreignkey to a model from another app. > The app can be one of many. > > So

How to do a generic field in an app.

2016-09-19 Thread Jonty Needham
I want to have a model that has a foreignkey to a model from another app. The app can be one of many. So far I've come up with a two field solution with: model_type = ForeignKey(ContentType) pk_field = PositiveIntegerField() with an appropriate getter. Is there a better way to do this? It

how to do cross domain single sign on in django

2016-03-11 Thread arockia michel Prem
I am building a small app in django and now i can deploy the code in some cloud based server. how to implement the cross domain access of single sign on. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and

Re: how to do a django data migration on a massive Postgres data table (solved)

2015-05-27 Thread Vernon D. Cole
Hmm. Sorry, I think that I sent the download link when I intended the web link. The trailing ".git" made things bad. Try https://gist.github.com/vernondcole/9adedbab1899224a4eaf On Tuesday, May 26, 2015 at 4:51:59 AM UTC-6, aRkadeFR wrote: > > Thanks for the email on the django-user ML. > >

Re: how to do a django data migration on a massive Postgres data table (solved)

2015-05-26 Thread aRkadeFR
Thanks for the email on the django-user ML. I don't see the gist though, is the problem from me? On 05/22/2015 09:09 PM, Vernon D. Cole wrote: Django migrations are run in a single transaction (if your database is capable of doing a rollback of DDL, as PostgreSQL is) so data migrations of

Re: how to do a django data migration on a massive Postgres data table (solved)

2015-05-22 Thread Larry Martell
On Fri, May 22, 2015 at 3:09 PM, Vernon D. Cole wrote: > Django migrations are run in a single transaction (if your database is > capable of doing a rollback of DDL, as PostgreSQL is) so data migrations of > large tables become impossible. > > I was able to solve this

how to do a django data migration on a massive Postgres data table (solved)

2015-05-22 Thread Vernon D. Cole
Django migrations are run in a single transaction (if your database is capable of doing a rollback of DDL, as PostgreSQL is) so data migrations of large tables become impossible. I was able to solve this problem by having the migration run a no-wait subprocess which performs the data migration

How to do DB memcaching in Django with derived data?

2014-11-24 Thread Saqib Ali
My question is explained in detail here: http://stackoverflow.com/questions/27114947/how-to-do-db-memcaching-in-django-with-derived-data -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiv

Re: How quickly do Django unit tests run?...

2014-09-02 Thread Fred Stluka
ept for the initial setup for the test run (in 1.7 migrations run each time for example), the individual tests should execute as fast as any normal python unit test. On Wed, Aug 27, 2014 at 9:06 PM, Fred Stluka <f...@bristle.com &l

Re: How quickly do Django unit tests run?...

2014-09-02 Thread Benjamin Scherrey
-- >>> Fred Stluka -- mailto:f...@bristle.com <f...@bristle.com> -- >>> http://bristle.com/~fred/ >>> Bristle Software, Inc -- http://bristle.com -- Glad to be of service! >>> Open Source: Without walls and fences, we need no Windows

Re: How quickly do Django unit tests run?...

2014-08-29 Thread Fred Stluka
thing's definitely wrong. Except for the initial setup for the test run (in 1.7 migrations run each time for example), the individual tests should execute as fast as any normal python unit test. On Wed, Aug 27, 2014 at 9:06 PM, Fred Stluka <f...@bristle.com <

Re: How quickly do Django unit tests run?...

2014-08-27 Thread Benjamin Scherrey
Without walls and fences, we need no Windows or Gates. >> -- >> On 8/27/14 3:57 PM, Benjamin Scherrey wrote: >> >> Something's definitely wrong. Except for the initial setup for the test >> run (in 1.7 migrations run each time

Re: How quickly do Django unit tests run?...

2014-08-27 Thread Fred Stluka
the test run (in 1.7 migrations run each time for example), the individual tests should execute as fast as any normal python unit test. On Wed, Aug 27, 2014 at 9:06 PM, Fred Stluka <f...@bristle.com <mailto:f...@bristle.com>> wrote: How quickly do Dja

Re: How quickly do Django unit tests run?...

2014-08-27 Thread Benjamin Scherrey
thon unit test. > > > On Wed, Aug 27, 2014 at 9:06 PM, Fred Stluka <f...@bristle.com> wrote: > >> How quickly do Django unit tests run? >> >> Mine are taking 7-9 seconds each, even for trivial tests like: >> self.assertEqual(1 + 1, 2) >> that a

Re: How quickly do Django unit tests run?...

2014-08-27 Thread Fred Stluka
for the test run (in 1.7 migrations run each time for example), the individual tests should execute as fast as any normal python unit test. On Wed, Aug 27, 2014 at 9:06 PM, Fred Stluka <f...@bristle.com <mailto:f...@bristle.com>> wrote: How quickly do Django unit tests ru

Re: How quickly do Django unit tests run?...

2014-08-27 Thread Benjamin Scherrey
Something's definitely wrong. Except for the initial setup for the test run (in 1.7 migrations run each time for example), the individual tests should execute as fast as any normal python unit test. On Wed, Aug 27, 2014 at 9:06 PM, Fred Stluka <f...@bristle.com> wrote: > How quickly

How quickly do Django unit tests run?...

2014-08-27 Thread Fred Stluka
How quickly do Django unit tests run? Mine are taking 7-9 seconds each, even for trivial tests like: self.assertEqual(1 + 1, 2) that are all in the same test class of the same app. Is this typical? Or do I have something misconfigured. Thanks! --Fred -- You received this message

Re: How to do 2-ModelForm-in-1-CVB right?

2013-09-27 Thread Adam
2013年9月27日金曜日 10時03分09秒 UTC+9 Yu Chen: > > Inlineformset may solve your problem, and this > http://haineault.com/blog/155/ is a good example. > > In the sample code, CBV has to attached to FormView and has to provide one 'form_class' member. Another extra form is set by context_data. It is still

Re: How to do 2-ModelForm-in-1-CVB right?

2013-09-26 Thread Yu Chen
Inlineformset may solve your problem, and this http://haineault.com/blog/155/ is a good example. 在 2013年9月26日星期四UTC+8下午1时19分41秒,Adam写道: > > Hi, > > I am trying to handle 2 ModelForm in 1 view. Is that possible with CBV > solution? Does any best practise exist? > > Here is the problem in

How to do 2-ModelForm-in-1-CVB right?

2013-09-25 Thread Adam
Hi, I am trying to handle 2 ModelForm in 1 view. Is that possible with CBV solution? Does any best practise exist? Here is the problem in details. ## models.py class UserProfile(HasJPAddresses, models.Model): user = models.OneToOneField(User) birthdate =

how to do conditional order_by

2013-07-14 Thread surya
SELECT id, ((positive_count + 1.9208) / (positive_count + negative_count) - 1.96 * SQRT((positive_count * negative_count) / (positive_count + negative_count) + 0.9604) / (positive_count + negative_count)) / (1 + 3.8416 / (positive_count +

Re: hi [django-users] How to do something after "return HttpResponse(html)"?

2013-06-26 Thread Michael Anckaert
current_datetime(request): > now = datetime.datetime.now() > html = "It is now %s." % now > return HttpResponse(html) > """"""""""""""""""""&q

Re: hi [django-users] How to do something after "return HttpResponse(html)"?

2013-06-25 Thread lx
Thank you. But I want to fix it like this, because the time of "do something" is not long. ### from django.http import HttpResponseimport datetimedef current_datetime(request): now = datetime.datetime.now() if now == 2013:

Re: hi [django-users] How to do something after "return HttpResponse(html)"?

2013-06-25 Thread Hector Armando Vela Santos
You can use Celery for that, I've done something similar, just with a CSV instead of a XML, check this http://docs.celeryproject.org/en/latest/django/first-steps-with-django.html once installed and configured, its as simple as: from celery import task if (the xml format is ERROR) == True:

Re: hi [django-users] How to do something after "return HttpResponse(html)"?

2013-06-25 Thread Sandro Dutra
If the "do_something" will take a long time to finish, you've 2 options: Find a better (optimized) way to "do_something" or inform your client the application is doing something and he will have to wait a little. So, I can't see any advantage to say to your client there's something was ok if the

Re: hi [django-users] How to do something after "return HttpResponse(html)"?

2013-06-25 Thread lx
Thank you. The real demand is: 1. receive the xml file from client. 2. if (the xml format is ERROR) == True: return HttpResponse(ERROR FORMAT") else: return HttpResponse(RIGHT FORMAT") #I must give a response first, And do other thing. Because the spend time of do_something() may be

Re: hi [django-users] How to do something after "return HttpResponse(html)"?

2013-06-25 Thread Sandro Dutra
The question is: What you're trying to do? 1. You can do any other process before the return line, the return will be the same... for example: from django.http import HttpResponse from datetime import datetime def current_datetime(request): now = datetime.now() html = "It is

Re: hi [django-users] How to do something after "return HttpResponse(html)"?

2013-06-25 Thread Timster
You cannot do something after the "return" line. This is Python functionality. When you return, the function exits and does not process anything else. What exactly are you trying to do? There is probably another way to accomplish it. -- You received this message because you are subscribed to

hi [django-users] How to do something after "return HttpResponse(html)"?

2013-06-25 Thread lx
.now() html = "It is now %s." % now return HttpResponse(html) """"""""""""""""""""""""""""" Actually, I have a question that

Re: FreeBSD+wsgi+django static and media how-to-do

2013-03-13 Thread Alexey Kinyov
Hi dj-konst! Static files in production are generally served by web server - Nginx or Apache or something else. And it's safer to place static files dir outside of your project dir and use 'collectstatic' command to grab static files there. Here are some examples of Nginx config with static

FreeBSD+wsgi+django static and media how-to-do

2013-03-13 Thread dj-konst
Hi, I'm new in django I use FreeBSD9+wsgi+django (unique host) but meet problems with static files... There are sections in Django Documentation 1.5 ( 4.13.4 Serving static files in production )... but there is no enough details for me. Where to read about serving static files in more detals

Re: how i do a update in django QuerySet like this: update table t set col_a = col_a + 2 where col_b = 1

2012-11-20 Thread peixinchen
thanks, it works 在 2012年11月20日星期二UTC+8下午11时09分23秒,Tom Evans写道: > > On Tue, Nov 20, 2012 at 1:00 PM, peixinchen <shan...@gmail.com> > wrote: > > how i do a update in django QuerySet like this: update table t set col_a > = > > col_a + 2 where col_b = 1, &g

Re: how i do a update in django QuerySet like this: update table t set col_a = col_a + 2 where col_b = 1

2012-11-20 Thread Tom Evans
On Tue, Nov 20, 2012 at 1:00 PM, peixinchen <shangt...@gmail.com> wrote: > how i do a update in django QuerySet like this: update table t set col_a = > col_a + 2 where col_b = 1, > > i could use filter take the place of "where clause", but how "set col_a

how i do a update in django QuerySet like this: update table t set col_a = col_a + 2 where col_b = 1

2012-11-20 Thread peixinchen
how i do a update in django QuerySet like this: update table t set col_a = col_a + 2 where col_b = 1, i could use filter take the place of "where clause", but how "set col_a = col_a + 2" to being? -- You received this message because you are subscribed to the Google G

Re: How I do to centralize logins OpenID in django?

2012-08-22 Thread Adam
t;> On Tue, Aug 21, 2012 at 7:39 PM, Mustapha Aoussar >> <mustapha...@gmail.com >> > wrote: >> >>> Dear sirs, >>> I have split my Django application into two sites with different >>> databases. I use OpenID (python_openid 2.2.5) for >>> authet

Re: How I do to centralize logins OpenID in django?

2012-08-22 Thread Adam
2.2.5) for >> authetication/registration but users of ''site A'' are different from >> ''site B''. >> >> How can I do to centralize logins between apps running on different >> databases? >> >> I have seen this article by Joseph Smarr at Plaxo ( >> h

Re: How I do to centralize logins OpenID in django?

2012-08-22 Thread Thomas Orozco
lit my Django application into two sites with different >> databases. I use OpenID (python_openid 2.2.5) for >> authetication/registration but users of ''site A'' are different from >> ''site B''. >> >> How can I do to centralize logins between apps running on diff

Re: How I do to centralize logins OpenID in django?

2012-08-21 Thread Kurtis Mullins
com> wrote: > Dear sirs, > I have split my Django application into two sites with different > databases. I use OpenID (python_openid 2.2.5) for > authetication/registration but users of ''site A'' are different from > ''site B''. > > How can I do to centralize logins betwee

How I do to centralize logins OpenID in django?

2012-08-21 Thread Mustapha Aoussar
Dear sirs, I have split my Django application into two sites with different databases. I use OpenID (python_openid 2.2.5) for authetication/registration but users of ''site A'' are different from ''site B''. How can I do to centralize logins between apps running on different databases? I have

Re: how to do this?

2012-05-27 Thread doniyor
okay i solved it by rendering a list of names Am Sonntag, 27. Mai 2012 08:07:26 UTC+2 schrieb doniyor: > > yeah, you are right.. now i have another html-related problem. well, now i > have even all html fields created thru for-loop. but now all of them have > the same attr value:

Re: how to do this?

2012-05-27 Thread doniyor
yeah, you are right.. now i have another html-related problem. well, now i have even all html fields created thru for-loop. but now all of them have the same attr value: name="prod". and now i want to refer to all of them and send all as email to the buyer. how can i make reference to all field

Re: how to do this?

2012-05-26 Thread doniyor
oh yeah. thats true, i thought, that for-loop which Kenneth proposed doesnot create fields but it does, so in every loop there will be a new html field created if i do like this: {% for p in products %} {{p.arg1}} and {{p.arg2}} {% endfor %} thats the easiest way, great! i was thinking

Re: how to do this?

2012-05-26 Thread kenneth gonsalves
On Sat, 2012-05-26 at 07:03 -0700, doniyor wrote: > for example: user has selected 3 items from products table and then > goes to > next step where he sees what he has selected and then he submits the > booking with some last information of his personal. the point is that > if > he has

Re: how to do this?

2012-05-26 Thread Daniel Roseman
On Saturday, 26 May 2012 15:03:47 UTC+1, doniyor wrote: > > the reason why i want to do this is this: > > the user should be able to select products from products table as many as > he wants, at each selection i will save the product information in db, then > the user clicks on "book" button,

Re: how to do this?

2012-05-26 Thread doniyor
the reason why i want to do this is this: the user should be able to select products from products table as many as he wants, at each selection i will save the product information in db, then the user clicks on "book" button, which leads to another book.html template where extra fields should

  1   2   3   4   >