Re: Difference in datetime with timezone

2022-03-30 Thread Andrés Alvarez
Thanks Anthony, I didn't know that pytz is deprecated. Now with zoneinfo is working. Regards, Andres. El miércoles, 30 de marzo de 2022 a la(s) 03:02:56 UTC-4, Antonis Christofides escribió: > Hi, > > not what you asked, but > > from settings import TIME_ZONE > > is an error. It happens to

Re: Difference in datetime with timezone

2022-03-30 Thread Antonis Christofides
Hi, not what you asked, but     from settings import TIME_ZONE is an error. It happens to work in this case, but generally you should write     from django.conf import settings and then use "settings.TIME_ZONE". In Django, "settings" isn't a module, it's an object. Django has some logic when

Re: Difference in datetime with timezone

2022-03-29 Thread Andrés Alvarez
I need to save some fields in my database in the format YYY-MM-MM 00:00:00+00. So I decide to do this: # setting.py TIME_ZONE = 'America/Mexico_City' USE_I18N = True USE_L10N = True USE_TZ = True # models.py class Program(models.Model): objects = models.Manager() objects_custom = Program

Re: Difference in datetime with timezone

2022-03-28 Thread Antonis Christofides
Hello, 1. Please copy your code exactly. Is it really "pytz.timezone(TIME_ZONE)"? Or is it "pytz.timezone(*settings.*TIME_ZONE)"? If it is the first one, please include the definition or importing of TIME_ZONE. 2. Please pretty-print your dictionary. You can use pprint for that. If it do

Difference in datetime with timezone

2022-03-28 Thread Andrés Alvarez
I need to save some fields in my database in the format YYY-MM-MM 00:00:00+00. So I decide to do this: field_to_save = datetime.combine(date_to_save, time.min, pytz.timezone(TIME_ZONE)) in settings.py I have: TIME_ZONE = 'America/Mexico_City' USE_I18N = True USE_L10N = True USE_TZ = True My mode

Re: order_by on the basis of time difference (updated_at - created_at)

2022-01-23 Thread Aadil Rashid
rote: >> >>> this can be easily solved by using an annotation to calculate the >>> difference and store it in a new temporary column, and then sort by it >>> >>> >>> from django.db.models import F >>> from myapp.models import ExampleModel >>>

Re: order_by on the basis of time difference (updated_at - created_at)

2022-01-22 Thread DJANGO DEVELOPER
> On Fri, 21 Jan 2022 at 21:04, Fabio C. Barrionuevo da Luz < > bna...@gmail.com> wrote: > >> this can be easily solved by using an annotation to calculate the >> difference and store it in a new temporary column, and then sort by it >> >> >> from djan

Re: order_by on the basis of time difference (updated_at - created_at)

2022-01-21 Thread Lalit Suthar
Fabio C. Barrionuevo da Luz's answer will work like a charm! On Fri, 21 Jan 2022 at 21:04, Fabio C. Barrionuevo da Luz wrote: > this can be easily solved by using an annotation to calculate the > difference and store it in a new temporary column, and then sort by it

Re: order_by on the basis of time difference (updated_at - created_at)

2022-01-21 Thread Fabio C. Barrionuevo da Luz
this can be easily solved by using an annotation to calculate the difference and store it in a new temporary column, and then sort by it from django.db.models import F from myapp.models import ExampleModel queryset = ExampleModel.objects.annotate( dt_difference=F('updated_at&

Re: Order_by on the basis of time difference:

2022-01-21 Thread Erlan Abdraimov
> I want to query on UserModel such that the Query set which I get should be > orderable in terms of time difference of updated_at - created_at, > I tried > UserModel.objects.all().order_by('updated_at' - 'created_at') > but this is not working > it throws, T

Re: order_by on the basis of time difference (updated_at - created_at)

2022-01-21 Thread Gabriel Araya Garcia
default=True) > created_at = models.DateTimeField(auto_now_add=True) > updated_at = models.DateTimeField(auto_now=True) > > > > I want to query on UserModel such that the Query set which I get should be > orderable in terms of time difference of updated_at - created_at,

Re: order_by on the basis of time difference (updated_at - created_at)

2022-01-21 Thread Feroz Ahmed
: > is_active = models.BooleanField(default=True) > created_at = models.DateTimeField(auto_now_add=True) > updated_at = models.DateTimeField(auto_now=True) > > > > I want to query on UserModel such that the Query set which I get should be > orderable in terms of time diffe

Re: order_by on the basis of time difference (updated_at - created_at)

2022-01-21 Thread Aadil Rashid
which stores the difference between updated and created. > You can update that field whenever an object is updated. And then can run > order_by on that field directly > > > On Fri, 21 Jan 2022 at 10:24, Aadil Rashid > wrote: > >> class ExampleModel(models.Model): >

Re: order_by on the basis of time difference (updated_at - created_at)

2022-01-21 Thread Lalit Suthar
won't be possible like this, It will be easy if you have another entry in models which stores the difference between updated and created. You can update that field whenever an object is updated. And then can run order_by on that field directly On Fri, 21 Jan 2022 at 10:24, Aadil Rashid

order_by on the basis of time difference (updated_at - created_at)

2022-01-20 Thread Aadil Rashid
class ExampleModel(models.Model): is_active = models.BooleanField(default=True) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) I want to query on UserModel such that the Query set which I get should be orderable in terms of time difference

Order_by on the basis of time difference:

2022-01-20 Thread Aadil Rashid
class UserModel(models.Model): is_active = models.BooleanField(default=True) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) I want to query on UserModel such that the Query set which I get should be orderable in terms of time difference of

Re: What is the difference bulk_update() and update() in django queryset.

2021-08-18 Thread M. GW
bulk_update() is a method that updates the provided list of objects into the database with one query. and update() is just for one object ambiti...@gmail.com schrieb am Donnerstag, 12. August 2021 um 00:03:25 UTC+2: > What is the difference bulk_update() and update() in django query

What is the difference bulk_update() and update() in django queryset.

2021-08-11 Thread Am bition
What is the difference bulk_update() and update() in django queryset. -- 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...@google

Re: What is the difference between virtual environment and normal code in pycharm

2020-03-19 Thread Ravi Prakash
Hi Phoka Thank you! On Thursday, March 19, 2020 at 7:13:33 PM UTC+5:30, Phako Perez wrote: > > Hi Ravi, > > There is no difference, both works same, however when you use the virtual > environment, all the package you install will be available only in that > venv, so

What is the difference between virtual environment and normal code in pycharm

2020-03-19 Thread cosmos multi
Hi ravi. In pycharm the virtual environment is created according to the project you choose, making this a little more automatic, making the installation or updating of packages more friendly, while a normal one is you who chooses what it should have -- You received this message because you ar

Re: What is the difference between virtual environment and normal code in pycharm

2020-03-19 Thread Phako Perez
Hi Ravi, There is no difference, both works same, however when you use the virtual environment, all the package you install will be available only in that venv, so you can create an environment per project and each project will have their own package list, each with their own version. On the

What is the difference between virtual environment and normal code in pycharm

2020-03-19 Thread Ravi Prakash
Hi All What is the difference between the virtual environment and normal code in pycharm? Can you explain, please -- Virtual Clone VirtualTech Outsourcing Services Pvt Ltd  59/B, Plot No. 4, 5 and 6, Nehru Nagar (West) Bhilai, Chhattisgarh - 490 020, India www.virtualclone.in <h

Re: What's the difference between using mariadb as database and using mysql?

2019-03-29 Thread swisstech08
tory. When I use maridb as database, >> what is the difference with mysql? Is there something special that I should >> pay attention to? >> > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Re: What's the difference between using mariadb as database and using mysql?

2019-03-04 Thread Petr B.
just use postgresql четверг, 28 февраля 2019 г., 19:35:03 UTC+7 пользователь x w написал: > > I'm using a Linux distribution called manjaro and mysql has been replaced > with mariabd in the official repository. When I use maridb as database, > what is the difference wit

Re: What's the difference between using mariadb as database and using mysql?

2019-02-28 Thread K Porter
Perhaps the biggest difference is ownership. Mysql is owned by Oracle and, though free, is not considered open source. It was acquired by Oracle in 2010. Its creators felt there was a conflict of interest so they left to start MariaDB. MariaDB is owned by the MariaDB Foundation and is considered

What's the difference between using mariadb as database and using mysql?

2019-02-28 Thread x w
I'm using a Linux distribution called manjaro and mysql has been replaced with mariabd in the official repository. When I use maridb as database, what is the difference with mysql? Is there something special that I should pay attention to? -- You received this message because yo

What is the difference between declaring a middleware in "MIDDLEWARE" setting vs inside ProtocolTypeRouter()?

2019-02-19 Thread Aung Khant
Hello, I am a new user to Django and Channels. As I mentioned, I believe you can infer from the title what I am getting at. Is it because one has to do with Channel and thus different way of using middleware? -- You received this message because you are subscribed to the Google Groups "Django

Re: difference between class based view and function based view

2018-11-22 Thread Jason
Interesting, because I'm the entire opposite because I find myself rewriting lots of code when using FBVs compared to (G)CBVs. And then if one thing changes, that often precipitates a much larger PR than if I were using equivalent classes. There's no magic involved in them, just regular objec

Re: difference between class based view and function based view

2018-11-22 Thread Yavin Aalto Arba
I have long been pondering but never found a > place to write down. ;-) > > Best regards, > Carsten > > > Am 21.11.18 um 21:39 schrieb Andrew Pinkham: > > Django developers talk about three kinds of views: > > > > - function views (FV) > > - cla

Re: difference between class based view and function based view

2018-11-22 Thread Carsten Fuchs
never found a place to write down. ;-) Best regards, Carsten Am 21.11.18 um 21:39 schrieb Andrew Pinkham: Django developers talk about three kinds of views: - function views (FV) - class-based views (CBV) - generic class-based views (GCBV) People do not make always make th

Re: difference between class based view and function based view

2018-11-22 Thread Andréas Kühne
inds of views: > > - function views (FV) > - class-based views (CBV) > - generic class-based views (GCBV) > > People do not make always make the difference between CBV and GCBV, which > is unfortunate, as they serve different purposes (naming things is hard)

Re: difference between class based view and function based view

2018-11-21 Thread Andrew Pinkham
Django developers talk about three kinds of views: - function views (FV) - class-based views (CBV) - generic class-based views (GCBV) People do not make always make the difference between CBV and GCBV, which is unfortunate, as they serve different purposes (naming things

Re: difference between class based view and function based view

2018-11-21 Thread Andréas Kühne
n be re used Inside your application > > Verstuurd vanaf mijn iPhone > > Op 21 nov. 2018 om 18:26 heeft Gear Crew > het volgende geschreven: > > what is difference between class based view and function based view and > which I choose to build full website > > -- > Yo

Re: difference between class based view and function based view

2018-11-21 Thread TimT Vogt
You build webapps with functions And functions You combine in classes So the function can be re used Inside your application Verstuurd vanaf mijn iPhone > Op 21 nov. 2018 om 18:26 heeft Gear Crew het > volgende geschreven: > > what is difference between class based view and fu

difference between class based view and function based view

2018-11-21 Thread Gear Crew
what is difference between class based view and function based view and which I choose to build full 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

Re: difference between id and pk

2018-11-02 Thread Christian Ledermann
should prefer `pk` over `id` for the above reasons On Fri, 2 Nov 2018 at 11:37, amit pant wrote: > I want to know, what is main difference between pk and id on django. > Would appreciate if any one could help me. > Thanks > > -- > You received this message because you are subscr

difference between id and pk

2018-11-02 Thread amit pant
I want to know, what is main difference between pk and id on django. Would appreciate if any one could help me. Thanks -- 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 i

what's the difference between TemplateView, ListView and DetailView ?

2018-09-23 Thread Mateusz
My answer was not fully on the topic. You shouldn't do what you want to do but if there's a real need for that... You can add context by overriding get_context() method. (context = super().get_context(); context['type'] = list; return context). {% if type == list %} This is a list {% elif type

Re: what's the difference between TemplateView, ListView and DetailView ?

2018-09-23 Thread Mateusz
> > Django provides base view classes which will suit a wide range of > applications. All views inherit from the View > > > class, which handles linking the view in to the URLs, HTTP method > di

what's the difference between TemplateView, ListView and DetailView ?

2018-09-23 Thread Gear Crew
I want to know when I use TemplateView , ListView and DetailView on my template code -- 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...@

Re: what is the difference?

2018-09-07 Thread Andréas Kühne
Hi, First of all - the examples you are giving can't be correct. z = Model.objects.get(name=x) will only return 1 object - and will raise an exception if you get more than one result. So in this case z should be an instance of the model Model. z = and cannot be [, ] When querying the second q

what is the difference?

2018-09-07 Thread MikeKJ
[, ] and [[, ]] 1st came from z = Model.objects.get(name=x) This returns the object name 2nd came from z = Model.objects.filter(name=x) The 2nd method when you look for the id for x in z: print(x.id) fails with 'QuerySet' object has no attribute 'id' also tried zz = Model.objects.

Re: find difference of dates between today and filter list[dates]

2018-07-26 Thread Deepak Madan Singh
for _date in dates: > diff = _date - now > print(_date.strftime('%Y%m%d'), diff.days) > if diff.days == 3: > print('Alert @ 3 days!') > > > On Wednesday, 25 July 2018 21:12:54 UTC+2, deepak madan wrote: >> >> HOW to find

Re: find difference of dates between today and filter list[dates]

2018-07-26 Thread Derek
t('Alert @ 3 days!') On Wednesday, 25 July 2018 21:12:54 UTC+2, deepak madan wrote: > > HOW to find the difference between a list of dates and today and find the > difference matches some days difference. Help > -- You received this message because you are subscribed to the Goog

find difference of dates between today and filter list[dates]

2018-07-25 Thread deepak madan
HOW to find the difference between a list of dates and today and find the difference matches some days difference. Help -- 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 i

Re: Why using manage.py command in CLI instead of using django-admin command? what's the difference between them?

2018-07-11 Thread afj afj
sorry for bothering thank you so much ^^. On Thursday, July 12, 2018 at 3:48:57 AM UTC+3, mark wrote: > > > https://www.google.com/search?q=Why+using+manage.py+command+in+CLI+instead+of+using+django-admin+command%3F+what%27s+the+difference+between+them%3F&oq=Why+using+manage.py+c

Re: Why using manage.py command in CLI instead of using django-admin command? what's the difference between them?

2018-07-11 Thread Mark Phillips
https://www.google.com/search?q=Why+using+manage.py+command+in+CLI+instead+of+using+django-admin+command%3F+what%27s+the+difference+between+them%3F&oq=Why+using+manage.py+command+in+CLI+instead+of+using+django-admin+command%3F+what%27s+the+difference+between+them%3F&aq

Why using manage.py command in CLI instead of using django-admin command? what's the difference between them?

2018-07-11 Thread afj afj
--- -- 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 post to this group, send email to django-users@googlegroups.com

Re: calculate the followers difference/grow by day

2018-06-05 Thread James Farris
il.com> wrote: > Hello! > I don't quite understand what you mean by the followers difference by day, > but as that difference by day is not a property of each model tuple, but a > property of a specific day, you can write a view to handle that processing. > Custom model Man

Re: calculate the followers difference/grow by day

2018-06-04 Thread Daniel Germano Travieso
Hello! I don't quite understand what you mean by the followers difference by day, but as that difference by day is not a property of each model tuple, but a property of a specific day, you can write a view to handle that processing. Custom model Managers are used to either add manager metho

calculate the followers difference/grow by day

2018-05-31 Thread João Paulo
Hey guys, I´m using SQLite and trying to calculate the followers difference by day This is my model: class Statistics(models.Model): followers = models.IntegerField() last_update = models.DateTimeField(auto_now_add=True) This are my database rows: "6" "50"

Why is exclude() different than difference()?

2018-02-06 Thread viper12xn
second query returns 98852 rows, as expected: `Abonnent.objects.all().difference(Abonnent.objects.filter(sendungsadresse__redresse__isnull=False, sendungsadresse__redresse__korrigiert_am__isnull=True).distinct())` But I want to be able to keep filtering and that does not work with

Re: Difference

2017-02-15 Thread Luvpreet Singh
YES. Thank you very much for explaining this. On Thursday, February 16, 2017 at 12:20:45 PM UTC+5:30, Michal Petrucha wrote: > > On Wed, Feb 15, 2017 at 12:48:21PM -0800, Luvpreet Singh wrote: > > What is the difference between realted_name and related_query_name ?? > >

Re: Difference

2017-02-15 Thread Michal Petrucha
On Wed, Feb 15, 2017 at 12:48:21PM -0800, Luvpreet Singh wrote: > What is the difference between realted_name and related_query_name ?? One is used as the name of the related manager on the remote side, the other is used to traverse the relationship in queryset filters from the remote side.

Difference

2017-02-15 Thread Luvpreet Singh
What is the difference between realted_name and related_query_name ?? -- 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...@google

Re: Query annotation with date difference

2016-09-04 Thread Peter of the Norse
I would use the DB NOW() function for this.  https://docs.djangoproject.com/en/1.9/ref/models/database-functions/#nowfrom django.db.models.functions import Now.annotate(ratio=(F(‘due_date')-Now())/F('Interval'))On Aug 3, 2016, at 3:34 PM, Constantine Covtushenko

Re: Query annotation with date difference

2016-08-03 Thread Constantine Covtushenko
Sorry, I did not specify. I have been using 'Postgresql' with 'psycopg2 v.2.6.2'. They gave me those results. Also here is a sql query given from log: SELECT "test_app_entity"."id", "test_app_entity"."due_date", "test_app_entity"."interval", (("test_app_entity"."due_date" - '2016-08-03T21:31:58.32

Re: Query annotation with date difference

2016-08-03 Thread Yoann Duriaud
Thanks, unfortunately not so great on my side: I added in the query (forgetting the division for now): .annotate(ratio=ExpressionWrapper(F('due_date')-timezone.now(), DateTimeField())) which leads to the following statement in the query: ("contentstatus"."due_date" - 2016-08-03 21:05:10.7437

Re: Query annotation with date difference

2016-08-02 Thread Constantine Covtushenko
t besides defining the type of the output it is >> unclear how this can be used to perform a date difference operation. >> >> What I would need is to convert *timezone.now()* into a date constant >> that can be understood by the database, whatever the database is. If I >

Re: Query annotation with date difference

2016-08-01 Thread Constantine Covtushenko
ar how this can be used to perform a date difference operation. > > What I would need is to convert *timezone.now()* into a date constant > that can be understood by the database, whatever the database is. If I > leave it as it is, I get the str() conversion, which is meaningless for th

Re: Query annotation with date difference

2016-08-01 Thread Yoann Duriaud
Thanks for the tip, but besides defining the type of the output it is unclear how this can be used to perform a date difference operation. What I would need is to convert *timezone.now()* into a date constant that can be understood by the database, whatever the database is. If I leave it as it

Re: Query annotation with date difference

2016-07-31 Thread Constantine Covtushenko
Hi Yoann, I am not sure exactly but believes you are on the right way. Try improve your expression with ExpressionWrapper, as said here . Probably the problem is that you use values of different types in your

Query annotation with date difference

2016-07-30 Thread Yoann Duriaud
Hello, I would like to annotate a query with the following expression: ([Due Date] - [Now])/[Interval]. [Due Date] and [Interval] are fields from the database, while [Now] should be "equal" to timezone.now(). So this would look like: .annotate(ratio=(F('due_date')-timezone.now())/F('Interval'))

Re: Query and order by time difference of a specified time.

2016-05-23 Thread Fabio C. Barrionuevo da Luz
it would probably be better to use a custom "Func"[1] and a custom "Query Expression" [2] than user QuerySet.extra [1] https://docs.djangoproject.com/en/1.9/ref/models/database-functions [2] https://docs.djangoproject.com/en/1.9/ref/models/expressions/ On Mon, May 23, 2016 at 11:16 AM, Ketan Bh

Query and order by time difference of a specified time.

2016-05-23 Thread Ketan Bhatt
Take a look at the `extra` method of the queryset in Django. It allows you to do what you are trying to do by raw SQL. https://docs.djangoproject.com/en/1.9/ref/models/querysets/#django.db.models.query.QuerySet.extra Check the above link, the example with `annotate` will be interesting for you.

Query and order by time difference of a specified time.

2016-05-23 Thread ap.d...@x76.eu
27;%s',`created`) ) AS timdif FROM myapp_posts f ORDER BY timdif LIMIT 10; The above snippet converts the specified date and field to epoch seconds, subtracts them and then sorts the query according to the difference. Is it possible do this in Django without resorting to raw queries? Thank

Re: MTV and MVC difference

2016-04-19 Thread Javier Guerra Giraldez
On 19 April 2016 at 12:53, Mukul Chakravarty wrote: > What is the difference between Models in django MTV architecture and Models > in rails MVC architecture ? IMNSHO, mostly about the realization that "controller" (as defined in the original, GUI-oriented formulation of MVC

MTV and MVC difference

2016-04-19 Thread Mukul Chakravarty
What is the difference between Models in django MTV architecture and Models in rails MVC architecture ? -- 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

Re: Performance difference between django query and stored procedure (MySQL)?

2016-01-08 Thread Sergiy Khohlov
the db and the calculations > would have to be done in python ... etc. What's the difference in > performance between a django query and a store procedure called from django? > > -- > You received this message because you are subscribed to the Google Groups > "Django

Performance difference between django query and stored procedure (MySQL)?

2016-01-08 Thread Maor Levy
he calculations would have to be done in python ... etc. What's the difference in performance between a django query and a store procedure called from django? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this g

Difference between Q and filter and exclude

2014-12-23 Thread Anssi Kääriäinen
These queries should be equivalent. - Anssi -- 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 post to this group, s

Difference between Q and filter and exclude

2014-12-22 Thread Larry Martell
Is there any difference, either functional or performance wise, between these 2 constructs: Q(f=1) and filter(f=1) Or, between these 2: (~Q(f=1)) and exclude(f=1) -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

Re: HttpResponse methods difference

2014-08-28 Thread Collin Anderson
It's the same as python file objects write sends data to the response flush makes sure the data you wrote is actually getting sent out, not just buffered for alter tell tells you how much data you've read or written. is where are you in the "file" https://docs.python.org/3/library/io.html -- Yo

Re: HttpResponse methods difference

2014-08-28 Thread marc
rstag, 28. August 2014 02:48:16 UTC+2 schrieb Yarick Antonov: > > What the difference between HttpResponse.Write() > <https://docs.djangoproject.com/en/1.6/ref/request-response/#django.http.HttpResponse.write>, > > HttpResponse.flush() > <https://docs.djangopro

HttpResponse methods difference

2014-08-27 Thread Yarick Antonov
What the difference between HttpResponse.Write() <https://docs.djangoproject.com/en/1.6/ref/request-response/#django.http.HttpResponse.write>, HttpResponse.flush() <https://docs.djangoproject.com/en/1.6/ref/request-response/#django.http.HttpResponse.flush> and HttpResponse.te

Re: What is the difference between running manage.py and ./manage.py?

2014-08-04 Thread Malik Rumi
ing the default file association > (.py is python usually). > > The ./ bit indicates "look in the folder we are in" - if the file is > not in the folder you run it from, you will need to use the full path. > > In other words, the difference is merely one of execution, b

Re: What is the difference between running manage.py and ./manage.py?

2014-08-03 Thread Javier Guerra Giraldez
On Sun, Aug 3, 2014 at 9:03 PM, Malik Rumi wrote: > Is this a Linux thing? on it's about the PATH variable. it's usually considered less safe to include '.' (the current directory) in PATH. Of course, that doesn't stop MS to put it right in the head of the default PATH value. -- Javier --

Re: What is the difference between running manage.py and ./manage.py?

2014-08-03 Thread Lachlan Musicman
the file is not in the folder you run it from, you will need to use the full path. In other words, the difference is merely one of execution, both give the same result, since it's two ways of doing the same thing. cheers L. On 4 August 2014 12:03, Malik Rumi wrote: > Is this a Linux thing

What is the difference between running manage.py and ./manage.py?

2014-08-03 Thread Malik Rumi
Is this a Linux thing? -- 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 post to this group, send email to django-use

Django makemigrate not recognizing difference between settings.AUTH_USER_MODEL and auth.User

2014-03-17 Thread Siddhartha R T
I recently upgraded my Django version to 1.6.2, and I ran into the following problem: I was extending the auth.AbstractUser class, and I did the following: #node/models.py class Person(AbstractUser): dept = models.ManyToManyField(Department) #settings.py AUTH_USER_MODEL

Re: Difference between signals and celery

2013-12-01 Thread fchow
ng.* > > Will someone please explain to me of what celery is? What's the difference > between these two and when to use them? Will be much appreciated! Thank you. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsub

Re: Difference between signals and celery

2013-12-01 Thread Robin Lery
t 11:52 AM, Robin Lery wrote: >>> >>>> This may be a lame question, but I am really confused with these two. I >>>> know *signals* are used to do some task when something has happened. >>>> But what about celery? In the documentation it says: >>>

Re: Difference between signals and celery

2013-11-30 Thread Avraham Serour
cumentation it says: >>> >>> *Celery is an asynchronous task queue/job queue based on distributed >>> message passing.* >>> >>> Will someone please explain to me of what celery is? What's the >>> difference between these two and when to

Re: Difference between signals and celery

2013-11-30 Thread Robin Lery
? In the documentation it says: >> >> *Celery is an asynchronous task queue/job queue based on distributed >> message passing.* >> >> Will someone please explain to me of what celery is? What's the >> difference between these two and when to use them? Will be m

Re: Difference between signals and celery

2013-11-29 Thread Carlos Daniel Ruvalcaba Valenzuela
tation it says: > > *Celery is an asynchronous task queue/job queue based on distributed > message passing.* > > Will someone please explain to me of what celery is? What's the difference > between these two and when to use them? Will be much appreciated! Thank you. > >

Re: Difference between signals and celery

2013-11-29 Thread Nevio Vesic
The easiest answer I could give is that django signals are like hooks. Something you wish to preform AFTER or BEFORE some model action. Like you wish to adjust account balance on model save. Than you would use post_save builtin django signal. Celery is here to handle task in background. Like you w

Difference between signals and celery

2013-11-29 Thread Robin Lery
someone please explain to me of what celery is? What's the difference between these two and when to use them? Will be much appreciated! Thank you. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and

Re: django difference between - one to one, many to one and many to many

2013-10-30 Thread Aamu Padi
Thank you! That did helped. On Tuesday, October 29, 2013 12:36:20 AM UTC+5:30, Aamu Padi wrote: > > So, this is my first time learning computer language. And I chose python > and django. Now, I got many of the basic concepts of python and also > django. I can create new page with the views and a

Re: django difference between - one to one, many to one and many to many

2013-10-29 Thread Sandeep kaur
On Tue, Oct 29, 2013 at 12:36 AM, Aamu Padi wrote: > > So, this is my first time learning computer language. And I chose python and django. Now, I got many of the basic concepts of python and also django. I can create new page with the views and all other stuff. But I am still confused with the re

Re: django difference between - one to one, many to one and many to many

2013-10-29 Thread Aamu Padi
Thank you so much! I will look into that! :) On Tuesday, October 29, 2013 1:37:37 AM UTC+5:30, C. Kirby wrote: > > Those concepts are actually RDBMS (Database) ideas. You would probably be > better off reading up on those. This looks to be a pretty good explanation: > > http://net.tutsplus.com/tu

Re: What's the difference between assertIn and assertContains?

2013-10-28 Thread Simon Charette
ient.get(url) > self.assertEqual(resp.status_code, 200) > *self.assertIn*(w.rosword, resp.content) # What's the difference > between ># assertIn > and assertContains? > #self.assertC

What's the difference between assertIn and assertContains?

2013-10-28 Thread Pepsodent Cola
# List word def test_VIEW_Index_WORD_List_word(self): w = self.create_word() url = reverse('navi_polls:index') resp = self.client.get(url) self.assertEqual(resp.status_code, 200) *self.assertIn*(w.rosword, resp.content) # What's

Re: django difference between - one to one, many to one and many to many

2013-10-28 Thread C. Kirby
Those concepts are actually RDBMS (Database) ideas. You would probably be better off reading up on those. This looks to be a pretty good explanation: http://net.tutsplus.com/tutorials/databases/sql-for-beginners-part-3-database-relationships/ On Monday, October 28, 2013 2:06:20 PM UTC-5, Aamu Pa

django difference between - one to one, many to one and many to many

2013-10-28 Thread Aamu Padi
So, this is my first time learning computer language. And I chose python and django. Now, I got many of the basic concepts of python and also django. I can create new page with the views and all other stuff. But I am still confused with the relations, i.e. one to one, many to one, and many t

Re: difference in datetime aggregation when using sqlite3 instead of mysql

2013-10-26 Thread Wesley George
makes this field a string, while the > mysql backend makes this field a datetime object. I've put a minimal django > app at github (here) that exemplifies this difference on my setup, Django > 1.5.1, python 2.7.4, Ubuntu 13.04. > > > > I know there are situations where th

Re: difference in datetime aggregation when using sqlite3 instead of mysql

2013-10-26 Thread Ramiro Morales
imal django app at github (here) that > exemplifies this difference on my setup, Django 1.5.1, python 2.7.4, Ubuntu > 13.04. > > I know there are situations where these backends will behave differently, I > took the above aggregation operation to be basic enough that this shouldn't &g

Re: difference in datetime aggregation when using sqlite3 instead of mysql

2013-10-26 Thread Avraham Serour
while the mysql backend makes > this field a datetime object. I've put a minimal django app at github ( > here <https://github.com/wxgeorge/django-db-backend-divergence>) that > exemplifies this difference on my setup, Django 1.5.1, python 2.7.4, Ubuntu > 13.04. >

difference in datetime aggregation when using sqlite3 instead of mysql

2013-10-26 Thread Wesley George
exemplifies this difference on my setup, Django 1.5.1, python 2.7.4, Ubuntu 13.04. I know there are situations where these backends will behave differently, I took the above aggregation operation to be basic enough that this shouldn't be such a situation. The django docs on dat

Re: [Deployment + Apache2] difference between development server & production server

2013-09-18 Thread Karl Arunachal
Its always a pleasure. Have fun coding! On Mon, Sep 16, 2013 at 11:20 PM, hung david wrote: > > > On Monday, September 16, 2013 2:05:56 AM UTC+7, Kakar wrote: >> >> I dont know what you actually mean, but I think just by passing the url >> that you have created in the urls.py, which points to th

Re: [Deployment + Apache2] difference between development server & production server

2013-09-16 Thread hung david
On Monday, September 16, 2013 2:05:56 AM UTC+7, Kakar wrote: > > I dont know what you actually mean, but I think just by passing the url > that you have created in the urls.py, which points to the function you have > defined in ur views.py should work. > > > Yes you are right Kakar. I've figure

  1   2   >