Re: Create ModelForms to create ModelForms

2017-08-02 Thread Thiago Luiz Parolin
Hi, Try using this app: Django-fobi https://github.com/barseghyanartur/django-fobi I've never used it, but it looks very promising. 2017-08-01 21:15 GMT-03:00 Shazia Nusrat : > I need to create a frontend app where I can use forms to create forms such > as Google Surveys or Survey Monkey kind of

define database modelwise in django

2017-08-02 Thread kartik danidhariya
I just tried to find a solution for define database model wise in Django. like in my settings.py there are three databases settings.py DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), }, 'db_one': {

Re: define database modelwise in django

2017-08-02 Thread threesixright
Have a look here: https://docs.djangoproject.com/en/1.11/topics/db/multi-db/ Basically: >>> # This will run on the 'default' database. >>> Author.objects.all() >>> # So will this. >>> Author.objects.using('default').all() >>> # This

Re: define database modelwise in django

2017-08-02 Thread SHAILESH NEGI
You can create it from dbshell using different database credentials. On 8/2/17, kartik danidhariya wrote: > > > I just tried to find a solution for define database model wise in Django. > like in my settings.py there are three databases > > settings.py > > DATABASES = { > 'default': { >

Define middleware per app?

2017-08-02 Thread Robert Stepanek
I am new to Django and my project consists of two apps: a typical blog-style web site app and an API app. For the latter, I do not need the majority of middleware that is configured by default. Yet, I can't figure out what's the best approach to use the default middleware stack for the web site

migration problem on mysql

2017-08-02 Thread 冯炜尧
if your database default charset is different than your database charset, and you have a model whose id is varchar, and you want to reference this model as foreignKey, then you would probably fail on the migration with error as `1215, u'Cannot add foreign key constraint'` -- You received this

Re: Define middleware per app?

2017-08-02 Thread Jani Tiainen
Hi, What is the problem that your’e trying to resolve with middlewares and why you think that you can’t use defaults as is? > On 2 Aug 2017, at 14.59, Robert Stepanek wrote: > > I am new to Django and my project consists of two apps: a typical blog-style > web site app and an API app. For th

Re: Turn off migrations completely in Django 1.7

2017-08-02 Thread Tim Graham
Perhaps giving some actionable, constructive feedback would be more useful. On Tuesday, August 1, 2017 at 6:50:47 PM UTC-4, Robert F. wrote: > > I know this is an old topic but I completely agree with Frank. Nothing > gives me more headaches and makes me want to move off Django more than > migr

Re: Create ModelForms to create ModelForms

2017-08-02 Thread bobhaugen
We're using Fobi in https://github.com/FreedomCoop/valuenetwork Works pretty well. Does what it promises. Dev has been responsive to issues. On Wednesday, August 2, 2017 at 5:55:21 AM UTC-5, Thiago Luiz Parolin wrote: > > Hi, > Try using this app: > Django-fobi https://github.com/barseghyanartur/d

if user double-clicks form submit with csrf token, even with redirect on POST browser shows 403 FORBIDDEN and csrf failed message

2017-08-02 Thread Mark Mikofski
okay, this is weird. If a user double-clicks the form submit button, even tho POST should redirect, they still get 403 FORBIDDEN with csrf failed message. I think this is like a web developer question, is this some latency issue with my browser, network or web server? I use Apache-2 httpd with

Re: Django Python OSError No such file or directory but file exists

2017-08-02 Thread Александр Христюхин (roboslone)
Hi, Are you sure s3file contains absolute path? I can't see where s3upload is being called. Also, you might wanna use os.remove instead of calling subprocess. You also might wanna check out PEP-8 and Sphinx for your docstrings. > On 2 Aug 2017, at 02:28, Ronaldo Bahia wrote: > > Hi everyone,

Re: Turn off migrations completely in Django 1.7

2017-08-02 Thread Jani Tiainen
Hi, We've been hitting this issue as well in our environment - so far we've been able to workaround this by using fake migrations but that is not long lasting solution. We're using Oracle as our database backend and we have hundreds of legacy databases which aren't unified at their schema bu