Re: django wamp

2018-07-07 Thread Gerald Brown
Is it possible to run 2 servers (Apache & Nginx) on the same system? Maybe if they listen on different ports i.e. 80 & 81 On Sunday, 08 July, 2018 01:09 PM, m1chael wrote: best not to fight Apache and just use nginx for django On Sat, Jul 7, 2018, 11:07 PM > wr

Re: django wamp

2018-07-07 Thread m1chael
best not to fight Apache and just use nginx for django On Sat, Jul 7, 2018, 11:07 PM wrote: > > Hi, > I'm a novice with django but have been setting up django on a Win7 Wamp > stack. We have several small non-django websites running on wamp. > Those projects are in c:/wamp/www/myproject for ex.

django wamp

2018-07-07 Thread thebobbobsled
Hi, I'm a novice with django but have been setting up django on a Win7 Wamp stack. We have several small non-django websites running on wamp. Those projects are in c:/wamp/www/myproject for ex. and are accessed as localhost/myproject or myipxxx/myproject. Under wamp I have tried putting the dj

Re: help, How can i solve this error please

2018-07-07 Thread Ahmad Hassan
from django.contrib.auth.views import LoginView, LogoutView urlpatterns = [ url(r'^login/$', LoginView.as_view(template_name='accounts/login.html')), url(r'^logout/$', LogoutView.as_view(template_name='accounts/logout.html')), ] On 7/8/18, Hambali Idrees Ibrahim wrote:

AttributeError:

2018-07-07 Thread Hambali Idrees Ibrahim
from django.conf.urls import url from . import views from django.contrib.auth import login, logout urlpatterns = [ url(r'^$', views.home), url(r'^login/$', login, {'template_name': 'accounts/login.html'}), url(r'^logout/$', logout, {'template_name': 'accounts/logout.html'}), u

help, How can i solve this error please

2018-07-07 Thread Hambali Idrees Ibrahim
-- You received this message because you a

Re: JSON serializable issue

2018-07-07 Thread Luis
Dear Melvyn, I had a week with this issue. Thanks to you i could to find the problem. I am working with AWS and it change some names for its instances (+3 or 4 letters). Then it couldnt write to the database. Before, i thinked in this solution but i was not sure and went for other solution. I chang

help in understanding the sqlite3 backend

2018-07-07 Thread Sumit J
Hello, I am trying to understand the sqlite3 backend, especially the register_converter part. I wanted to understand why are those converters put in place? I commented out this registration and even then was able to to query the database in django shell via the ORM.. Even raw query execution re

Re: from django.contrib.auth.views import login

2018-07-07 Thread Phako Perez
hi, instead of from django.contrib.auth.views import login you need to use from django.contrib.auth import login regards. On Sat, Jul 7, 2018 at 6:41 AM, Ahmad wrote: > hello everyone, > > when i import this line it's not working. > from django.contrib.auth.views import login > > My Django

Re: Fresh Django with mod_wsgi and apache goes Time Out on 18.04

2018-07-07 Thread Kasper Laudrup
Hi Mohammad, On 2018-07-07 16:26, Mohammad Etemaddar wrote: I have installed Ubuntu server 18.04 and *VirtualMin* on it. installed python3-pip and then virtualenv. Also installed *libapache2-mod-wsgi-py3* Created new virtual server and configured the modwsgi for it. Also created fresh django we

Fresh Django with mod_wsgi and apache goes Time Out on 18.04

2018-07-07 Thread Mohammad Etemaddar
I have installed Ubuntu server 18.04 and *VirtualMin* on it. installed python3-pip and then virtualenv. Also installed *libapache2-mod-wsgi-py3* Created new virtual server and configured the modwsgi for it. Also created fresh django website for it. But I get Timeout error! Here is my apache config

Re: Django object to json

2018-07-07 Thread Bob Gailer
On Jul 7, 2018 7:42 AM, "Kamal Sharma" wrote: > > hi, > > I am facing a problem to get data from database in form of JSON. > > data = model.objects.all() > > now i have a big list in data and want to convert it into JSON. > how can i do it. import json json_biglist = json.dumps(biglist) Django m

Re: Django object to json

2018-07-07 Thread Mikhailo Keda
check - https://docs.djangoproject.com/en/2.0/topics/serialization/ -- 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

Re: Django object to json

2018-07-07 Thread Mikhailo Keda
check - http://www.django-rest-framework.org/api-guide/serializers/ -- 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

Re: How start django server automatically using pytest-django

2018-07-07 Thread prakash sharma
RE:'do you want to test on development server' NO, Drone is running the test cases.I don't want to run the runserver command. On Saturday, July 7, 2018 at 5:12:51 PM UTC+5:30, Kamal Sharma wrote: > > do you want to test on development server?? > > > On Sat, Jul 7, 2018 at 1:17 PM, prakash sharma

edit page (form) not shown

2018-07-07 Thread BeginnerB
Hi, I am really junior into Django. Really loving it, but stuck on this for 2 weeks. I have a models (ImpCalendar), which has a ForeignKey to Establishments. I do not use that foreignkey in the view/form so i don't know if it is relevant. I want to have a form for the ImpCalendar so I can edit

Re: How start django server automatically using pytest-django

2018-07-07 Thread prakash sharma
@Mikhailo I agree, that we should not use requests. But then what is point of using pytest-django then?? I am using pytest-django with the hope that it will manage and restart the server itself. On Saturday, July 7, 2018 at 4:41:25 PM UTC+5:30, Mikhailo Keda wrote: > > read more about testing

Re: from django.contrib.auth.views import login

2018-07-07 Thread Jason
you want LoginView https://docs.djangoproject.com/en/2.0/topics/auth/default/#django.contrib.auth.views.LoginView On Saturday, July 7, 2018 at 7:42:53 AM UTC-4, Ahmad wrote: > > hello everyone, > > when i import this line it's not working. > from django.contrib.auth.views import login > > My Dj

Re: How start django server automatically using pytest-django

2018-07-07 Thread Kamal Sharma
do you want to test on development server?? On Sat, Jul 7, 2018 at 1:17 PM, prakash sharma wrote: > Hi there, > I am facing issue that my django server is not started . > I want to run the pytest-django for test cases without manual runserver. > > Here is my test file: > > import requests

Django object to json

2018-07-07 Thread Kamal Sharma
hi, I am facing a problem to get data from database in form of JSON. data = model.objects.all() now i have a big list in data and want to convert it into JSON. how can i do it. Thanks Kamal Sharma -- You received this message because you are subscribed to the Google Groups "Django users" gr

from django.contrib.auth.views import login

2018-07-07 Thread Ahmad
hello everyone, when i import this line it's not working. from django.contrib.auth.views import login My Django Versions is 2.0 from django.conf.urls import url from . import views from django.contrib.auth.views import login urlpatterns = [ url(r'^$',views.home), url(r'^login/$', lo

Re: How start django server automatically using pytest-django

2018-07-07 Thread Mikhailo Keda
there is an example - https://bitbucket.org/voron-raven/tools-site/src/master/tool/tests/tests_views.py > to run tests: python manage.py test -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving ema

Re: How start django server automatically using pytest-django

2018-07-07 Thread Mikhailo Keda
read more about testing - https://docs.djangoproject.com/en/2.0/topics/testing/ you don't need to use requests, use testing client instead - https://docs.djangoproject.com/en/2.0/topics/testing/tools/#making-requests -- You received this message because you are subscribed to the Google Groups

Re: JSON serializable issue

2018-07-07 Thread Melvyn Sopacua
Hi, > However i am not > sure about it and i cannt find where to looking for. I am sending an > attachment with the bug. I have many days with it. > Thanks for any idea. This looks like you're trying to store an exception in a session, using the JSON session backend. Since json doesn't know how

How start django server automatically using pytest-django

2018-07-07 Thread prakash sharma
Hi there, I am facing issue that my django server is not started . I want to run the pytest-django for test cases without manual runserver. Here is my test file: import requests def test_demo(): response = requests.get('http://0.0.0.0:8000/' + "demo") assert (response.st