Re: my file uploads missing/deleted

2019-06-14 Thread Joe Reitman
Yes. Generate an access token from your Dropbox App Console and put it in your settings.py. The token is used to authenticate your Django app with your Dropbox app. DROPBOX_ROOT_PATH is the folder in your Dropbox App where you want to store your photos. You need to define it with this variable

Re: Create View not saving form data to database

2019-06-14 Thread Joe Reitman
Your passing strings as the first argument in your many-to-many fields. Shouldn't they be classes? Doc On Thursday, June 13, 2019 at 8:31:29 PM UTC-5, curtly critchlow wrote: > > CreateView class not saving data to databa

Django App - Database connection

2019-06-14 Thread Sapna Dhage
Hello, I'm implementing Django application using PostgreSQL. However, I'm not able to configure database connection string. Any idea how do I configure database connection and where should I mention database connection string? Thank you, Sapna -- You received this message because you are su

Django DATABASE_ROUTERS don't work

2019-06-14 Thread 李华才
# setting.py DATABASES = { 'remote': { 'ENGINE': 'django.db.backends.mysql', 'HOST': '10.0.3.57', 'NAME': 'fast_last', 'USER': 'faster', 'PASSWORD': 'mypassword', 'TEST': { 'MIRROR': 'default', } }, 'default':

Call a URLpattern via POST from a Django view through HttpResponseRedirect

2019-06-14 Thread Rohit Thapliyal
Here's the Django view: def get_date(request): if request.method == 'POST': form = DateForm(request.POST) if form.is_valid(): date = form.cleaned_data['date'] print(type(date)) return HttpResponseRedirect('schedule/{date}') else:

django user model error: Hello friends, I keep getting this error; "accounts.User.groups: (fields.E304) Reverse accessor for 'User.groups' clashes with reverse accessor for 'User.groups'. Please help

2019-06-14 Thread Kenaz Odhiambo
from django.contrib.auth.models import AbstractUser from django.core.validators import ( MinValueValidator, MaxValueValidator, RegexValidator ) from django.db import models from django.utils.translation import ugettext_lazy as _ from .managers import UserManager class User(Abstract

Re: Create View not saving form data to database

2019-06-14 Thread curtly critchlow
Thanks for your reply. The string is the class name according to the link u provides under Foreignkey is says "If you need to create a relationship on a model that has not yet been defined, you can use the name of the model, rather than the model object itself:" So I represented my class as a st

Re: Create View not saving form data to database

2019-06-14 Thread curtly critchlow
This is my entire models.py ``` from django.db import models from django.utils import timezone from django.urls import reverse_lazy, reverse # Create your models here. class Requisition(models.Model): # constants FROZEN = 'Frozen' CHILLED = 'Chilled/Cold Pack' DRYICE = 'Dry Ice' ROOMTEMP = 'Room

Re: my file uploads missing/deleted

2019-06-14 Thread omar ahmed
ok i did all steps but it still doesn't work .. this is my settings.py file : PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) STATIC_URL = '/static/' STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static') STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' DEFAU

Re: Django App - Database connection

2019-06-14 Thread Sipum Mishra
Hi sapna, Check your settings.py file and search for DATABASE there you can get a link which is commented. Copy n paste that url and that will take you to documentation page where you can get what needs to be imported in DATABASE. On Fri, 14 Jun, 2019, 4:45 PM Sapna Dhage, wrote: > > Hello, > >

Re: Django App - Database connection

2019-06-14 Thread Dave Edwards
These are the settings to use in settings.py: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'DB-NAME', 'USER': 'USER', 'PASSWORD':'PASSWORD', 'HOST':'HOST', 'PORT': 'PORT', 'OPTIONS': {'charset': 'utf8'} } } *Dave Edwards* Email > d...@dwedig

Re: Django App - Database connection

2019-06-14 Thread Dave Edwards
Apologies that was from when I used MySQL, please use the following for postgres: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'HOST':'HOST', 'PORT':'PORT', 'USER':'USERNAME', 'PASSWORD':'PASSWORD', 'NAME': 'DATABASE NAME', } } *Dave Edwards* Emai

Re: Create View not saving form data to database

2019-06-14 Thread curtly critchlow
I found the error. I didn't had a required field for my model present in my html. so I was submitting blank to a field that required and input. On Friday, 14 June 2019 07:04:38 UTC-4, Joe Reitman wrote: > > Your passing strings as the first argument in your many-to-many fields. > Shouldn't they

Re: Django App - Database connection

2019-06-14 Thread Ing.Daniel Bojorge
You can use psycopg2 then in your settings must have something like this: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': DATABASENAME, 'USER': YOURUSER, 'PASSWORD': YOURPASSWORD, 'HOST': SERVER, 'PORT': PO

Re: Django apk

2019-06-14 Thread Ing.Daniel Bojorge
You can create an app (apk), with embbed access to a public site. You can use APP INVENTOR Dios L@s Bendiga Saludos, [image: --] daniel.bojorge [image: http://]about.me/daniel.bojorge *Curso Desarrollo Web con Python usando Django 2.1 Para P