Re: Insert values in python manage.py shell using custom sql

2018-08-23 Thread Vishak Raj
Thank you.. I am new to django,. How can we say the data are in order to django and it asked the value for the id column.. How can it get the last id column.. Thanks in advance shanmu On Fri 24 Aug, 2018, 12:13 AM Aware Fun, wrote: > We dont need to give primary key it automatically define th

Re: Django performance issue that's troubling

2018-08-23 Thread Jim Illback
Vijay, you are exactly correct. Thank you much! Now, knowing the problem, I still don’t have a great solution. Here’s how it is supposed to work. Someone chooses a client from the list or a search. All the possible support records are shown, whether they exist or not, on a screen to hyperlink t

Re: Django performance issue that's troubling

2018-08-23 Thread Vijay Khemlani
Maybe your update form has a field related to a model with thousands of records? like rendering a select combo box with thousands of choices? On Thu, Aug 23, 2018 at 5:30 PM Jim Illback wrote: > I have a Django app in development that performed perfectly with about 20 > client records. Each clie

TypeError: view must be a callable or a list/tuple in the case of include().

2018-08-23 Thread herve kabore
this is the urls.py from django.conf.urls import url from django.contrib import admin urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^$', 'blog.views.home', name='home'), ] this is the views from django.shortcuts import render from django.http import HttpResponse

Re: How do I patch django.core.mail.send_mail for testing?

2018-08-23 Thread scloutier
I solved the problem by wrapping the imports of the test-file inside a context manager, as follow: with patch('django.core.mail.send_mail') as mocked_send_mail: from ModuleToTest.File import functionToTest That forced the patch to occur before the tested function was actualy imported. --

Re: HEELP!! CANT LOAD THE CSS OF MY DJANGO ADMIN PAGE WHY??

2018-08-23 Thread scloutier
If you are in development mode (as I assume you are since you run `python manage.py runserver`), you need to set `DEBUG=True` in your settings.py file. Otherwise Django assumes that another program is serving the static files (nginx, apache, etc) and does not need to serve them itself. -- You

Django performance issue that's troubling

2018-08-23 Thread Jim Illback
I have a Django app in development that performed perfectly with about 20 client records. Each client could have one or more support records and there are 40 potential support records, connected to the client with a ForeignKey (client_id). Then, I loading about 37K client records. Search queries

Re: HEELP!! CANT LOAD THE CSS OF MY DJANGO ADMIN PAGE WHY??

2018-08-23 Thread Tim Vogt (Tim Vogt)
try $python manage.py runserver > Op 23 aug. 2018, om 21:31 heeft Dario Coronel het > volgende geschreven: > > I follow step by step the instructions of the documentatión of django > especificly the tutorial part two when i create my superuser its all ok The > problem is whe i put $python ru

HEELP!! CANT LOAD THE CSS OF MY DJANGO ADMIN PAGE WHY??

2018-08-23 Thread Dario Coronel
I follow step by step the instructions of the documentatión of django especificly the tutorial part two when i create my superuser its all ok The problem is whe i put $python runserver he work but not find the statics files and not load the styles just the view without nothing what i have done w

Re: Insert values in python manage.py shell using custom sql

2018-08-23 Thread Aware Fun
Primary key is a unique kye that differentiate you values like in order 1,2,3 like this or u can say that your values are are stored in order.In django when u create object and give values first it by default assign the primary key to 1. rahul On Thu, Aug 23, 2018, 11:20 PM Vishak Raj wrote:

Re: Insert values in python manage.py shell using custom sql

2018-08-23 Thread Aware Fun
We dont need to give primary key it automatically define the key. rahul On Thu, Aug 23, 2018, 11:20 PM Vishak Raj wrote: > Hello > > Thanks for replying.. > > I have a confusion > > In normal python shell, we import sqlite3 and insert values without giving > the Id or primary key.. > > Why we

Re: Insert values in python manage.py shell using custom sql

2018-08-23 Thread Vishak Raj
Hello Thanks for replying.. I have a confusion In normal python shell, we import sqlite3 and insert values without giving the Id or primary key.. Why we giving primary key in django.. Is it possible to insert values without primary key like we give in python shell.. Thanks in advance On Thur

Re: django sqlite3 error

2018-08-23 Thread Benjamin Goldberg
I think people need to see what your music_result table looks like before replying On Thursday, August 23, 2018 at 2:35:04 AM UTC-4, ruban bharath wrote: > > Hi these are my tables > > music_name = char(username),userId(int) > > meaning = char(meaning),userid(int) > > i have used the join to merg

Re: wagtailsettings' is not a registered namespace

2018-08-23 Thread TimT Vogt
In searched for wagtail settings and could not find It. I have installed the Working demo and could not yet find the differeces Tim Verstuurd vanaf mijn iPhone > Op 23 aug. 2018 om 07:36 heeft gilwell muhati het > volgende geschreven: > > Good morning @Tim did you solve this? > > wagtailsett

Re: django sqlite3 error

2018-08-23 Thread Jason
What C. Kirby said. I don't see any use of django in this question, and if you are interested in using it, I would look at the tutorial in the documentation for an introduction to the ORM. -- You received this message because you are subscribed to the Google Groups "Django users" group. To un

Re: django sqlite3 error

2018-08-23 Thread C. Kirby
You are not using django anywhere in this question. I would send this to a python or sqlite group On Thursday, August 23, 2018 at 2:35:04 AM UTC-4, ruban bharath wrote: > > Hi these are my tables > > music_name = char(username),userId(int) > > meaning = char(meaning),userid(int) > > i have used t

Re: template tag help please?

2018-08-23 Thread Tosin Ayoola
this is the link https://github.com/olaneat/ask_the_schools will rili b glad if u can help On Thu, Aug 23, 2018 at 2:31 PM Tosin Ayoola wrote: > i have the code on git actually because i'm trying to get the add a file > at the admin page but i'm getting the error > > > On Thu, Aug 23, 2018 at 2

Re: template tag help please?

2018-08-23 Thread Tosin Ayoola
i have the code on git actually because i'm trying to get the add a file at the admin page but i'm getting the error On Thu, Aug 23, 2018 at 2:17 PM ireoluwa fakeye wrote: > Sorry didn't look at it well ,can I see a screen shot of your code > > On Thu, 23 Aug 2018, 14:10 Tosin Ayoola, wrote: >

Re: template tag help please?

2018-08-23 Thread ireoluwa fakeye
Sorry didn't look at it well ,can I see a screen shot of your code On Thu, 23 Aug 2018, 14:10 Tosin Ayoola, wrote: > not properly routing my urls as in, i don't understand > > On Thu, Aug 23, 2018 at 2:06 PM ireoluwa fakeye wrote: > >> You Are not properly routing your urls >> >> On Thu, 23 Au

Re: Upgrading app with settings-dependent migrations

2018-08-23 Thread Tim Graham
I think that https://code.djangoproject.com/ticket/24648 describes your issue. On Thursday, August 23, 2018 at 7:30:33 AM UTC-4, Jan Musílek wrote: > > Hi! > > I have a problem with migrations workflow for which I couldn't find an > answer anywhere else. > > Suppose, that I have an application

Re: template tag help please?

2018-08-23 Thread Tosin Ayoola
not properly routing my urls as in, i don't understand On Thu, Aug 23, 2018 at 2:06 PM ireoluwa fakeye wrote: > You Are not properly routing your urls > > On Thu, 23 Aug 2018, 14:03 Tosin Ayoola, wrote: > >> good day please i'm having issues, attached below is one of the error i'm >> getting a

Re: template tag help please?

2018-08-23 Thread ireoluwa fakeye
You Are not properly routing your urls On Thu, 23 Aug 2018, 14:03 Tosin Ayoola, wrote: > good day please i'm having issues, attached below is one of the error i'm > getting also ive been trying to add bootstrap glyphicon to my project but > it just display the text without the glyphicon, > > On

Re: Concerning CVE-2018-14574: is there a open redirect possibility in CommonMiddleware of version 1.9.5

2018-08-23 Thread Tim Graham
I didn't confirm it but according to the comments at the bottom of https://github.com/django/django/commit/a656a681272f8f3734b6eb38e9a88aa0d91806f1, Django 1.9 and later are affected. On Thursday, August 23, 2018 at 7:30:51 AM UTC-4, Christophe Dupouy wrote: > > I understand that per your suppo

Re: Foreign key issue

2018-08-23 Thread Akshay Jain
Thanks Jason, fair point. On Tue, Aug 21, 2018 at 5:37 PM Jason wrote: > If you think about it, you might see why you could do this, but you'd lose > everything related to referential integrity. Nothing stopping you from > making a router that behind the scenes uses multiple dbs seamlessly, but

Re: Insert values in python manage.py shell using custom sql

2018-08-23 Thread 'Vinod Kumar' via Django users
By default model have id column , so you have to put value of id. On Thu, Aug 23, 2018, 5:00 PM Vishak Raj wrote: > hello, > > i am inserting the values in the table using custome sql in django shell.. > > p.execute('INSERT INTO webapp_information > VALUES(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s

Concerning CVE-2018-14574: is there a open redirect possibility in CommonMiddleware of version 1.9.5

2018-08-23 Thread Christophe Dupouy
I understand that per your supported versions policy, Django 1.10 and older are no longer supported. But can you indicated me if there is an open redirect possibility in CommonMiddleware of version 1.9.5. If not affected, I want to avoid to have to find ressources (money and people) to perform a

Insert values in python manage.py shell using custom sql

2018-08-23 Thread Vishak Raj
hello, i am inserting the values in the table using custome sql in django shell.. p.execute('INSERT INTO webapp_information VALUES(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)',i) i is the list of values it shows the error:OperationalError: tabl

Re: wagtailsettings' is not a registered namespace

2018-08-23 Thread gilwell muhati
Good morning @Tim did you solve this? wagtailsettings is a registed app perhaps and the app_name='wagtailsettings' has not been initialised or the namespace on urls has not been called,kindly check on using namespaces on paths and urls *Regards,Gilwell Muhati | +254 710 739 116 | * *~~“The mi

Upgrading app with settings-dependent migrations

2018-08-23 Thread Jan Musílek
Hi! I have a problem with migrations workflow for which I couldn't find an answer anywhere else. Suppose, that I have an application MYAPP, that uses some third-party apps. These third-party apps require running `makemigrations` command after adding them to INSTALLED_APPS, because their migration

RE: template tag help please?

2018-08-23 Thread Mike Jones
Andreas, Thank you for your help and patience I have got the damned thing working!! It helped that I remembered that one of the filter arguments was actually a foreign key in the model and had to be an integer id not a string, that was being obfuscated by being a templatetag call. Than

Re: Geographical location filter app in Django

2018-08-23 Thread Christian Ledermann
Go with geo django, postgis will accelerate these kind of lookups with indices. https://stackoverflow.com/questions/19703975/django-sort-by-distance/35896358#35896358 On Thu, 23 Aug 2018 at 09:04, Benjamin Smith wrote: > I would like to create a market place like app with Djano as the backend >

Geographical location filter app in Django

2018-08-23 Thread Benjamin Smith
I would like to create a market place like app with Djano as the backend server, where users can buy/sell items. In the app I would like have to a feature related to geographic region of a user. Such as, to filter out items in a given specific miles of radius. Example use case: - User uploads

Re: template tag help please?

2018-08-23 Thread Andréas Kühne
Yes - but you still are doing it strange - you shouldn't use kwargs if you are sending the parameters and have the parameters in the function - use the parameters. In other words: avn = kwargs['avn'] avd = kwargs['avd'] name = kwargs['name'] That is unnecessary Regards, Andr