Re: do i always have to reload/return render a page to show the errors? if i press go back on browser, i see screens with the error message

2017-11-02 Thread James Schneider
On Thu, Nov 2, 2017 at 12:57 PM, fábio andrews rocha marques < fabioandrewsrochamarq...@gmail.com> wrote: > To use django forms is to use the django Form class and it's components on > a view? How will this solve the issue? If i use the components, don't i > have to re-render the page when a user

Re: postgres library in django using jython

2017-11-02 Thread Antonis Christofides
Hi, apparently you are confusing sqlite with postgresql. Could you show the full stack trace and error message, and your DATABASES setting? Regards, Antonis Antonis Christofides http://djangodeployment.com On 2017-11-02 20:23, Felipe Salazar wrote: > Hi all > > I a python developer that I

Re: do i always have to reload/return render a page to show the errors? if i press go back on browser, i see screens with the error message

2017-11-02 Thread fábio andrews rocha marques
To use django forms is to use the django Form class and it's components on a view? How will this solve the issue? If i use the components, don't i have to re-render the page when a user makes an error on the form? On Tuesday, October 31, 2017 at 7:50:38 PM UTC-3, James Schneider wrote: > > > >

postgres library in django using jython

2017-11-02 Thread Felipe Salazar
Hi all I a python developer that I don't use Django very frequently. I am facing a struggle these days because I am development APIs in Django but to deploy the project I want to pack the project in a war file, so that is the reason that I am using Jython. However, I am getting errors when I

Re: Cannot connect to 127.0.0.1 error

2017-11-02 Thread Jorge Gimeno
Check to see DATABASES is configured correctly in settings.py. An example of it looks like: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'myproject', 'USER': 'myprojectuser', 'PASSWORD': 'password', 'HOST': 'localhost',

Re: My first project - URL issue?

2017-11-02 Thread Tony King
> > Ok, well I've solved my immediate problem but clearly need to learn more > about JavaScript, jQuery and CSRF tokens. > But for anyone with a similar URL issue, I did the following; Added an appname setting to my urls.py appname = 'shopfront' urlpatterns = [ url(r'^$', views.index,

Cannot connect to 127.0.0.1 error

2017-11-02 Thread Aditya Vartak
Performing system checks... Unhandled exception in thread started by . wrapper at 0x02A52AE0> Traceback (most recent call last): File "D:\anaconda\lib\site-packages\django\db\backends\base\base.py", line 213 , in ensure_connection self.connect() File

Re: Re-runnable sql scripts in the migrations framework

2017-11-02 Thread James Schneider
On Nov 2, 2017 4:01 AM, "Chris Wedgwood" wrote: Hi As part of my deployment process I want to be able to have some db scripts that are re-runnable For example I have some internal configuration tables that I would like to be able to change values with a merge statement in

Re: Adding data via admin not visible on html template until restart server (python manage.py runserver)

2017-11-02 Thread avtar sandhu
In the end I created a new app and model and it worked correctly I never solved the original issue On Tuesday, 19 September 2017 15:42:59 UTC+2, avtar sandhu wrote: > > Please can anyone help me > > > I have a Django Model > > class Event(models.Model): scheduled_event = >

My first project - URL issue?

2017-11-02 Thread Tony King
Hi, I've started my first real project (django v1.11.4 and Python 3.6.2) and I'm probably trying to run before I'm ready, but anyway I'm here. I'm essentially trying to create a front-end menu, that will eventually launch and log-on to either a local application or another web-site. This

Re: Unable to use custom StaticFilesStorage

2017-11-02 Thread Stodge
There's a flaw in my plan as STATICFILES_STORAGE is a string and not a tuple. -- 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

Re: Pulling data from database

2017-11-02 Thread Derek
You can look at the guide in the docs: https://docs.djangoproject.com/en/1.11/howto/legacy-databases/ But as everyone will tell you; you need to have done a basic tutorial first (official or otherwise*), otherwise all the jargon will be confusing. After that, you can also look at areas such

Re: Pulling data from database

2017-11-02 Thread Jani Tiainen
Hi, And welcome to world of Django. You should start by reading official tutorial https://docs.djangoproject.com/en/1.11/intro/ If you feel that it's too compact, Django Girls do have much more verbose one https://tutorial.djangogirls.org/en/ On 2.11.2017 6.08, jay seattle wrote: New to

Re: Remove/undo a multi table inheritance

2017-11-02 Thread 'Tom Evans' via Django users
Does it work if you do it in several stages (each one is a separate migration action): * Add the OneToOneField, make it nullable, still using MTI * Add a python migration that populates it from the existing MTI information * Remove the MTI * Make the 1-2-1 field as you like it (remove null=True

Pulling data from database

2017-11-02 Thread jay seattle
New to Django, coming from C# and I am totally confused how you pull data from a database. I have a Postgres DB with a table "customer" created, but have NO idea how to connect to it. I have read a bunch of stuff but they all seem to work from the Model creation to database (migration), but if

Re: write custom decorators in django to authenticate the user

2017-11-02 Thread yves . mueller
Can you post an example of how you are using the decorator? If you are using it on a dispatch/get/post ... method of a class based views, it will still get the instance (self) as a first parameter. So you should take also self as an argument to your inner wrap method. Unrelated: Your wrap

Remove/undo a multi table inheritance

2017-11-02 Thread yves . mueller
Hi, I have introduced a multi table inheritance in the past. Now I am trying to remove it again by adding an explicit one-to-one relation from the child table to the parent. So my starting point is: from django.db import models class Place(models.Model): name =

Re-runnable sql scripts in the migrations framework

2017-11-02 Thread Chris Wedgwood
Hi As part of my deployment process I want to be able to have some db scripts that are re-runnable For example I have some internal configuration tables that I would like to be able to change values with a merge statement in the same file but not have to create a new migration file I suppose my