Re: Migrations During Development

2015-04-25 Thread Carl Meyer
On 04/25/2015 05:18 PM, Carl Meyer wrote: > You can use the "squash" feature [1] to squash a set of historical > migrations down to a single migration. Forgot this link: https://docs.djangoproject.com/en/1.8/topics/migrations/#squashing-migrations Carl -- You received this message because you a

Re: Migrations During Development

2015-04-25 Thread Carl Meyer
On 04/25/2015 11:28 AM, Timothy W. Cook wrote: > if you don't store migrations, then you have to generate them on each > production update, right? if so, wouldn't they count as untested > code? how about manually tweaked, or data migrations? > > > ​That will certainly be true once y

Re: Migrations During Development

2015-04-25 Thread Carl Meyer
On 04/25/2015 11:15 AM, Javier Guerra Giraldez wrote: > On Sat, Apr 25, 2015 at 12:08 PM, Timothy W. Cook > wrote: >> >> On Sat, Apr 25, 2015 at 9:48 AM, Jorge Andrés Vergara Ebratt >> wrote: >>> >>> Are you using version control like GIT? I save the migration >>> folder with the __init__.py in

Re: Migrations During Development

2015-04-25 Thread Carl Meyer
On 04/25/2015 06:48 AM, Jorge Andrés Vergara Ebratt wrote: > Are you using version control like GIT? I save the migration folder with > the __init__.py in GIT, nothing else, because al the migrations will be > diferent in the diferent servers. This is not a good idea. Migrations should be committe

Python suds with Keystore

2015-04-25 Thread nadaei...@gmail.com
HI All, I am trying to consume wsdl with suds using keystore i am getting forbiden since suds is not including the keystore in the request: co = Client('https://10.102.5.81:901/APIService.svc?singleWsdl') co.options.wsse.keystore = Keystore() co.options.wsse.keystore.addKey(Rs

Re: Migrations During Development

2015-04-25 Thread Abhaya Agarwal
Hi Timothy, Assuming as an example that 0002_<>.py is the migration that you have already applied to production server, this is the scheme I follow: - Make sure you have your local db up to date i.e. all the model changes have been applied to database. - Fake a reversal to the last migra

Re: Admin Inlines

2015-04-25 Thread Timothy W. Cook
For reference. My mistake is that I really have a ManyToMany relationship and I used this http://www.mc706.com/tip_trick_snippets/18/django-manytomany-inline-admin/ to solve the problem. Thanks to Ryan McDevitt. On Sat, Apr 25, 2015 at 3:11 PM, Timothy W. Cook wrote: > The usage of AdminInl

Admin Inlines

2015-04-25 Thread Timothy W. Cook
The usage of AdminInlines seems backwards to me. At least in the use case I have. I have two models: DvInterval: lower = models.CharField(max_length=110) upper = models.CharField(max_length=110) ... ReferenceRange: ​ ​ ​ ​ ... ​data_range = models.ForeignKey(DvInterval)

Re: Migrations During Development

2015-04-25 Thread Javier Guerra Giraldez
On Sat, Apr 25, 2015 at 12:28 PM, Timothy W. Cook wrote: > On Sat, Apr 25, 2015 at 2:15 PM, Javier Guerra Giraldez > wrote: >> if you don't store migrations, then you have to generate them on each >> production update, right? if so, wouldn't they count as untested >> code? how about manually tw

Re: Migrations During Development

2015-04-25 Thread Timothy W. Cook
On Sat, Apr 25, 2015 at 2:15 PM, Javier Guerra Giraldez wrote: > > > with South i used to save them to the repo too and push whole to > production. haven't tried Django migrations yet; is there any > difference that make this more appropriate? > > ​Hmmm, good question. That was kind of my quest

Re: Migrations During Development

2015-04-25 Thread Javier Guerra Giraldez
On Sat, Apr 25, 2015 at 12:08 PM, Timothy W. Cook wrote: > > On Sat, Apr 25, 2015 at 9:48 AM, Jorge Andrés Vergara Ebratt > wrote: >> >> Are you using version control like GIT? I save the migration folder with the >> __init__.py in GIT, nothing else, because al the migrations will be diferent

Re: Migrations During Development

2015-04-25 Thread Timothy W. Cook
On Sat, Apr 25, 2015 at 9:48 AM, Jorge Andrés Vergara Ebratt < javebr...@gmail.com> wrote: > Are you using version control like GIT? I save the migration folder with > the __init__.py in GIT, nothing else, because al the migrations will be > diferent in the diferent servers. > > ​This is probably

Re: Concept of partial views to be resolved from other views or template tags

2015-04-25 Thread Stephan Herzog
Thanks for your reply. We are actually using ESIs in one place or another and one of the projects I have in mind for refactoring currently uses ESI to achieve something similar. Varnish however is an additional layer on the server that in many of our cases is not really necessary (as in either n

Re: Django Admin should really support Twitter Bootsrap

2015-04-25 Thread Derek
I am a satisfied user of django-suit. Right now there is beta-testing going on of the upgrade from Bootstrap 2 to 3... On Wednesday, 15 April 2015 15:45:36 UTC+2, bobhaugen wrote: > > On Monday, April 13, 2015 at 5:16:40 PM UTC-5, Patrick Lemiuex wrote: >> >> It's about time, the django admin to

Re: importing csv data into database

2015-04-25 Thread Andrew Farrell
Ah, I suppose that bit didn't get sent. Google groups only lets mail from my old gmail address through and bounces mail from the MIT address I use by default. I noticed something else about your code: you are assigning 2-tuples to all of your data types rather than strings when you do data.Pers

Re: Concept of partial views to be resolved from other views or template tags

2015-04-25 Thread Javier Guerra Giraldez
On Sat, Apr 25, 2015 at 3:11 AM, Stephan Herzog wrote: > I like that approach because it leads to any partial being a separated piece > of logic that can be tested and developed on a dedicated url. If necessary > it can be wrapped in a templatetag, which makes it easy to use from the > template la

Internal Server Error os:win8.1 django1.8+apache2.4.12(win64)vc10+wsgi4.4.11+python3.4.3

2015-04-25 Thread gnuhurd92
[Sat Apr 25 17:07:18.811184 2015] [mpm_winnt:notice] [pid 2456:tid 532] AH00455: Apache/2.4.12 (Win64) PHP/5.6.8 mod_wsgi/4.4.11 Python/3.4.3 configured -- resuming normal operations [Sat Apr 25 17:07:18.811184 2015] [mpm_winnt:notice] [pid 2456:tid 532] AH00456: Apache Lounge VC10 Server buil

Re: Migrations During Development

2015-04-25 Thread Mike Dewhirst
On 25/04/2015 10:26 PM, Timothy W. Cook wrote: Django 1.8 Â Python 3.4 PostgreSQL 9.3 During development I am creating several migrations. It seems unnecessary to keep these since they only exist on my dev machine. Â Any data that I have created can be thrown away too. Is it safe to delete thes

Re: Migrations During Development

2015-04-25 Thread Jorge Andrés Vergara Ebratt
Are you using version control like GIT? I save the migration folder with the __init__.py in GIT, nothing else, because al the migrations will be diferent in the diferent servers. On Sat, Apr 25, 2015, 7:45 AM Filipe Ximenes wrote: > You should keep all project migrations, they will be used to up

Re: Migrations During Development

2015-04-25 Thread Filipe Ximenes
You should keep all project migrations, they will be used to update the database everytime a change is made. This applies to your local project, the staging server (if you have one) and your production server. If you are worried about having to many migrations, you can delete the ones that were not

Re: importing csv data into database

2015-04-25 Thread sum abiut
Ok , i manage to figure out where the error was coming from in my view.py on line readata=csv.reader(csvfile,delimiter=';', quotechar='|'). The* delimiter =';'* i change the semicolon to a comma The* delimiter =','* and it works. However when the data are imported from the csv file to the model

Migrations During Development

2015-04-25 Thread Timothy W. Cook
Django 1.8 Python 3.4 PostgreSQL 9.3 During development I am creating several migrations. It seems unnecessary to keep these since they only exist on my dev machine. Any data that I have created can be thrown away too. Is it safe to delete these migrations (and the database) before deploying to

Concept of partial views to be resolved from other views or template tags

2015-04-25 Thread Stephan Herzog
Hi all, I am wondering if the following is considered a bad practice and might lead to issues. I think it provides a useful pattern, for example for creating template tags or simple ajax use cases where the rendered result of a partial will get frequently updated. # partials.py class SomeParti

Re: Django restframework based app on heroku showing error HTTP/1.1 505 HTTP Version Not Supported

2015-04-25 Thread Stephen J. Butler
Your HTTP Request is malformed. You have 2 spaces between the URI and the HTTP version (rfc says only 1). Also, after your Content-Length header you have an extra \r\n which will terminate the set of headers and put the rest in the body. On Fri, Apr 24, 2015 at 11:50 AM, Anand Singh wrote: > I ne

Re: ModelForm not creating field with required options

2015-04-25 Thread Stephen J. Butler
You need to set Form.required_css_class https://docs.djangoproject.com/en/1.8/ref/forms/api/#styling-required-or-erroneous-form-rows On Fri, Apr 24, 2015 at 2:30 PM, victor menezes wrote: > Hi all, > > I'm using Django 1.8 and having trouble to because my form does not generate > fields with req