Re: Check all foreign keys before delete.

2011-03-25 Thread Jani Tiainen
age" without it > effecting and other records in the database. And if you're lucky and running 1.3 version you have new option on on_delete actions that can do it autogically. -- Jani Tiainen -- You received this message because you are subscribed to the Google Groups "

Re: Desired: Field behavior like AutoField + unique_with

2015-01-13 Thread Jani Tiainen
I've done something similiar. Only way to do that is that you need to upkeep that tenant sequence_id manually, So doing something like: class Tenant(models.Model): name = models.CharField(max_length=50) sequence_value = models.IntegerField() and in a code: tenant = Tenant.object.get(id

Re: Desired: Field behavior like AutoField + unique_with

2015-01-13 Thread Jani Tiainen
pattern. If I could keep all the book-keeping on the model with > the constraint, that seems cleaner to me. But, of course, I'm not > willing to pay a huge performance or corruption penalty just for > vague ideological purity :) > > Thanks again! > ~matt > > On Tue

Re: Processing uploaded csv on the basis of user input

2015-01-15 Thread Jani Tiainen
groups.com. To post to this group, > send email to django-users@googlegroups.com. Visit this group at > http://groups.google.com/group/django-users. To view this discussion > on the web visit > https://groups.google.com/d/msgid/django-users/c5acdad9-eb00-438a-bf37-faf7a66a82a5%40googlegroups.com. >

Re: Django with ExtJs, any app ?

2015-01-22 Thread Jani Tiainen
Hi, Easier on what sense? I've had great success with django-rest-framework and ExtJS as is for a long time, without need to have an app to do anything for me. On Thu, 22 Jan 2015 13:17:09 -0200 Fellipe Henrique wrote: > Hello, > > There's any app to make easier manipulate data using Django a

Re: django select extremely slow on large table

2015-01-22 Thread Jani Tiainen
Hi, 1.5b rows is rather big data. Could you test what .values() or .values_list() produces in terms of speed. also print qs might actually pull in all selected records in Python memory so it may take a while to constuct bunch of objects. On Thu, 22 Jan 2015 07:32:36 -0800 (PST) Joris Benschop

Re: django select extremely slow on large table

2015-01-23 Thread Jani Tiainen
implicit data type conversions things tend to get sideways. -- Jani Tiainen -- 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...@googl

Re: django select extremely slow on large table

2015-01-23 Thread Jani Tiainen
options, visit https://groups.google.com/d/optout. It's pretty much impossible without writing custom backend or magical monkey patching. In upcoming 1.8 or 1.9 is possible to write custom translators that could help. If I were you I most probably would resort with fast version of raw query for now a

Re: django select extremely slow on large table

2015-01-23 Thread Jani Tiainen
field type? You could try explicit cast to VARCHAR2, not sure does that help at all: x=Marker.objects.raw("SELECT * from PROD_SCHEMA.MARKER WHERE MARKID=CAST(%s AS VARCHAR2)",[u'TO1']) -- Jani Tiainen -- You received this message because you are subscribed to the Googl

Re: Tests and temp tables

2015-02-05 Thread Jani Tiainen
tions as a no-op), you should use TransactionalTestCase. https://docs.djangoproject.com/en/1.7/topics/testing/tools/#transactiontestcase -- Jani Tiainen -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receivi

Re: drop-in replacement for admin module foreign key relation UI

2015-02-16 Thread Jani Tiainen
this, but I was > just wondering if anyone would have up-to-date recommendations in this > mailing list. I'm on Python 3.4.2 and Django 1.7.4. I would start with built-in implementation, a.k.a. rawid_id_fields <https://docs.djangoproject.com/en/1.7/ref/contrib/admin/#django.contrib.admin.Mode

Re: Seems like a geodjango bug with multiple databases

2015-02-20 Thread Jani Tiainen
not exist. > > The thing is, if I create a hotel record on database issue1 with id of 9 > then the last command works, so I guess it tried to look up in default > database. This doesn't have any problems if I use default manager for > Hotel, so I guess it's a bug? >

Re: view queryset object in admin view

2015-04-13 Thread Jani Tiainen
django-users. > >> To view this discussion on the web visit > >> https://groups.google.com/d/msgid/django-users/61ec8171-77c5-4bba-9274-8f209422d15e%40googlegroups.com > >> > >> <https://groups.google.com/d/msgid/django-users/61ec8171-77c5-4bba-9274-8f209422

Re: Serialize QuerySet Q (not the result)

2015-04-22 Thread Jani Tiainen
>> To post to this group, send email to django...@googlegroups.com > >> . > >> Visit this group at http://groups.google.com/group/django-users. > >> To view this discussion on the web visit > >> https://groups.google.com/d/msgid/django-users/a8cc7fc6-4969-

Re: Sending Data from client side(another computer) to Django(my computer) using Socket library

2015-05-11 Thread Jani Tiainen
le.com/d/msgid/django-users/CACwh%3D0zjAYKjmyTJTWcucTyLM_iVaLokcgqREZpXgzp7e_GEGw%40mail.gmail.com?utm_medium=email&utm_source=footer> > >> . > >> For more options, visit https://groups.google.com/d/optout. > >> > > > > -- > > You received this message because y

Re: Django vs ExtJS

2015-06-08 Thread Jani Tiainen
groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/53e17853-9922-4f77-bf9a-4cea7d35ade3%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- Jani Tiainen -- You received this me

Re: Django vs ExtJS

2015-06-08 Thread Jani Tiainen
F. And we, as our customers have been really happy with the choise. It's cheaper for our customers, and cheaper for us to develop. One problem, as you noted as well, is to hire Python and Django pros. -- Jani Tiainen -- You received this message because you are subscribed to the Google Grou

Re: Install Django Apps via Admin Interface

2014-09-12 Thread Jani Tiainen
you would expect that to happen just through admin? Would you trust your users really to do all that - basically giving full control what users installs to your system without discretion? -- Jani Tiainen On Fri, 12 Sep 2014 11:26:56 +0200 Thomas Güttler wrote: > > > Am 10.09.20

Re: Is there anything similar to phpmyadmin

2014-09-23 Thread Jani Tiainen
I personally like DBeaver, since it can handle several types of DBMSes out of the box. And it's free. There are prebuilt packages for pretty much any major os/distribution. On Mon, 22 Sep 2014 19:37:26 -0700 (PDT) Yuan-Liang Tang wrote: > Thanks, but I'd like to use something open and free ;-)

Re: query join tables

2014-10-13 Thread Jani Tiainen
rage reverse relation managers rather easily: If you do have a person available already you can do the following: choices_for_person_on_date = person.choice_set.filter(date=dater) -- Jani Tiainen -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Django: How to apply filter on geometry type using GeoDjango QuerySet

2014-10-14 Thread Jani Tiainen
gt; You can't, at least not with current Django versions. Geodjango assumes that geometry column contains just one type of a geometries. But you should be able to use .raw() query to get what you want to. -- Jani Tiainen -- You received this message because you are subscribed to the

Re: Run some code after Model Save completes (and after database is updated)

2014-10-15 Thread Jani Tiainen
tely updated after save has completed and post_save signal is fired. One thing that may interfere at least MySQL uses "repeatable read" (default) transcation isolation level meaning that select will return db state when transaction opened. Changing isolation to "read committed" sho

Re: Need help with unique_together - on ForeignKey and Boolean field

2014-11-17 Thread Jani Tiainen
h "is_default_image" must be unique. Which means that for each product you can have _two_ images, one where is_default_image is true and one where is_default_image is false. And this is forced on database level as well. But apparently that is what you intended to do. There isn

Re: Error: 'NoneType' object has no attribute 'strip'

2014-12-01 Thread Jani Tiainen
;name') then it works fine. > So, can someone tell me what is the issue here? How are you trying to set data and trying to save to database (used commands would be helpful) -- Jani Tiainen -- You received this message because you are subscribed to the Google Groups "Django users&

Re: Error: 'NoneType' object has no attribute 'strip'

2014-12-01 Thread Jani Tiainen
atible with your version of Django? -- Jani Tiainen -- 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 pos

Re: django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet.

2014-12-23 Thread Jani Tiainen
me of a CampaignTemp model. So if you change active status of modules they're not reflected to that list. You need to provide more context of your model so we can help with proper solution. -- Jani Tiainen -- You received this message because you are subscribed to the Google Groups &

Re: Django vs ExtJS

2014-12-30 Thread Jani Tiainen
guration. Python is much more forgiving in those parts. Of course we've ran a few issues on the road, like composite keys and some "oo" features of Django ORM that were possible with Hibernate. So current main setup in our development stack is Python (2.7), Django (1.5), Oracle (10g

Re: Expected performance of the django development server?

2015-01-04 Thread Jani Tiainen
he database with separate query. For example if you have a model that contains 4 foreign keys and you query 100 instances (rows) you would actually invoke 1 + 4 * n queries, which in example case would be 401. Without actually knowning your code one of the first options you usually do to optimi

Re: django and oracle

2014-05-14 Thread Jani Tiainen
7.3cx_Oracle 5.1.2 > You're seeing that error because cursor returned from Django connection is not actually cx_Oracle cursor but a wrapper that has similar methods. That is done to overcome different binding variable types and to use %s (oracle uses :name format) You should be able to get

Re: django and oracle

2014-05-14 Thread Jani Tiainen
On Thu, 15 May 2014 07:02:08 +0300 Jani Tiainen wrote: > On Wed, 14 May 2014 07:54:58 -0700 (PDT) > "J. D." wrote: > > > Can someone help me with cx_Oracle and Django?! :) > > > > I have Oracle DB 11.2 with many PLSQL-procedures in it that return curso

Re: django and oracle

2014-05-16 Thread Jani Tiainen
sorry about that. It seems that connection attribute is only populated when you have connection opened for something. So you have to do initial dummy stuff: connection.cursor() # Opens connection curs = connection.connection.cursor() # Get raw cursor Or, alternatively as a one liner: curs =

Re: ASP .NET web service and Django

2014-05-26 Thread Jani Tiainen
You might be interested in suds library, it's basically lightweight SOAP stuff, it may work or it may not. All depends quality of WSDL you do have. And to my knowledge getting Django to run on IronPython requires some hacks... On Mon, 26 May 2014 04:09:19 -0700 (PDT) shar100101 wrote: > Unfort

Re: HELP WITH THIS CODE!!

2017-10-20 Thread Jani Tiainen
Hi. As pointed out, your code isn't Django related. If you feel that official Django tutorial isn't explaining things in-depth Django girls do have excellent tutorial. https://tutorial.djangogirls.org/en/ 20.10.2017 0.00 "Giovanny ordoñez" kirjoitti: > >

Re: How to store a key to a something that can be either a person or an organization?

2017-10-20 Thread Jani Tiainen
Hi. I've resolved such a case with two nullable fkeys and a discriminator field to tell which one fkey is used. 20.10.2017 12.59 "Antonis Christofides" kirjoitti: Hello, Two real examples that I've faced: class MeteorologicalStation(models.Model): ... owner = models.Foreig

Re: How to store a key to a something that can be either a person or an organization?

2017-10-20 Thread Jani Tiainen
I would be a bit cautious with generic foreignkeys since they don’t provide database integrity checks. IOW, you can break your data very easily. > On 20 Oct 2017, at 19.55, Ruben Alves wrote: > > You can use Generic Key: > https://docs.djangoproject.com/en/1.11/ref/contrib/contenttypes/ >

Re: Simple file uploading app

2017-10-25 Thread Jani Tiainen
Hi. I did simple pic uploader while ago. Source code is available at https://github.com/jtiai/picpaster 25.10.2017 5.58 ip. "guettli" kirjoitti: > I need a simple file uploading app. > > Every user should be able to upload files to his own area. > > This is the basic feature. You could think o

Re: Possible Bug Regarding model choices and form hidden input?

2017-10-28 Thread Jani Tiainen
Hi. Unfortunately 1.7 is unsupported version. You should test with 1.11 to see if issue still exist. 28.10.2017 18.03 "Paul Kenjora" kirjoitti: > *I use: * > > Django version 1.7.0 - I know I know :) > > Python 2.7.13 > > - Paul > > On Sat, Oct 28, 2017 at 6:01 AM, Etienne Robillard >

Re: return jwt token as json

2017-10-29 Thread Jani Tiainen
As a simplest possible form you can pass jwt as s string: "Xxx.yyyhgg.cxxch" 29.10.2017 19.33 "Rakhee Menon" kirjoitti: > Unable to send jwt token as json response > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from th

Re: Pulling data from database

2017-11-02 Thread Jani Tiainen
64ab175d-4897-42ba-8f84-fa3778791226%40googlegroups.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- Jani Tiainen -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscr

Re: return jwt token as json

2017-11-03 Thread Jani Tiainen
According to pyjwt docs it can be either datetime object or number (unix epoch) https://pyjwt.readthedocs.io/en/latest/usage.html#expiration-time-claim-exp 3.11.2017 9.37 "James Schneider" kirjoitti: > > > On Oct 31, 2017 4:36 AM, "Rakhee Menon" wrote: > > > > class Login(APIView): > >def

Re: Connection refused in Django-Project

2017-11-04 Thread Jani Tiainen
Hi. Quite hard to tell exactly what happens but looks like there is issued HTTP POST message to some url which returns connetion refused error. You should consult that project help channels for better help. 4.11.2017 19.01 "'bastil2001' via Django users" < django-users@googlegroups.com> kirjoit

Re: Exception Value: UNIQUE constraint failed: accounts_profile.user_id

2017-11-04 Thread Jani Tiainen
Hi. Using formset to handle profile is a bit incorrect solution. See http://musings.tinbrain.net/blog/2015/jun/10/updating-two-models-single-post/ for proper solution. 5.11.2017 0.01 "Luiz Guilherme Schiefler de Arruda" kirjoitti: > Hello folks, > > I'm studying Django and everything was ok un

Re: Problems with dumpdata/loaddata

2017-11-06 Thread Jani Tiainen
Hi. Maybe it would be useful to create ticket to document this behavior in Django documentation. 6.11.2017 8.21 ip. "Matthijs Kooijman" kirjoitti: > Hey folks, > > I'm replying to an old thread about a problem with "manage.py loaddata" > generating a BOM (byte-order-mark) that "manage.py dumpda

Re: Disable Auth on Django Application.

2017-11-13 Thread Jani Tiainen
go-users/f545da68-40ce-4c1d-b76c-68e5a3890255%40googlegroups.com <https://groups.google.com/d/msgid/django-users/f545da68-40ce-4c1d-b76c-68e5a3890255%40googlegroups.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- Jani Tiainen -- You

Re: Limit a view to superuser only

2017-11-19 Thread Jani Tiainen
Hi. Could you paste the full traceback here because having an OSError sounds like there is is something else wrong in your system. > On 19 Nov 2017, at 15.22, yingi keme wrote: > > I have a function that i want to be accessed only if the user is a supersuser. > > I have tried this > > from d

Re: [ORM Foreign Keys][Performance] How to use Charfield Foreign Keys efficiently?

2017-11-21 Thread Jani Tiainen
go-users/CAFWa6tKd-c9bUn5qSv9hFQvPSvVVyqOi1GpOWYQWz2uzL52h%2Bg%40mail.gmail.com <https://groups.google.com/d/msgid/django-users/CAFWa6tKd-c9bUn5qSv9hFQvPSvVVyqOi1GpOWYQWz2uzL52h%2Bg%40mail.gmail.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- J

Re: Wants to make webpage auto reload whenever database is update.

2017-11-26 Thread Jani Tiainen
Hi. You probably could use ajax to poll data and only update visual parts instead of reloading whole page. 26.11.2017 7.21 "Unnati C" kirjoitti: > Thanks for suggestion Yingi Kem, But I am looking for any javascript or > any other logical solution to refresh my web page automatically. > > Unnat

Re: Does django work with bootstrap 4

2017-11-28 Thread Jani Tiainen
ve to learn the whole ruby stuf -- Jani Tiainen -- 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

Re: Enable https for a production django application

2017-12-04 Thread Jani Tiainen
/django-users/16075809-a4f6-4174-b9a3-a545ade434ef%40googlegroups.com <https://groups.google.com/d/msgid/django-users/16075809-a4f6-4174-b9a3-a545ade434ef%40googlegroups.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- Jani Tiain

Re: Enable https for a production django application

2017-12-04 Thread Jani Tiainen
icate? Any links on that would be helpful. Thanks, Bijal On Monday, December 4, 2017 at 1:36:35 PM UTC+5:30, Jani Tiainen wrote: Hi, You just need to redirect (permanently) all traffic to port 80 to 443 in your Apache config. On 4.12.2017 10.03, BIJAL MANIAR wrote: Hello,

Re: Django groups and specialpermissions

2017-12-07 Thread Jani Tiainen
Hi. There isn't anything built in to satisfy your needs but you can easily create such a mechanism with few models and helper funcs or methods. 7.12.2017 18.17 "mounikesh mintu" kirjoitti: > Can any one guide me in this is there any way to create django groups > where there should be a group a

Re: help me

2017-12-07 Thread Jani Tiainen
Hi. As pointed out do the official tutorial. If you feel that it's too short or doesn't explain things in depth Django Girls do have excellent tutorial. https://tutorial.djangogirls.org/en/ 8.12.2017 2.35 "kalla giga" kirjoitti: > help me with the basic of django > > -- > You received this mess

Re: Django 1.11

2017-12-10 Thread Jani Tiainen
Hi. Please do the official tutorial first to get hang of Django concepts. https://docs.djangoproject.com/en/1.11/intro/tutorial01/ If you feel that official tutorial is too packed Django Girls do have excellent tutorial. https://tutorial.djangogirls.org/en/ 10.12.2017 5.58 "minh quang" kirjoitt

Re: unable to combine two forms in a single form

2017-12-12 Thread Jani Tiainen
le.com/d/msgid/django-users/9b90171c-a7e2-4825-b063-88d990ddb44e%40googlegroups.com <https://groups.google.com/d/msgid/django-users/9b90171c-a7e2-4825-b063-88d990ddb44e%40googlegroups.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout.

Re: can't create app in putty

2017-12-13 Thread Jani Tiainen
b visit https://groups.google.com/d/msgid/django-users/3cf5b8f8-dcdc-4827-9af6-0878fb33ce22%40googlegroups.com <https://groups.google.com/d/msgid/django-users/3cf5b8f8-dcdc-4827-9af6-0878fb33ce22%40googlegroups.com?utm_medium=email&utm_source=footer>. For more options, visit https://grou

Re: Django on windows 10 and tomcat

2017-12-13 Thread Jani Tiainen
Hi. Django is Pyhton webframework so deploying to Tomcat which is Java webapp runner mighy not work at all. 14.12.2017 0.31 "Arnap" kirjoitti: > Am new to django and developing champion windows to be deployed in to cat, > but getting error while deploying .war in tomcat6. Error is: > cannot loa

Re: Model Design Questions

2017-12-17 Thread Jani Tiainen
Hi, As suggested using Postgres as a database backend would give you first class support for JSON field with ability to query by attributes in JSON data. See https://docs.djangoproject.com/en/2.0/ref/contrib/postgres/fields/#jsonfield for more info. 17.12.2017 2.46 "Mark Phillips" kirjoitti:

Re: Django editable pdfs

2017-12-17 Thread Jani Tiainen
Hi, You don't need to do that. You can have your form as is just return PDF as a response. You can choose what ever library you want to generate PDF files. My personal favourite is wkhtmltopdf. 16.12.2017 18.01 "chaitanya.creator" kirjoitti: > Hey I want to convert my forms into editable PDF f

Re: how can i add django in to cpanel

2017-12-17 Thread Jani Tiainen
Hi. Your request doesn't make sense. Django is a web framework written in Python to build dynamic websites. You write actual Python code where you use Django to solve common problems in web applications. 16.12.2017 18.01 "Rupam Bumba" kirjoitti: > i want to use djndo as my website > > -- > Y

Re: How do I know what version a patch is included in?

2017-12-20 Thread Jani Tiainen
Hi. Usually when ticket is closed there is a pointer to changeset which fixed the issue. When you look the changeset it should also contain a list of tags that are in effect in that changeset. By looking that ticket it was fixed in master branch and then backported to 2.0.x branch. In this case

Re: How do I know what version a patch is included in?

2017-12-21 Thread Jani Tiainen
trade-offs, > which then become business decisions etc...) > > > > On Wed, Dec 20, 2017 at 8:11 PM, Jani Tiainen wrote: > >> Hi. >> >> Usually when ticket is closed there is a pointer to changeset which fixed >> the issue. When you look the changeset it sho

Re: django admin code modification

2017-12-24 Thread Jani Tiainen
Hi. It would be helpful to know what changes you're after. Admin is designed to be datacentric view to your models. Trying to make admin something more is quite a job. That's why there exists generic class based views. They allow to create much more flexible views and incorporate for example bus

Re: django admin code modification

2017-12-25 Thread Jani Tiainen
Hi, Generic views are documented at https://docs.djangoproject.com/en/2.0/topics/class-based-views/ 24.12.2017 22.40 "Carl Brubaker" kirjoitti: > I am trying to make a customer database (name, address, etc) and I need to > be able to add new customers, edit customer info, delete customers, and

Re: Possible bug: OutputWrapper: TypeError: write() argument must be str, not bytes

2017-12-29 Thread Jani Tiainen
Hi, As pointed out problem is not Django but that third party package that tries to output data as bytes but Django expects to have string instead. First make sure that 3rd party app works with Django version you're using. If not you need to contact that 3rd party app developers to fix the actual

Re: Django: text, font, and style

2018-01-01 Thread Jani Tiainen
Hi. By default all strings processed through Django templating language are considered as unsafe. IOW all strings gets HTML escaped properly. To get around that you can either use safe filter or declare particular string as a safe in a view. 1.1.2018 20.47 "Malik Rumi" kirjoitti: > Apparently

Re: Handling Celery Connection Lost Problem

2018-01-03 Thread Jani Tiainen
Hi. Trying to add task without running messaging backend (rabbitmq) should be consistently throwing out errors. Since it is not a django problem I suggest that you reach celery support channels for better responses. 3.1.2018 11.26 "Mukul Mantosh" kirjoitti: > *I'm not sure about understanding

Re: Write custom on delete Cascade

2018-01-03 Thread Jani Tiainen
Hi You need to get all reverse related fields using model meta API. If you want to make custom on_delete action see how CASCADE is made at https://github.com/django/django/blob/2cb6b7732dc7b172797cebb1e8f19be2de89e264/django/db/models/deletion.py#L14 3.1.2018 14.03 kirjoitti: Hi, How to get a

Re: Django storing byte string for image

2018-01-03 Thread Jani Tiainen
Hi, In general it is considered very bad practice to store files in database. Could you please tell why you need to store files to database instead of normal filesystem? 3.1.2018 14.03 kirjoitti: > What field should i use to store byte string so that i can later use it > for ByteIO to convert

Re: How to delete all the objects which are referring the current object without DELETE_CASCADE

2018-01-03 Thread Jani Tiainen
Hi, As I posted on other thread you can do that using meta api. But why you want to do that manually. DELETE_CASCADE does the same thing exactly. 3.1.2018 14.03 kirjoitti: > How to delete all the objects which are referring the current object > without DELETE_CASCADE > > -- > You received this

Re: Wich OS for develop?

2018-01-03 Thread Jani Tiainen
Hi, There are also alternative ways to do development. Personally I use PyCharm Pro on a windows and osx with docker. That way my whole chain of development happens with consistent environments (within containers) and pretty much eliminates "works for me" issues. PyCharm also does have excellen

Re: Handling Celery Connection Lost Problem

2018-01-05 Thread Jani Tiainen
Hi, This is not really Django issue at all. You should contact celery/rabbitmq support channels to get help with building high availability messaging backend. 5.1.2018 13.36 "Mukul Mantosh" kirjoitti: > > @Matemática A3K > > *If you restart rabbitmq at this point, does it works? * > > After re

Re: Failing to configure Django correctlly (conflict in settings between models.py and manage.py usage).

2018-01-05 Thread Jani Tiainen
t;>>>> >>>>> ImportError: No module named MY_DJANGO.settings >>>>> >>>>> >>>>> >>>>> >>>>> and if I use 'my_django' in INSTALLED_APPS then I have an import >>>>> error whi

Re: How to make a place where you could type in data(number)?

2018-01-05 Thread Jani Tiainen
groups.com > <https://groups.google.com/d/msgid/django-users/f177be88-4911-4e9d-ac8e-66565aff3d32%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Jani Tiainen - Well planned is half done,

Re: Failing to configure Django correctlly (conflict in settings between models.py and manage.py usage).

2018-01-05 Thread Jani Tiainen
gt;>>>> >>>>>> >>>>>> >>>>>> and if I use 'my_django' in INSTALLED_APPS then I have an import >>>>>> error while importing models: >>>>>> >>>>>> from MY_DJANGO.my_django import

Re: Failing to configure Django correctlly (conflict in settings between models.py and manage.py usage).

2018-01-05 Thread Jani Tiainen
s', >>>>>>> 'django.contrib.staticfiles', >>>>>>> 'django.contrib.sites', >>>>>>> 'django.contrib.admindocs', >>>>>>> >>>>>>> ==>>>&g

Re: Django User module extend

2018-01-05 Thread Jani Tiainen
le.com/d/ > msgid/django-users/810439c8-6515-4dc6-808d-643b0f1e38d0%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/810439c8-6515-4dc6-808d-643b0f1e38d0%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.

Re: Converting Timezone-Naive Project to Timezone-Aware?

2018-01-05 Thread Jani Tiainen
s/ed0ea6fb-17ba-4f46-9122-4c97f463ec6b%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/ed0ea6fb-17ba-4f46-9122-4c97f463ec6b%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Jan

Re: Links to files

2018-01-06 Thread Jani Tiainen
s://groups.google.com/d/msgid/django-users/dcd1a1fc-3aac-4562-a8c3-159b846a44c0%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Jani Tiainen - Well planned is half done, and a half done has been suffic

Re: Select random blog post Object from "Post" Model and render In View/Template

2018-01-07 Thread Jani Tiainen
Hi. Since you do have show post url, I would create random view just to redirect to show post view with random post id. 7.1.2018 5.49 ap. "Ronnie Raney" kirjoitti: > Greetings! My first time using this forum. Using Django 2.0 for a project. > I'm a beginner so I appreciate your patience. > > I

Re: MongoDB and Django

2018-01-07 Thread Jani Tiainen
dLEq_0P6VVH5JFngcain%3Dw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Jani Tiainen - Well planned is half done, and a half done has been sufficient before... -- You received this message because you

Re: How do I use Django to execute PostGIS query to get polygons within four points?

2018-01-07 Thread Jani Tiainen
t https://groups.google.com/d/ > msgid/django-users/aac95827-0c79-4aef-84cf-646ca82cfffa%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/aac95827-0c79-4aef-84cf-646ca82cfffa%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, vis

Re: How do I use Django to execute PostGIS query to get polygons within four points?

2018-01-07 Thread Jani Tiainen
o view this discussion on the web visit https://groups.google.com/d/ > msgid/django-users/aac95827-0c79-4aef-84cf-646ca82cfffa%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/aac95827-0c79-4aef-84cf-646ca82cfffa%40googlegroups.com?utm_medium=email&utm_source=footer&g

Re: How do I use Django to execute PostGIS query to get polygons within four points?

2018-01-07 Thread Jani Tiainen
Something like following should work. Didn't checked if that actually works. Mymodel.objects.filter(geom__inside=Polygon.from_bbox((x1,y1,x2,y2), srid=1234)) On Sun, Jan 7, 2018 at 10:41 AM, Jani Tiainen wrote: > Hi, > > I didn't realize what you were asking for. :D >

Re: Select random blog post Object from "Post" Model and render In View/Template

2018-01-07 Thread Jani Tiainen
Hi, Something like this: post_id = Post.objects.values_list ('id', flat=True).order_by('?').first() return redirect('postview', id=post_id) 7.1.2018 15.33 "Ronnie Raney" kirjoitti: > If I understand you, you suggest using my existing DetailView url which > shows the detailed Post, but create

Re: How do I use Django to execute PostGIS query to get polygons within four points?

2018-01-07 Thread Jani Tiainen
nside' for MultiPolygonField or join on the field not permitted." > > On Sunday, January 7, 2018 at 7:33:51 PM UTC-5, Tom Tanner wrote: >> >> Thanks for replying, Jani. I should mention My `geom` field is a >> MultiPolygon, so I can't use `from_bbox` it seems

Re: GeoDjango GIS Model Fieldset Usage

2018-01-10 Thread Jani Tiainen
Hi. So what is your actual problem? 11.1.2018 3.04 "Shazia Nusrat" kirjoitti: > Hi, > > I need quick help about using the fields in the following model: > > class Size(models.Model): >azimuth = models.CharField(max_length=200, blank=True, null=True) >tilt = models.CharField(max_length=2

Re: GeoDjango GIS Model Fieldset Usage

2018-01-10 Thread Jani Tiainen
et me know with example. Regards, Shazia. On Wed, Jan 10, 2018 at 11:30 PM, Jani Tiainen <mailto:rede...@gmail.com>> wrote: Hi. So what is your actual problem? 11.1.2018 3.04 "Shazia Nusrat" mailto:shazianu...@gmail.com>> kirjoitti: Hi,

Re: TemplateDoesNotExist Error on deploying

2018-01-13 Thread Jani Tiainen
Hi, Also be careful with file names. For example windows is case-preserving but case-insensitive. You may accidentally name your templates with different casing which may lead difficult to spot problems. 13.1.2018 22.58 "yingi keme" kirjoitti: > Thanks Kasper. It was the backslash. > > Thanks f

Re: Running 2 django project in different port number at the same time.

2018-01-15 Thread Jani Tiainen
Hi. If you want to run two devservers just define ip and port number when launching devserver. 16.1.2018 6.32 kirjoitti: > As what the title said, is it possible to run 2 django project at the same > time ? > > My task is this: > Integration of django 1 api and django 2 api, to setup two djan

Re: Running 2 django project in different port number at the same time.

2018-01-15 Thread Jani Tiainen
No. Development server is not meant to be final serving solution and it doesn't have any configuration besides the command line. 16.1.2018 6.37 kirjoitti: > I found another solution which is running this command > > manage.py runserver 8005 > > But is it possible to do it without writing the com

Re: Running 2 django project in different port number at the same time.

2018-01-16 Thread Jani Tiainen
Hi. Please note that runserver command is only meant to ease developing your site with Django. In development you can run development server like: ./manage.py runserver 127.0.0.1:8000 ./manage.py runserver 127.0.0.2:8001 But when deploying your site(s) to production procedure is different and de

Re: If you extend the user model in Django using AbstractUser from one app within a project, how do you refer to it from a second app?

2018-01-16 Thread Jani Tiainen
You should use settings way since it is preferred. Since importing models to other models is considered bad thing to do. In theory you could use string format directly but by doing that you couple your other app with your app with custom user. Is there a reason you would like to refer to it? Not

Re: Django view not working for practice project

2018-01-16 Thread Jani Tiainen
Hi. Could you show your template also? 17.1.2018 6.03 "NorDe" kirjoitti: > Context: > > I am creating a website to house some webcomics I made as a project to > practice Django. I am adapting Django's tutorial to create the site ( > https://docs.djangoproject.com/en/2.0/intro/tutorial03/ About

Re: Two command-line questions. How do I get a list of model names? How do I match a user-inputted string with a model name?

2018-01-18 Thread Jani Tiainen
web visit https://groups.google.com/d/msgid/django-users/2d5a05da-27e1-40ba-9884-478aecb2efe5%40googlegroups.com <https://groups.google.com/d/msgid/django-users/2d5a05da-27e1-40ba-9884-478aecb2efe5%40googlegroups.com?utm_medium=email&utm_source=footer>. For more options, visit https://g

Re: emulate desktop multi-windows

2018-01-18 Thread Jani Tiainen
c... all without closing any of the windows/forms.  IOW I can have many windows open at the same time all using the same form with different customer records. How can I do this with Django?  I would like to replace the desktop app with a web app using Django. Johnf -- Jani Tiainen --

Re: emulate desktop multi-windows

2018-01-18 Thread Jani Tiainen
8/2018 05:43 AM, Jani Tiainen wrote: > Hi, > > This actually doesn't have anything to do with Django, but frontend. > Basically you need to pick some Javascript UI framework that supports > features you're after. > > Personally I've only used Dojotoolkit (free

Re: Django Rest Framework: Get Data from an external apis

2018-01-25 Thread Jani Tiainen
d/msgid/django-users/264cbb11-8f02-4730-926f-8e0ab9150fc8%40googlegroups.com <https://groups.google.com/d/msgid/django-users/264cbb11-8f02-4730-926f-8e0ab9150fc8%40googlegroups.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- Jani

Re: django 2 - How do I make search box?

2018-01-25 Thread Jani Tiainen
p;utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- Jani Tiainen -- 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 d

Re: Dynamic update template

2018-01-27 Thread Jani Tiainen
Hi. Unfortunately doing ajax calls to partially update page is required. It is possible to write all the javascript needed by hand but using frameworks usually makes things easier. 27.1.2018 13.32 "Ruchit Bhatt" kirjoitti: > Hi folks, > Currently i am using Django at basic/intermediate level.

Re: Native JIT compiler for Django?

2018-01-28 Thread Jani Tiainen
Hi Why you even want to add such a complexity? Have you measured what part in your apps are really slow? Have you tried to optimize your python code before trying such an extreme actions? 27.1.2018 9.04 ip. "Etienne Robillard" kirjoitti: > Hi, > > I would like to know if it's possible to comp

<    1   2   3   4   5   6   7   8   >