Re: Can we make 1 function to check the objects need update and update them

2018-08-29 Thread Anirudh choudhary
I have read it already and the best I found from the documentation is the signals but signals only save when save command is given and it is manually On Thursday, August 30, 2018 at 12:19:17 PM UTC+5:30, Mikhailo Keda wrote: > > Check Django documentation https://docs.djangoproject.com/en/2.1/ >

Re: Help with mi first hello world please problems with urls

2018-08-29 Thread ireoluwa fakeye
Why are you returning a string into the response ,there are different approaches to this . On Thu, 30 Aug 2018, 07:36 Anirudh choudhary, wrote: > if you understand English then use include() in your mysite.urls.py > which is in from django.urls import include > > On Wednesday, August 22, 2018

Re: Can we make 1 function to check the objects need update and update them

2018-08-29 Thread Mikhailo Keda
Check Django documentation https://docs.djangoproject.com/en/2.1/ -- 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 p

Re: Help with mi first hello world please problems with urls

2018-08-29 Thread Anirudh choudhary
if you understand English then use include() in your mysite.urls.py which is in from django.urls import include On Wednesday, August 22, 2018 at 10:31:19 PM UTC+5:30, Dario Coronel wrote: > > El problema que tengo es el siguiente soy un novato recien conociendo el > mundo de python y django esta

Re: Base Views error importing articles.models

2018-08-29 Thread Anirudh choudhary
this error means that the module articles is not in the articels and file name models. you may be getting this error because of spelling On Monday, August 27, 2018 at 7:05:43 PM UTC+5:30, Sandy Leon wrote: > > Hello everyone, > > I am trying to add another simple 'home' page to my website which

Can we make 1 function to check the objects need update and update them

2018-08-29 Thread Anirudh choudhary
I am Writing the program which will collect all the content and display it and I want this to be robust but i am not able to find in documentation related this -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and

Re: Help.... Django : Change Backend as mysql and create sample example using django ORM

2018-08-29 Thread Sonali Vighne
MySQL version- 6.0.8-alpha-community On Wednesday, August 29, 2018 at 7:26:09 PM UTC+5:30, Tom Forbes wrote: > > What version of MySQL are you running? > > On Tuesday, 28 August 2018 07:00:52 UTC+1, Sonali Vighne wrote: >> >> I will paste full error and stack trace here. >> >> This is occur

Re: Searchable dropdown from models

2018-08-29 Thread Mark Phillips
If I understand your question, there are many different django projects that offer a solution to "autocomplete" in a form. https://djangopackages.org/grids/g/auto-complete/ Or, you can roll your own with the addition of some Javascript. Autocomplete is not a "built-in" function withing the django

Re: how to make https work in django REST framework on runserver port

2018-08-29 Thread Kasper Laudrup
Hi Rupam, On 29/08/2018 17.44, Rupam Hazra wrote: I want to do on production but how . could you elaborate me because i am new in python You shouldn't be using the development server in production. That is quite clearly stated in the documentation for good reasons. You could set up a web s

Searchable dropdown from models

2018-08-29 Thread ah
Hi, I am trying to create a searchable dropdown list based on Django's model. I have a model M that has 6 objects [apple,orange,carrot,banana,kiwi,peach]. I want to create a view that will have a search box like a html datalist. when user types in "app" -- apple should show in dropbox list. the

Re: Using Subdomains in Version 2.1.7

2018-08-29 Thread Abednego Ng'ang'a
In what file exactly I'm I supposed to place that import? On Wed, 29 Aug 2018 at 17:37, Tim Graham wrote: > Starting in Django 2.0, "The django.core.urlresolvers module is removed > in favor of its new location, django.urls." > > Use from django.urls import reverse as simple_reverse > > On Wedn

Re: Trying to replace a char field with a forgein key feild

2018-08-29 Thread 'Matthew Stroud' via Django users
Thanks for the reply. Sadly in the process of me messing around with, I somehow fixed it. I'm not sure how, but when I get a chance I'll look through my changes and see what did it. In the meantime, I'm going to claim user error until I can figure it out. Thanks, Matthew Stroud On 8/29/18, 5

Re: how to make https work in django REST framework on runserver port

2018-08-29 Thread Rupam Hazra
@jason, I want to do on production but how . could you elaborate me because i am new in python On Wednesday, 29 August 2018 17:09:34 UTC+5:30, Jason wrote: > > for local development, why do you need https? for staging and production, > you should be using apache with mod_wsgi or nginx with uwsg

Re: new to django

2018-08-29 Thread sankar ardhas
Hi all, Thanks for your response. On Wed, Aug 29, 2018, 9:08 PM Jani Tiainen wrote: > Hi, > > Django Girls do have excellent tutorial which also does have very detailed > setup guide. > > > ke 29. elok. 2018 klo 14.16 sankar ardhas > kirjoitti: > >> Hi all, >> I am a web develo

Re: new to django

2018-08-29 Thread Jani Tiainen
Hi, Django Girls do have excellent tutorial which also does have very detailed setup guide. ke 29. elok. 2018 klo 14.16 sankar ardhas kirjoitti: > Hi all, > I am a web developer in laravel and codeigniter php web > frameworks. I want to learn how to build web application with django

Re: Django Mysql Error : Unknown system variable 'innodb_strict_mode

2018-08-29 Thread Jason
you shouldn't need to set the storage engine to innodb https://docs.djangoproject.com/en/2.1/ref/databases/#storage-engines MySQL’s default storage engine is InnoDB . This engine is fully transactional and supports foreign key refe

Can anyone please help me solve this question?

2018-08-29 Thread Anirudh Jain
Here is the question that I posted earlier yesterday and it is still unsolved https://stackoverflow.com/questions/52054246/how-to-add-a-foreign-key-from-multiple-options-available-in-model-for-that-key-i It is very urgent for me to solve this question and this is the last part where I am stuck

Re: Using Subdomains in Version 2.1.7

2018-08-29 Thread Tim Graham
Starting in Django 2.0, "The django.core.urlresolvers module is removed in favor of its new location, django.urls." Use from django.urls import reverse as simple_reverse On Wednesday, August 29, 2018 at 9:56:09 AM UTC-4, Abednego Ng'ang'a wrote: > > I've followed the procedure of installing subd

Re: Help.... Django : Change Backend as mysql and create sample example using django ORM

2018-08-29 Thread Tom Forbes
What version of MySQL are you running? On Tuesday, 28 August 2018 07:00:52 UTC+1, Sonali Vighne wrote: > > I will paste full error and stack trace here. > > This is occurred when I am giving “python manage.py migrate” command > > > > Operations to perform: > > Apply all migrations: admin, aut

Using Subdomains in Version 2.1.7

2018-08-29 Thread Abednego Ng'ang'a
I've followed the procedure of installing subdomains according to https://django-subdomains.readthedocs.io/en/latest/ but when I try python3 manage.py runserver I get the error from django.core.urlresolvers import reverse as simple_reverse ModuleNotFoundError: No module named 'django.core.urlre

Re: Help.... Django : Change Backend as mysql and create sample example using django ORM

2018-08-29 Thread Tim Graham
MySQL 6.0? I've never seen such a version... maybe that's the issue. Django 2.1 should work with MySQL 5.6, 5.7, and 8.0. On Wednesday, August 29, 2018 at 8:58:50 AM UTC-4, Sonali Vighne wrote: > > Django - 2.1 > mysql community server - 6.0.8 > mysqlclient - mysqlclient 1.3.1

Re: Deploying with apache2 and modwsgi

2018-08-29 Thread Joel Mathew
I surmised as much. But where does it go? Do you have a full working configuration of the conf file? On Wed, 29 Aug 2018 at 19:17, Jason wrote: > > well, that's self-explainatory. you have a bad config because that > WSGIPythonHome directive can't exist inside a VirtualHost section. > > On Wed

Re: Deploying with apache2 and modwsgi

2018-08-29 Thread Jason
well, that's self-explainatory. you have a bad config because that WSGIPythonHome directive can't exist inside a VirtualHost section. On Wednesday, August 29, 2018 at 9:36:20 AM UTC-4, Joel wrote: > > I get this: > > Aug 29 12:24:52 localhost systemd[1]: Starting The Apache HTTP Server... > Au

Re: Deploying with apache2 and modwsgi

2018-08-29 Thread Joel Mathew
I get this: Aug 29 12:24:52 localhost systemd[1]: Starting The Apache HTTP Server... Aug 29 12:24:52 localhost apachectl[12718]: AH00526: Syntax error on line 31 of /etc/apache2/sites-enabled/000-default.conf: Aug 29 12:24:52 localhost apachectl[12718]: WSGIPythonHome cannot occur within section

Re: How to filter choices in Django2's autocomplete_fields?

2018-08-29 Thread ciaran . courtney
Not possible ATM it seems, pity https://code.djangoproject.com/ticket/29010 -- 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

Re: Help.... Django : Change Backend as mysql and create sample example using django ORM

2018-08-29 Thread Sonali Vighne
Django - 2.1 mysql community server - 6.0.8 mysqlclient - mysqlclient 1.3.12 On Wednesday, August 29, 2018 at 6:24:05 PM UTC+5:30, Tim Graham wrote: > > What version of Django, MySQL, and mysqlclient are you using? > > On Tuesday, August 28, 2018 at 2:00:52 AM UTC-4, Sonali Vig

Re: How to filter choices in Django2's autocomplete_fields?

2018-08-29 Thread ciaran . courtney
You need to override ModelAdmin.get_search_results() as per https://docs.djangoproject.com/en/2.1/ref/contrib/admin/#django.contrib.admin.ModelAdmin.autocomplete_fields My problem is I override ForeignKeyField in AdminForm, where I can filter based on self.instance, this is not possible in cur

Re: Help.... Django : Change Backend as mysql and create sample example using django ORM

2018-08-29 Thread Tim Graham
What version of Django, MySQL, and mysqlclient are you using? On Tuesday, August 28, 2018 at 2:00:52 AM UTC-4, Sonali Vighne wrote: > > I will paste full error and stack trace here. > > This is occurred when I am giving “python manage.py migrate” command > > > > Operations to perform: > > Appl

Django Mysql Error : Unknown system variable 'innodb_strict_mode

2018-08-29 Thread Sonali Vighne
Models.py from django.db import models #from django_mysql.models import Model class Category(models.Model): name = models.CharField(max_length=128, unique=True) def __unicode__(self): return self.name class Page(models.Model): category = models

Re: Cannot migrate database development changes to Live Database (Production)

2018-08-29 Thread Mikhailo Keda
Let me clarify, you added just one new model B that has a foreign key to existing model A and Django complains that A doesn't exist, right? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails

Re: new to django

2018-08-29 Thread tamangsiddharth12
Please make sure you install latest django. I have also started working on django and used the django 2.0.2 version. To install this you will need pip3 which is from python3. You can use django 2 versions. On Wednesday, August 29, 2018 at 4:46:15 PM UTC+5:30, sankar ardhas wrote: > > Hi all, >

Re: Deploying with apache2 and modwsgi

2018-08-29 Thread Jason
just to cnfirm, are you using mod_wsgi3 for python3? and what do you get when you run *apachectl configtest* -- 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: how to make https work in django REST framework on runserver port

2018-08-29 Thread Jason
for local development, why do you need https? for staging and production, you should be using apache with mod_wsgi or nginx with uwsgi/gunicorn On Wednesday, August 29, 2018 at 7:16:15 AM UTC-4, Rupam Hazra wrote: > > > Hi, i am working django rest service using runserver on different port on >

Re: How to create complex gin index in postgres db using django

2018-08-29 Thread Jason
you need to make a migration to apply the index. https://www.endpoint.com/blog/2016/09/17/executing-custom-sql-in-django-migration something like class Migration(migrations.Migration): dependencies = [ ('blog', '0001_initial'), ] operations = [ migrations.RunSQL(

Re: Trying to replace a char field with a forgein key feild

2018-08-29 Thread Michal Petrucha
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On Mon, Aug 27, 2018 at 09:37:03AM -0700, mattstroud via Django users wrote: > So when we started the database, it was good enough to have a char field > with choices. But as time progressed I need to convert that field to a > foreign key field. Th

Re: new to django

2018-08-29 Thread Joel Mathew
There are two steps: Install pip, Use pip to install django Follow the tutorial: https://docs.djangoproject.com/en/2.1/intro/install/ On Wed, 29 Aug 2018 at 16:46, sankar ardhas wrote: > > Hi all, > I am a web developer in laravel and codeigniter php web frameworks. > I want to learn h

Deploying with apache2 and modwsgi

2018-08-29 Thread Joel Mathew
After working with the development server for a month, I'm ready to deploy to a VPS. I've installed a debian9 environment and installed apache2 and modwsgi. I'm having trouble editing the httpd.conf and apache wont start with the added lines. My project is at /home/joel/myappointments and the tree

Re: What would be the best way to implement a slider bar with django?

2018-08-29 Thread augustine tharakan
you can use post request using ajax to send the data to the server and when you reload the page the data can be read from the server. For more info go to this link https://ruddra.com/2015/09/17/sample-ajax-get-post-request-in-django/ On Wednesday, August 29, 2018 at 12:30:39 AM UTC+5:30, Geoffre

new to django

2018-08-29 Thread sankar ardhas
Hi all, I am a web developer in laravel and codeigniter php web frameworks. I want to learn how to build web application with django framework. I have ubuntu platform in my comuputer. I want installation steps for django and example also .. Can you help me? -- You received this messa

Re: django website hosting

2018-08-29 Thread augustine tharakan
Checkout this https://simpleisbetterthancomplex.com/tutorial/2016/10/14/how-to-deploy-to-digital-ocean.html (Credits to the Author) On Saturday, August 25, 2018 at 8:06:08 PM UTC+5:30, ERICK OMONDI AYARA wrote: > > I would like to host a django project onto a web domain but cant seem to > ge

Cannot migrate database development changes to Live Database (Production)

2018-08-29 Thread Abhigyan Tiwari
Hi, We had our first deployment recently. Later, we were in the development stage for a month on copy of the live database locally. Today we tried to migrate the changes to the production database but were unable to due to table creation errors. We are having a new table (model) with nullable f

how to make https work in django REST framework on runserver port

2018-08-29 Thread Rupam Hazra
Hi, i am working django rest service using runserver on different port on http but i want to use the https service. Please 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 it,

How to create complex gin index in postgres db using django

2018-08-29 Thread Максим Родин
Hello, I'm trying to make the text search index like this: https://www.postgresql.org/docs/current/static/textsearch-tables.html#TEXTSEARCH-TABLES-INDEX: "CREATE INDEX pgweb_idx ON pgweb USING GIN (to_tsvector('english', title || ' ' || body));" I cannot imagine how to do it in django Here is my