Re: define form in yaml file

2013-01-25 Thread Tom Christie
Also, you might want to take a look at the Django Forms in an API world talk. A large portion of that is about serializing form definitions into JSON, for use by both HTML and non-HTML clients. (eg mobile) The project it talks a

regex

2013-01-25 Thread arm
Hi, I'm trying to figure out the regular expressions that will match any number and punctuation and chars like +,#,§ etc . Any advice? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googleg

Re: define form in yaml file

2013-01-25 Thread Adrian Andreias
vineri, 25 ianuarie 2013, 00:57:58 UTC+2, Chris Hinds a scris: > > Hey, > > I've got a project where models, forms and templates are all generated > from a single yaml file. It works well here as the forms are long, with a > fair amount of layout and plenty of formsets. > > I'm doing a refact

Re: define form in yaml file

2013-01-25 Thread Adrian Andreias
Hi, Yes, this sounds interesting. Push to github if your project allows this. :) Thank you vineri, 25 ianuarie 2013, 00:57:58 UTC+2, Chris Hinds a scris: > > Hey, > > I've got a project where models, forms and templates are all generated > from a single yaml file. It works well here as the for

Re: define form in yaml file

2013-01-25 Thread Adrian Andreias
Hi Leonardo, I was talking about something I want to implement (or looking for a 3rd party implementation), not a standard Django feature. Users would define forms in format they input, which in turn will be used to generate forms displayed in browser for other users. If I allow users to input

Foreing Key field going null in INSERT sql when use inlineformset

2013-01-25 Thread Fellipe Henrique
I have this models: class Pedido(models.Model): idvenda_pedido = models.IntegerField(verbose_name=u"Código", primary_key=True, null=False) num_nota = models.IntegerField(verbose_name=u'Nº Nota', blank=True, null=True) class ItensPedido(models.Model): idvenda_pedido_itens = models.Int

Re: regex

2013-01-25 Thread Larry Martell
On Fri, Jan 25, 2013 at 2:09 AM, arm wrote: > > Hi, > > I'm trying to figure out the regular expressions that will match any > number and punctuation and chars like +,#,§ etc . Any advice? http://www.regular-expressions.info/charclass.html -- You received this message because you are subscribe

RE: regex

2013-01-25 Thread Babatunde Akinyanmi
'.' matches any character except a new line Sent from my Windows Phone -- From: arm Sent: 1/25/2013 10:09 AM To: django-users@googlegroups.com Subject: regex Hi, I'm trying to figure out the regular expressions that will match any number and punctuation and chars like

Re: Django & Oracle connection problem

2013-01-25 Thread Dan Gentry
You've probably already tried the simple things: - Confirm that the server name and port are correct. - Ensure that firewall/routing rules will allow the connection. - Try a simple connection on the same box with sqlplus. Walking through this list has helped me a number of times.

Which django-cart fork should I use?

2013-01-25 Thread frocco
Hello, I installed pip install django-cart, but am having issues when trying to update a cart with a different qty. nothing happens. I see no errors in debug. a new product is added ok, but if I try and add the product again, the qty is not changed. if I call the update_cart method, the qty is

Re: Which django-cart fork should I use?

2013-01-25 Thread Leonardo S
Hi, I used this fork once http://code.google.com/u/101353298620714815735/ But i didn't install. I created my own version based on its code. Em sexta-feira, 25 de janeiro de 2013, frocco escreveu: > Hello, > I installed pip install django-cart, but am having issues when trying to update a cart wi

Re: Django & Oracle connection problem

2013-01-25 Thread Dylan Klomparens
Hmm, ok so I guess having a different user name isn't causing the problem. I was able to connect to the database from the webserver using SQL Developer, and I am sure the credentials are correct. Are there any configuration steps that I need to perform for Instant Client or cx_Oracle? So far, I

Please explain this django admin code

2013-01-25 Thread Tundebabzy
I'll be really grateful if someone can take the time to explain these lines of code. Its from contrib.admin.options def wrap(view): def wrapper(*args, **kwargs): return self.admin_site.admin_view(view)(*args, **kwargs) # This is the brain twisting line

Re: Foreing Key field going null in INSERT sql when use inlineformset

2013-01-25 Thread Anderson
Hi Felipe try autoField is auto increment. On Fri, Jan 25, 2013 at 4:53 AM, Fellipe Henrique wrote: > I have this models: > > > class Pedido(models.Model): > idvenda_pedido = models.IntegerField(verbose_name=u"Código", > primary_key=True, null=False) > num_nota = models.IntegerField(verb

[ver 1.5] AbstractBaseUser not found?

2013-01-25 Thread scott212
I'm trying to take Django 1.5 for a spin (used older versions for a while) to create a basic user that authenticates by email. I'm using the docs for 1.5 and it says to inherit AbstractBaseUser but oddly, it doesn't seem to be available to use. Here's my code: from django.db import models clas

Re: [ver 1.5] AbstractBaseUser not found?

2013-01-25 Thread scott212
Here's the docs I'm using: https://docs.djangoproject.com/en/dev/topics/auth/customizing/#specifying-a-custom-user-model On Friday, January 25, 2013 7:00:47 AM UTC-8, scott212 wrote: > > I'm trying to take Django 1.5 for a spin (used older versions for a while) > to create a basic user that aut

Re: [ver 1.5] AbstractBaseUser not found?

2013-01-25 Thread Joey Espinosa
Scott, There is no django.db.models.AbstractBaseUser model. Try adding this to your import statements: from django.contrib.auth.models import AbstractBaseUser Hope that helps. -- Joey "JoeLinux" Espinosa* *

RE: Please explain this django admin code

2013-01-25 Thread Babatunde Akinyanmi
I found it. Django.contrib.admin.sites defines AdminSite which provides the admin_view method Sent from my Windows Phone -- From: Tundebabzy Sent: 1/25/2013 3:36 PM To: django-users@googlegroups.com Subject: Please explain this django admin code I'll be really grateful

Re: Problem configuring Django 1.5b2 with PostGIS 2.0

2013-01-25 Thread Joe Jasinski
I've been experiencing the same issue on OSX 10.8.2. $ ./manage.py shell ImproperlyConfigured: Could not import user-defined GEOMETRY_BACKEND "geos". I've installed Postgresapp (http://postgresapp.com/documentation), which includes Postgres 9.2.2, PostGIS 2.0.2, GEOS 3.3.5, and Proj (not sure

Moving a Django website to another server

2013-01-25 Thread John Robertson
Hi there, if I want to move a Django website to another host, is it as simple as copying across all the site files and DB (and changing config files)? If so, is there some kind of tool to create a zipped folder of the website so that FTP does not take several hours! Sorry if this seems a very b

Re: Please explain this django admin code

2013-01-25 Thread Russell Keith-Magee
On Fri, Jan 25, 2013 at 10:36 PM, Tundebabzy wrote: > I'll be really grateful if someone can take the time to explain these > lines of code. Its from contrib.admin.options > > def wrap(view): > def wrapper(*args, **kwargs): > return self.admin_site.admin_view(v

regarding output

2013-01-25 Thread nrapeee
from reportlab.pdfgen import canvas from django.http import HttpResponse def some_view(request): # Create the HttpResponse object with the appropriate PDF headers. response = HttpResponse(mimetype='application/pdf') response['Content-Disposition'] = 'attachment; filename="somefilename

Re: Moving a Django website to another server

2013-01-25 Thread Oscar Carballal
For our project e-cidadania it was like that, we only had to make a clone of the git repository and we made a symbolic link to the config files (so we can pull the code without affecting the config). After that we made an import into the new database, fix the config files et voilá. You can try SSH

Re: Please explain this django admin code

2013-01-25 Thread carlos
excellent explanation did not know anything about it thank Russ :) On Fri, Jan 25, 2013 at 9:08 AM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > > > On Fri, Jan 25, 2013 at 10:36 PM, Tundebabzy wrote: > >> I'll be really grateful if someone can take the time to explain these >> line

Re: Foreing Key field going null in INSERT sql when use inlineformset

2013-01-25 Thread Fellipe Henrique
I can't use AutoField, because I need to use my StoreProcedure. I use this StoreProcedure in my Delphi application. T.·.F.·.A.·. S+F *Fellipe Henrique P. Soares* *"Quemadmodum gladius neminem occidit, occidentis telum est."* (Epistulae morales ad Lucilium

Model and ModelForm validation

2013-01-25 Thread Fabio Natali
Hi everybody. I am reading this [0] and can't perfectly understand what this line means: "Note that full_clean() will not be called automatically when you call your model's save() method, nor as a result of ModelForm validation. You'll need to call it manually when you want to run one-step mod

Again, Model and ModelForm validation

2013-01-25 Thread Fabio Natali
Hi everybody, suppose I have a model and want to add some custom validation to *just one* of its fields. Using Django 1.4 here. I expect that specific validation constraint to be used both in my forms and in my save method. Should I better use Model clean_fields() method? Or the clean() one

Re: regarding output

2013-01-25 Thread Bill Freeman
Let's divide and conquer. Try commenting out the stuff creating and using "p" and instead do response.write("this is a test") See if you get a file to save in the browser, and save it, rather than opening it, since it won't really be pdf. Then look at the file with something like less in a co

Re: Moving a Django website to another server

2013-01-25 Thread Bill Freeman
What kind of hosts? if both are linux, then tar is your friend, using the -z or -j options to create compressed archives, though zip and unzip commands are likely available too. If you use ftp (faster, but less secure than scp/sftp), be sure to transfer in binary mode (text is the default, and wi

Re: Moving a Django website to another server

2013-01-25 Thread Oscar Carballal
Bill has a point, I assumed both were VPSs that had the same services, software and directory structures. If you change that, then it will be a bit more of work :) 2013/1/25 Bill Freeman : > What kind of hosts? if both are linux, then tar is your friend, using the > -z or -j options > to create c

Re: 2 projects, 2 apps, bad templates ...

2013-01-25 Thread Micky Hulse
Hi Tomas! A million thanks for you help! On Thu, Jan 24, 2013 at 7:34 PM, Tomas Neme wrote: > really, it should be your SHORT term goal. Without airing our dirty laundry, I can't argue with that. I will push a little harder to get us to convert our projects to envs sooner than later. :) > As fo

Re: 2 projects, 2 apps, bad templates ...

2013-01-25 Thread Micky Hulse
On Thu, Jan 24, 2013 at 7:38 PM, Tomas Neme wrote: > just to clarify: > Whoa, that really helps clarify the setup!!! Very helpful! Thank you Tomas!!! Until we can convert to virtual envs, your suggested solution(s) and fixes should make me sleep easier at night. Have an awesome day! :) Cheers

RE: Please explain this django admin code

2013-01-25 Thread Babatunde Akinyanmi
Thanks Russ :) Sent from my Windows Phone -- From: Russell Keith-Magee Sent: 1/25/2013 4:08 PM To: django-users@googlegroups.com Subject: Re: Please explain this django admin code On Fri, Jan 25, 2013 at 10:36 PM, Tundebabzy wrote: > I'll be really grateful if some

RE: Please explain this django admin code

2013-01-25 Thread Babatunde Akinyanmi
Thanks Russ :) Sent from my Windows Phone -Original Message- From: Russell Keith-Magee Sent: 1/25/2013 4:08 PM To: django-users@googlegroups.com Subject: Re: Please explain this django admin code On Fri, Jan 25, 2013 at 10:36 PM, Tundebabzy wrote: I'll be really grateful if someone

Getting related values from map table with foreign keys

2013-01-25 Thread Isaac Perez
Hi, I'm building an app that has some text with tags, the tags are mapped to the text through a mapping table (toxi model). Something like that: TEXTID <-->TAGID<-->TAGID TEXT TEXTID TAG What would be the best way to display the text and its tags? I'm very new to dja

ImageField upload_to issue

2013-01-25 Thread Sammael
Hello, folks! Here is the relevant part of my model: def i_upload_to(instance, filename): return '/'.join([strftime('i/%y%m/%d'), filename]) def t_upload_to(instance, filename): return '/'.join([strftime('t/%y%m/%d'), filename]) class Image(models.Model): ima

Re: ImageField upload_to issue

2013-01-25 Thread Leonardo S
There is no t_upload_path 2013/1/25 Sammael > Hello, folks! > > Here is the relevant part of my model: > > def i_upload_to(instance, filename): > return '/'.join([strftime('i/%y%m/%d'), filename]) > > def t_upload_to(instance, filename): > return '/'.join([strftime('t/%y

Re: Moving a Django website to another server

2013-01-25 Thread Adrián Espinosa
If both hosts are Linux, you can use "rsync -avuzr source destination". Option -z enables compression On Friday, January 25, 2013 11:20:49 AM UTC+1, John Robertson wrote: > > Hi there, if I want to move a Django website to another host, is it as > simple as copying across all the site files and

Re: Moving a Django website to another server

2013-01-25 Thread Addy Yeow
I was looking for a consistent and error-free deployment as I switch between servers frequently despite using the same public domain. rsync was great but I had to manually reload server thereafter or issue a syncdb, etc. I have since moved to Fabric for my deployment needs. See http://docs.fabfile

Where do I place a CSV file so that it can displayed DYGraph Visualization in the Browser?

2013-01-25 Thread Naval Gupte
Hi, I am trying to use DYGraphs to have a Charting utility in my Web Browser. The instructions say "Make sure your CSV file is readable and serving from a place that understands XMLHttpRequest's". Where should I place this file in my Django Project? I can get the tool to display the chart, if I

webhosting for django projects with SQLite

2013-01-25 Thread Dandan
Which webhosting services support django and SQLite? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@goog

Re: webhosting for django projects with SQLite

2013-01-25 Thread Carlos Daniel Ruvalcaba Valenzuela
I can only speak for what I have tried, Webfaction can be an option that supports what you want and is a simple as regular hosting, if you are going for the cheap vps route any will do as you have direct control over the python install, modules or virtualenv in the server. Regards, Carlos Ruvalcab

Re: webhosting for django projects with SQLite

2013-01-25 Thread Frankline
+1 for Webfaction. Simple to use. Though I'm using Postgres, SQLite can also be used IMO. On Sat, Jan 26, 2013 at 8:31 AM, william ratcliff < william.ratcl...@gmail.com> wrote: > I'll second webfaction, but just curious--why SQLite? They make Postgres > not so hard to set up... > > > On Sat, Ja

Re: [ver 1.5] AbstractBaseUser not found?

2013-01-25 Thread scott212
Thanks, Joey! Would've saved me a lot of time if they'd included that in the example! -s On Friday, January 25, 2013 7:04:08 AM UTC-8, JoeLinux wrote: > > Scott, > > There is no django.db.models.AbstractBaseUser model. Try adding this to > your import statements: > > from django.contrib.aut