How can i share one Database Sqlite between 2 app on pythonanywhere

2019-09-03 Thread Balaji Shetty
Hi Everyone

Can anybody suggest me
How can i share one Database Sqlite between 2 app on pythonanywhere.

Currently i have deployed one project on PythonAnywhere.
I have purchases 2 App.
Now i can execute 2 App simultaneous.

I have deployed app1.pythonanywhere.com and app2.pythonanywhere.com

app1.pythonanywhere.com is my real time hosted project. Before making any
changes, i create mirror copy of code and Database Sqlite on
app2.pythonanywhere.com, make changes and if changes are proper. I make
changes in
app1.pythonanywhere.com.

But it is time consuming Process. Better solution may be share database and
make changes in Business Logic and reflect in orignal one.

My Simple Question is
How can i share sqlite database between two Project here.

OR

Is there any other way to do the same thing more efficiently?

Thanks in Advance.
-- 


*Mr. Shetty Balaji S.Asst. ProfessorDepartment of Information Technology,*
*SGGS Institute of Engineering & Technology, Vishnupuri, Nanded.MH.India*
*Official: bsshe...@sggs.ac.in  *
*  Mobile: +91-9270696267*

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAECSbOv7vBQ8hxZBoPf2PvVgUY2NS-44-yvLuprbphdvN1ZJYw%40mail.gmail.com.


Re: Please help me in views.py

2019-09-03 Thread Bhoopesh sisoudiya
Hi Amit,

You can use
=≠=
Book.objects.select_related(FK).select_related(FK). values (select column
name which you want).all()


Thanks
Bhoopesh sisoudiya

On Wed, Sep 4, 2019, 9:38 AM Amit Samanta  wrote:

> Hi,
>
> I need help i am not understanding the keywords of joining and fetch value
> in veiw.py
> i have three tables in model.py
>
> Table 1(Author) :
>
> Table 2(books):
>
> Table 3 (details):
> FK of table1
> FK of table2
>
> Fk = foreign key
>
> I have to just show
>
> Author (author name) Books (dynamic) Books(author 2nd book)
>...
> details(dynamic) details(dtl
> of author 2nd book) ...
>
> I have created the template
>
> now in views.py i an confused
>
> book=books.object(i do not get what to do)
> Author= (same )
> details = (same)
>
> Please can anybody help that will be very greatfull.
> Thank you in advance
>
>
>
> Thanks and Regards
> Amit Samanta
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/54483cc3-eadd-4559-8c61-c179cfbab933%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAAk3c1OzGXKSQg8GK1C8_5Ck-iQ%2B1WjsYMdD%2B%2B0_q3inb94jyw%40mail.gmail.com.


Please help me in views.py

2019-09-03 Thread Amit Samanta
Hi,

I need help i am not understanding the keywords of joining and fetch value 
in veiw.py
i have three tables in model.py

Table 1(Author) :

Table 2(books):

Table 3 (details):
FK of table1
FK of table2

Fk = foreign key

I have to just show 

Author (author name) Books (dynamic) Books(author 2nd book)
   ...
details(dynamic) details(dtl of 
author 2nd book) ...

I have created the template

now in views.py i an confused

book=books.object(i do not get what to do)
Author= (same )
details = (same)

Please can anybody help that will be very greatfull.
Thank you in advance



Thanks and Regards
Amit Samanta

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/54483cc3-eadd-4559-8c61-c179cfbab933%40googlegroups.com.


Re: Making tests fast

2019-09-03 Thread wd
On Wed, Sep 4, 2019 at 4:52 AM Dan Davis  wrote:

> I'm wondering how to make my tests fast while also having a lot of data
> defined in the models.
> This project is already using sqlite3 and the tests are single-threaded.
>
>
Django support parallel, you can use multi process to save time.

>   --parallel [N]Run tests using up to N parallel processes.
>

 And also I don't recommend to use sqlite, I think it's not as fast as
PostgreSQL, you also can use memory database for PostgreSQL as well.

Only use the minimal required fixtures for each test, because setup and
delete the data are slow. Also use TestCase instead of TranscationTestCase
if you can, via
https://adamj.eu/tech/2019/07/15/djangos-test-case-classes-and-a-three-times-speed-up/
.


> My ideas are:
>
>- Specify a different sqlite3 file and keepdb for different tests -
>presumably with @override_settings
>- Do something to copy this data into memory (see
>
> https://stackoverflow.com/questions/3850022/how-to-load-existing-db-file-to-memory-in-python-sqlite3)
>- I suspect Django already supports this, but I don't see where
>_clone_test_db is called.
>
> I am loathe to use modelmommy and/or factoryboy because they are simply a
> bit harder to use.   I'd rather use dump data/load data with :memory
> database.
>
>
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/b22204f4-85db-4eb9-9a53-adca0dea269c%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABexzmiyOPwZ8X3-5WySF-Rocr-RZ_hCMQm0udijLu-10o7Dew%40mail.gmail.com.


Re: Django Version to be used on for Windows Server 2016 and MS SQL 2016

2019-09-03 Thread Daniel Angel
[image: image.png]

*settings*

DATABASES = {
'default': {
'ENGINE': 'sql_server.pyodbc',
'NAME': 'PRUEBA_PYTHON_DJANGO',
'HOST': ' MSSQLSERVER_2014',
'USER': 'sa',
'PORT': '1433',
'PASSWORD': '@d',
'OPTIONS': {
'driver': 'ODBC Driver 17 for SQL Server',
'unicode_results': True,
}
}

El lun., 2 sept. 2019 a las 9:39, Mahaveerchand Jain (<
mahaveerchand.j...@gmail.com>) escribió:

> Dear All,
>
> I have Windows Server 2016 , IIS 10 and the Database is MS SQL 2016.
>
> I am not sure about the compatibility and  version of Django to use on
> Windows Server 2016  with IIS 10 and I want the Django to be integrated
> seamlessly with MS SQL server 2016  so any  module or library suggestion
> for the same.
>
> Say I wish to run the Django application on Jython so that application
> runs on JVM then the compatible Jython version will help.
>
> Thanks ,
> Nirmal Kumar.M
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/01b7e022-2c63-4984-a4d4-0a4d49790cf9%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2By6opp5UGjWPEpArHnLwS7kAY%2B3%2B%2BjtyeU5LqyL-xDPCEA0xQ%40mail.gmail.com.


Testing the validity of a form which has inline formsets from a View subclass

2019-09-03 Thread Shaheed Haque
Hi all,

I have a set of views in a superclass/subclass hierarchy like this:

   - mobile_view is a subclass of
   - generic___view is a subclass of
   - django-extra-views formset support view

As expected, the django-extra-views formset support's "post()" logic does a
"if form.is_valid() then form.save(commit=False)", and then proceeds to
save the contents of the formsets after testing them with formset
"is_valid" logic, before returning an HttpResponse. AFAICS, no exceptions
are raised to signal the error.

Let's say I now want to do some additional work in generic_object_view,
based on whether the superclass had an error or not:

   - I could construct the form again, and the formsets again, and
   basically redo what the superclass did
   - And of course, it would need redoing again one layer up in
   "mobile_view".

Or have I missed something I can test in the view itself (i.e.
self.) or the return HTTPResponse?

Thanks, Shaheed

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHAc2jd842he83j77xP4phU4-CfyiqvNWhQ3T2wd2yWoGFuNJA%40mail.gmail.com.


Re: Making tests fast

2019-09-03 Thread Mike Dewhirst

On 4/09/2019 6:51 am, Dan Davis wrote:
I'm wondering how to make my tests fast while also having a lot of 
data defined in the models.

This project is already using sqlite3 and the tests are single-threaded.

My ideas are:

  * Specify a different sqlite3 file and keepdb for different tests -
presumably with @override_settings
  * Do something to copy this data into memory
(see 
https://stackoverflow.com/questions/3850022/how-to-load-existing-db-file-to-memory-in-python-sqlite3)
- I suspect Django already supports this, but I don't see where
_clone_test_db is called.

I am loathe to use modelmommy and/or factoryboy because they are 
simply a bit harder to use.   I'd rather use dump data/load data with 
:memory database.


I agree. I use fixtures a lot and things go slow. Like the little green 
frog in the pot getting warmer I've just been getting used to it. 
However, you have inspired me to think again ...


1. I'm going out now to buy a SSD. I think that is a reasonable 
compromise between a spinning disk and a RAM disk. I run about 1400 
tests in around 40 minutes.


2. I made a BaseTest class which uses TestCase and sets up minimal model 
instances but DOES NOT use fixtures


3. All tests inherit from BaseTest but only those which actually require 
data need to use the fixtures


4. I have decided to give up SQLite3 for tests and stick with PostgreSQL 
because I discovered the hard way that some tests pass on one but not 
the other.


5. I'm going to set up a separate machine to do CI. Real soon now.

Cheers

Mike




--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b22204f4-85db-4eb9-9a53-adca0dea269c%40googlegroups.com 
.


--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8c2d58b1-ba91-f83d-e36f-12beaa7b109b%40dewhirst.com.au.


Re: Weird django.urls.exceptions.NoReverseMatch: 'review' is not a registered namespace

2019-09-03 Thread Pasquale
Applied your suggestion,now I get
django.urls.exceptions.NoReverseMatch: Reverse for 'detail' not found.
'detail' is not a valid view function or pattern 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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f2bd455e-2c0d-747f-343a-5f7d1135a45e%40gmail.com.


Re: Making tests fast

2019-09-03 Thread Dan Davis
I will just use fixtures, natural-keys, and an in-memory database.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a4601657-35bf-445a-a972-2abda5ddabc3%40googlegroups.com.


Making tests fast

2019-09-03 Thread Dan Davis
I'm wondering how to make my tests fast while also having a lot of data 
defined in the models.  
This project is already using sqlite3 and the tests are single-threaded.

My ideas are:

   - Specify a different sqlite3 file and keepdb for different tests - 
   presumably with @override_settings
   - Do something to copy this data into memory 
   (see 
https://stackoverflow.com/questions/3850022/how-to-load-existing-db-file-to-memory-in-python-sqlite3)
 
   - I suspect Django already supports this, but I don't see where 
   _clone_test_db is called.

I am loathe to use modelmommy and/or factoryboy because they are simply a 
bit harder to use.   I'd rather use dump data/load data with :memory 
database.

   

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b22204f4-85db-4eb9-9a53-adca0dea269c%40googlegroups.com.


Re: Error: Not able to create table using models (Backend mysql)

2019-09-03 Thread Gabriel Araya Garcia
I believe that Simon says.
Get out the date and time fields and see what appen. After you can add the
date and time fields directly on DB and put them in your models and forms
also

luck

El mar., 3 sept. 2019 a las 9:57, johnsi rani ()
escribió:

>
>
> i nstalled django2 and mysql 5.0
>> I am getting this error while i give python manage.py migrate
>>
>> raise MigrationSchemaMissing("Unable to create the django_migrations
>> table (%s)" % exc)
>> django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create
>> the django_migrations table ((1064, "You have an error in your SQL syntax;
>> check the manual that corresponds to your MySQL server version for the
>> right syntax to use near '(6) NOT NULL)' at line 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/c58dc01f-95ae-4902-9cb9-99daccdaf8e6%40googlegroups.com
> 
> .
>


-- 
Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos
99.7721.15.70

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDCrVymdS7i6_RmD2hAMNBHOD5LZt9JUGEr8F2pb4TQU9g%40mail.gmail.com.


Re: Django chat

2019-09-03 Thread niranjan shukla
Tell me for Django 1.11.9
It is for Django 2.0 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f8f9a788-8c6b-465f-b04e-0a9b0ee99411%40googlegroups.com.


Re: Error: Not able to create table using models (Backend mysql)

2019-09-03 Thread Simon Charette
Django 2.0 only supports MySQL 5.5+.

I suspect you're getting a syntax error when Django tries to create a table 
mapping
a model with a DateTimeField since it resolves to DATETIME(6) which is not 
supported
on MySQL < 5.5.

Cheers,
Simon

Le mardi 3 septembre 2019 09:58:19 UTC-4, johnsi rani a écrit :
>
>
>
> i nstalled django2 and mysql 5.0
>> I am getting this error while i give python manage.py migrate
>>
>> raise MigrationSchemaMissing("Unable to create the django_migrations 
>> table (%s)" % exc)
>> django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create 
>> the django_migrations table ((1064, "You have an error in your SQL syntax; 
>> check the manual that corresponds to your MySQL server version for the 
>> right syntax to use near '(6) NOT NULL)' at line 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5f9b7518-952d-4639-a9b8-0304a11ffa91%40googlegroups.com.


Re: Django chat

2019-09-03 Thread N'BE SORO
use this tutorial, it is good

https://youtu.be/RVH05S1qab8

I followed it to realize my chat application


Le mar. 3 sept. 2019 à 15:57, parmeshwar deharkar <
parmeshwardehar...@gmail.com> a écrit :

> use the Django-channel library to making chatbot application
>
> On Tue, Sep 3, 2019 at 1:40 AM niranjan shukla 
> wrote:
>
>> Please help !!
>>
>>  As I am building a social site and I want to add a chat app so that the
>> user can chat with his friend which he follows.
>>
>> So anyone knows chat app tutorial then tell me.
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/d1e29ee4-7253-4807-b4cd-ba9cd702e8a1%40googlegroups.com
>> 
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAFyF%2BQhCmyit%2BBMKCQiaPM75ULBTSPV4wfwuf1a_tGL7vPoWzg%40mail.gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOtSHp8cz5LwW3D8V3nuD_KFjjysKO97RbF6QuXb7c-FWbGBXw%40mail.gmail.com.


Re: Error: Not able to create table using models (Backend mysql)

2019-09-03 Thread johnsi rani


i nstalled django2 and mysql 5.0
> I am getting this error while i give python manage.py migrate
>
> raise MigrationSchemaMissing("Unable to create the django_migrations table 
> (%s)" % exc)
> django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create 
> the django_migrations table ((1064, "You have an error in your SQL syntax; 
> check the manual that corresponds to your MySQL server version for the 
> right syntax to use near '(6) NOT NULL)' at line 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c58dc01f-95ae-4902-9cb9-99daccdaf8e6%40googlegroups.com.


Re: Weird django.urls.exceptions.NoReverseMatch: 'review' is not a registered namespace

2019-09-03 Thread Julien Enselme
namespace is an argument of the include function and you can remove the
name argument to path.
Julien Enselme
Développeur chez BureauxLocaux


Le mar. 3 sept. 2019 à 13:28, Pasquale  a écrit :

> I did put reviews/urls.py:
>
> from django.urls import path, include
> from . import views as v
> app_name="review"
> urlpatterns = [
> path("", v.ReviewsDetail.as_view(), name="detail"),
> ]
> Also if I replace name parameter with namespace I get:
> TypeError: _path() got an unexpected keyword argument 'namespace'
>
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f58dce8c-b602-4383-e122-cd3f6324f923%40gmail.com
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAL%3D_h26cjdud%2BDYfEsaX70ME4WQM98%2BM3gso7-38twRcq6zysw%40mail.gmail.com.


Re: Django chat

2019-09-03 Thread parmeshwar deharkar
use the Django-channel library to making chatbot application

On Tue, Sep 3, 2019 at 1:40 AM niranjan shukla 
wrote:

> Please help !!
>
>  As I am building a social site and I want to add a chat app so that the
> user can chat with his friend which he follows.
>
> So anyone knows chat app tutorial then tell me.
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/d1e29ee4-7253-4807-b4cd-ba9cd702e8a1%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFyF%2BQhCmyit%2BBMKCQiaPM75ULBTSPV4wfwuf1a_tGL7vPoWzg%40mail.gmail.com.


Re: Weird django.urls.exceptions.NoReverseMatch: 'review' is not a registered namespace

2019-09-03 Thread Pasquale
I did put reviews/urls.py:

from django.urls import path, include
from . import views as v
app_name="review"
urlpatterns = [
    path("", v.ReviewsDetail.as_view(), name="detail"),
]
Also if I replace name parameter with namespace I get:
TypeError: _path() got an unexpected keyword argument 'namespace'


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f58dce8c-b602-4383-e122-cd3f6324f923%40gmail.com.


Re: Weird django.urls.exceptions.NoReverseMatch: 'review' is not a registered namespace

2019-09-03 Thread Julien Enselme
Hi,

- I don't see where you include the urls from the reviews app in your main
urls.py file.
- To use the "review:detail" notation, you need to enable namespaces.

So it seems that what you lack in your mysite/urls.py file is
path("reviews/", include("reviews.urls", namespace="reviews")) You should
then be able to use reverse("reviews:detail").

Julien Enselme
Développeur chez BureauxLocaux


Le lun. 2 sept. 2019 à 15:39, Pasquale  a écrit :

> I have in mysite/urls.py:
>
> from django.contrib import admin
> from django.urls import include, path
> from django.contrib.auth import views as auth_views
> from django.conf import settings
> from .views import *
>
> urlpatterns = [
> path('admin/', admin.site.urls, name="admin"),
> path("places/", include("places.urls"), name="places"),
> path("review/", include('django_comments_xtd.urls'), name="review"),
> path('accounts/', include('allauth.urls')),
> path("", HomeView.as_view(), name="home")
> ]
>
> if settings.DEBUG:
> import debug_toolbar
> urlpatterns += [
> path('__debug__/', include(debug_toolbar.urls)),
> ]
>
>
> and in reviews/urls.py
>
> from django.urls import path, include
> from . import views as v
> app_name="review"
> urlpatterns = [
> path("", v.ReviewsDetail.as_view(), name="detail"),
> ]
> but if I do reverse("review:detail) I get a NoReverseMatch.
>
> How?
>
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/a3e47da2-b257-5f61-3510-cfaed6c2d752%40gmail.com
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAL%3D_h26yMO%3De%3DL1t-kK34s02Uhq%2Bc%2B%3DYcywiJHm6rBso%3Dy-Gqw%40mail.gmail.com.


Re: Django Version to be used on for Windows Server 2016 and MS SQL 2016

2019-09-03 Thread RONAK JAIN
Hi Django-user,

You can do simply change in* Settings.py.*


   1. *First go on settings.py and look data base connection which is
   connect with default dbsqlite3.*
   2. *Remove there.*
   3. *Search on google how to integrate mysql with django..*
   4. *then connect with your django*
   5. *Maybe , you will get your answer.*



*Thanks *
*RJ *



On Mon, Sep 2, 2019 at 7:09 PM Mahaveerchand Jain <
mahaveerchand.j...@gmail.com> wrote:

> Dear All,
>
> I have Windows Server 2016 , IIS 10 and the Database is MS SQL 2016.
>
> I am not sure about the compatibility and  version of Django to use on
> Windows Server 2016  with IIS 10 and I want the Django to be integrated
> seamlessly with MS SQL server 2016  so any  module or library suggestion
> for the same.
>
> Say I wish to run the Django application on Jython so that application
> runs on JVM then the compatible Jython version will help.
>
> Thanks ,
> Nirmal Kumar.M
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/01b7e022-2c63-4984-a4d4-0a4d49790cf9%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BAqMUf4DZd5tTSGenHwmVtYUNSqhL21yFi_2rGEOAh8sYP1%3Dw%40mail.gmail.com.


DRF Permissions

2019-09-03 Thread Suraj Thapa FC
In DRF, only AllowAny permission is working.


My Views.py

class generate_course(APIView) :
 .
 .
 .
 permission_classes = (IsAuthenticated,)
 authentication_classes = (JSONWebTokenAuthentication,)

 def post ( self,  request) :
   
  .
 


I also define the setting.py. And also given the token in headers


The postman giving the error
{
detail : Authentication credential were not provided.

}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPjsHcH21hXUdT%2Bm%2BvnQ0oRQTh-6N1cJbSWYDxHuiNOXkM4DwQ%40mail.gmail.com.