Form field label template

2018-02-09 Thread jorrit787
I want to improve the look of my forms with Materialize CSS (http://materializecss.com/forms.html), which requires some fields to have a div with class input-field around the input AND the label. I figured I could use the new template-based widget rendering, but to my surprise those templates

Re: Disable single instance of a system check warning

2018-02-09 Thread Tim Graham
There is not, but there's an open ticket for that enhancement. https://code.djangoproject.com/ticket/26472 On Friday, February 9, 2018 at 6:58:08 AM UTC-5, Mattias Linnap wrote: > > Hi djangonauts, > > > System check identified some issues: > > > HINT: ForeignKey(unique=True) is usually better

Re: Troubleshooting Constraint Already Exists

2018-02-09 Thread jasonbnance
I was able to work around the issue by dumping out the SQL for the migration that was failing (manage.py sqlmigrate ...) and running through the steps manually (skipping the "already exists" constraints) and finally marking the migration as completed (with a --fake). j On Friday, February 9,

Re: django migrating from sqlite3 to oracle gives error ORA-02000

2018-02-09 Thread Jani Tiainen
Hi. Could you give full traceback and preferably migration code that fails. Just Oracle error code isn't enough to help you. 9.2.2018 23.12 "Mohamed Saleh" kirjoitti: > I hava a Django app on a windows server 2012 which was set up with sqlite3 > as the db, but

django migrating from sqlite3 to oracle gives error ORA-02000

2018-02-09 Thread Mohamed Saleh
I hava a Django app on a windows server 2012 which was set up with sqlite3 as the db, but it's going to production so I'm migrating the tables to oracle 12c on the server, i don't care about the data just the tables so when I run python manage.py migrate I get ORA-2000 Error: missing

Re: How to install and use Django

2018-02-09 Thread Etienne Robillard
i found that the best way to confuse a newbie python/django programmer is to invite him/her to use virtualenv. Virtualenv is absolutely NOT required for properly running django in development or production mode. a most flexible approach is to install django in development mode: $ cd

Troubleshooting Constraint Already Exists

2018-02-09 Thread jasonbnance
Hello all, I'm using 1.11 and have a migration that is throwing: django.db.utils.ProgrammingError: constraint "inventory_ltmvirtualserver_ltm_id_47dc1635_fk" for relation "inventory_ltmvirtualserver" already exists I'm having troubles figuring this out for a couple reasons. First, the

How to install and use Django

2018-02-09 Thread James Farris
I highly recommend installing virtualenv and virtualenvwrapper. This will reduce the stress of creating a bunch of unnecessary modules on your computer and contain each project you create in a separate environment. For example you wouldn’t necessarily want to install Django globally but rather

Re: Testing Channels 2.0 consumers - problem with routing

2018-02-09 Thread Andrew Godwin
A disconnect() method in your generic consumer takes one argument, a `close_code` - add that in to your function and it will fix it. Feel free to continue problems in this thread, or you can also use GitHub issues on the channels project if you think they're actual bugs! Andrew On Fri, Feb 9,

GIS Address Form Creation

2018-02-09 Thread Shazia Nusrat
Hi, I am trying to create a simple location form from GIS models and following GeoDjango tutorial and after completing the tutorial I am still confused about how to go for it. What I need is that users come in on my page and they select their location from the map and it should save in the

models.OuterRef('date') + timedelta(days=2) error

2018-02-09 Thread Michael Barr
class SampleModel(models.Model): date = models.DateField() value = models.IntegerField() subquery = SampleModels.objects.filter( date__gte=models.OuterRef('date') - timedelta(days=2), date__lte=models.OuterRef('date') + timedelta(days=2), value__lte=30 ) queryset =

OuterRef not being treated as an F Expression

2018-02-09 Thread Michael Barr
According to the documentation on models.OuterRef : It acts like an F > > expression > except that the

Re: Testing Channels 2.0 consumers - problem with routing

2018-02-09 Thread Azamat Galimzhanov
Thanks for reply! self.scope looks like this: {'type': 'websocket', 'path': 'auctions/1/', 'headers': [], 'subprotocols': []} I am not sure why url_route is not there. I rewrote my group_name code to use path instead and now this part works. There is a new error though, during disconnect,

Disable single instance of a system check warning

2018-02-09 Thread Mattias Linnap
Hi djangonauts, > System check identified some issues: > HINT: ForeignKey(unique=True) is usually better served by a OneToOneField. I would like to keep using ForeignKey(unique=True) for this particular model, and mark the warning as disabled for this model only (keep it enabled project-wide

Re: One domain doesn't work for multiple django projects in one DigitalOcean droplet

2018-02-09 Thread Etienne Robillard
Um, i think it would be much easier to deploy if you use one droplet per project. Etienne Le 2018-02-08 à 16:48, Shaojun Xie a écrit : | BioTLDR ## #Listen 80 WSGISocketPrefix /mnt/volume-nyc1-02/project/BioTLDR/wsgi/wsgi  ServerName