Re: How do I start with this project with django

2014-03-14 Thread mulianto
Hi Rob, For storing uploaded user files, you should put it in media folder, not static folder. Static for your app file like css/js/images. Of course you have to protect the file can be uploaded, in your view you can check the extension of file you allow. Regards Mulianto B : Http://mulianto

Re: do I need to run syncdb when I change the default value in a field of a model?

2014-03-14 Thread Russell Keith-Magee
On Sat, Mar 15, 2014 at 7:19 AM, Jonathan Baker < jonathandavidba...@gmail.com> wrote: > Does that mean that the default="" functionality is implemented by the > ORM, instead of in the database layer? > > This is correct - Django's "default" argument is an API level default, not a database level d

Re: [newbie] -- Regex-matching ("Tango with Django")

2014-03-14 Thread Shawn Milochik
You're meant to only have one include that redirects URLs beginning with rango to the app's urls.py. Then, the app's urls.py must not have /rango in the URLs. The idea is that all URLs starting with "rango" get the "rango" stripped off and passed to the rango app, which itself has / and /about. -

[newbie] -- Regex-matching ("Tango with Django")

2014-03-14 Thread David
Dear list, I am wodering whether my implementation is incorrect or whether there is a typo in the textbook. My question is how I can make sense of these instructions: "The regular expression to match about/ is r'^about/'". I was following the "Tango with Django" book. In the exercises of chapter

Re: do I need to run syncdb when I change the default value in a field of a model?

2014-03-14 Thread Craig Schmidt
On Mar 14, 2014, at 7:24 PM, Shawn Milochik wrote: > On Fri, Mar 14, 2014 at 7:19 PM, Jonathan Baker > wrote: > Does that mean that the default="" functionality is implemented by the ORM, > instead of in the database layer? > > > Perhaps I'm wrong -- I'm looking at my South migrations and th

Re: do I need to run syncdb when I change the default value in a field of a model?

2014-03-14 Thread Shawn Milochik
On Fri, Mar 14, 2014 at 7:19 PM, Jonathan Baker < jonathandavidba...@gmail.com> wrote: > Does that mean that the default="" functionality is implemented by the > ORM, instead of in the database layer? > > Perhaps I'm wrong -- I'm looking at my South migrations and they do pass the defaults. I beli

Re: do I need to run syncdb when I change the default value in a field of a model?

2014-03-14 Thread Jonathan Baker
Does that mean that the default="" functionality is implemented by the ORM, instead of in the database layer? On Fri, Mar 14, 2014 at 5:16 PM, Shawn Milochik wrote: > No, no syncdb required. The default applies to newly-created instances, > not existing ones. > > -- > You received this message b

Re: do I need to run syncdb when I change the default value in a field of a model?

2014-03-14 Thread Shawn Milochik
No, no syncdb required. The default applies to newly-created instances, not existing ones. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr.

Re: messaging

2014-03-14 Thread François Schiettecatte
Sending text has nothing to do with Django, just search for 'sending text message from email' in your favorite search engine. François On Mar 14, 2014, at 4:32 PM, Ankit Singh wrote: > i want to know that for certain task i want to send some message to user on > his cellphone . > is there any

do I need to run syncdb when I change the default value in a field of a model?

2014-03-14 Thread Craig Schmidt
This is probably an easy question, but I didn't manage to find the answer. If I just change the default value of a field in a model, do I need to run syncdb? Specifically I changed: foo = models.IntegerField(default=1) to foo = models.IntegerField(default=5) Thanks, Craig -- You re

messaging

2014-03-14 Thread Ankit Singh
i want to know that for certain task i want to send some message to user on his cellphone . is there any way that i can do so in django with importing costly application. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Re: Can please someone explain this code from the docs?

2014-03-14 Thread voger
On 03/14/2014 11:49 PM, Shawn Milochik wrote: That's just the syntax for calling a method on the base class. 1. MultiEmailField is a subclass of forms.Field. 2. forms.Field has a method named validate. 3. MultiEmailField also has a method named validate, so it overrides the one on forms.Field.

Re: Can please someone explain this code from the docs?

2014-03-14 Thread Shawn Milochik
That's just the syntax for calling a method on the base class. 1. MultiEmailField is a subclass of forms.Field. 2. forms.Field has a method named validate. 3. MultiEmailField also has a method named validate, so it overrides the one on forms.Field. So, for MultiEmailField to call its parent's val

Can please someone explain this code from the docs?

2014-03-14 Thread voger
Hi, I was reading the form validation section here https://docs.djangoproject.com/en/dev/ref/forms/validation/ and the very first example is this code from django import forms from django.core.validators import validate_email class MultiEmailField(forms.Field): def to_python(self, value):

Using Redis as a DB backend for some models (not a caching backend!)

2014-03-14 Thread Alon Nisser
Can I use redis as a django database for some of my models? I'm aware (and using) caching with django and redis, but I'm looking for something else here: Something I can use at least some of the orm features with, handle a django Model, etc. I found django-redis-engine

Re: Django not showing css - static files

2014-03-14 Thread Lunga Baliwe
And thank you Tom as well On Fri, Mar 14, 2014 at 8:35 PM, Lunga Baliwe wrote: > Really appreciate it > > > On Fri, Mar 14, 2014 at 8:34 PM, Lunga Baliwe wrote: > >> I just put on the last forward slash on >> Alias /static/ /home/project_name/website/static/ >> >> And it worked, yho thanks Mik

Re: Django not showing css - static files

2014-03-14 Thread Lunga Baliwe
Really appreciate it On Fri, Mar 14, 2014 at 8:34 PM, Lunga Baliwe wrote: > I just put on the last forward slash on > Alias /static/ /home/project_name/website/static/ > > And it worked, yho thanks Mike... > > > On Fri, Mar 14, 2014 at 8:29 PM, Lunga Baliwe wrote: > >> yes I think I have on ap

Re: Django not showing css - static files

2014-03-14 Thread Lunga Baliwe
I just put on the last forward slash on Alias /static/ /home/project_name/website/static/ And it worked, yho thanks Mike... On Fri, Mar 14, 2014 at 8:29 PM, Lunga Baliwe wrote: > yes I think I have on apache I got it like this. > > Alias /static/ /home/project_name/website/static > > Orde

Re: Django not showing css - static files

2014-03-14 Thread Lunga Baliwe
yes I think I have on apache I got it like this. Alias /static/ /home/project_name/website/static Order allow, deny Allow from all I did run collecstatic aswell On Fri, Mar 14, 2014 at 8:18 PM, Tom Evans wrote: > On Fri, Mar 14, 2014 at 6:08 PM, Lunga Baliwe wrote: > > Good day Mike

Re: Django not showing css - static files

2014-03-14 Thread Tom Evans
On Fri, Mar 14, 2014 at 6:08 PM, Lunga Baliwe wrote: > Good day Mike, > > I have STATIC_ROOT = os.path.join(BASE_DIR, 'website/static/') > website being the app name STATIC_ROOT has nothing to do with apps, it is where the files are copied to (by django) and served from (by your webserver). Assu

Re: Django not showing css - static files

2014-03-14 Thread Lunga Baliwe
Good day Mike, I have STATIC_ROOT = os.path.join(BASE_DIR, 'website/static/') website being the app name On Fri, Mar 14, 2014 at 12:57 AM, Mike Dewhirst wrote: > On 14/03/2014 9:05am, Luggaz wrote: > >> Good day, >> >> My static files are not showing on production, they show when I run them >>

Re: problem with integrating bootstrap 3.1.1 and django 1.6

2014-03-14 Thread Tom Evans
On Fri, Mar 14, 2014 at 2:33 AM, Camilo Torres wrote: > python manage.py startapp testapp > > Inside the newly created test app directory, create static/css/ and put your > file there. Now try to reload your template to see if the template loads. > > This may make it work for you, but in your case

Re: Django-nested-inlines

2014-03-14 Thread Thiago borges dos reis
the forms are not nested. 2014-03-14 10:01 GMT-03:00 Camilo Torres : > > On Wednesday, March 12, 2014 4:18:05 PM UTC-4:30, Thiago borges dos reis > wrote: >> >> from django.contrib import admin >> from nested_inlines.admin import NestedStackedInline,NestedModelAdmin, >> NestedTabularInline >> f

What do you think django-pony-forms

2014-03-14 Thread Fabio Caritas Barrionuevo da Luz
Hello everyone, I found django-pony-forms[1] recently. I found it very interesting proposal by adding the possibility of better defining how a form is rendered without having to use a templatetag or something, and also because it can make an individual customization of the form a little more "

Re: How do I start with this project with django

2014-03-14 Thread Camilo Torres
On Friday, March 14, 2014 1:52:44 AM UTC-4:30, Rob L wrote: > > The feature list of the project I am wishing to do is: > >- Let users upload some images(a folder contains image files) >- Backend generates static htmls to present those images, basically as >a gallery, via an generated u

How do I start with this project with django

2014-03-14 Thread Rob L
Hi, I hope this is a right place to ask, not very sure where to post on internet. It's about planning a django project, maybe a similar django package has been already there, if it's true, I hope someone can tell me which it is. The feature list of the project I am wishing to do is: - Let

Re: Django-nested-inlines

2014-03-14 Thread Camilo Torres
On Wednesday, March 12, 2014 4:18:05 PM UTC-4:30, Thiago borges dos reis wrote: > > from django.contrib import admin > from nested_inlines.admin import > NestedStackedInline,NestedModelAdmin,NestedTabularInline > from models import Dieta, Cliente,Refeicao,Opcao > > > admin.site.register(Cliente)

Re: django-quiz modification

2014-03-14 Thread Camilo Torres
On Wednesday, March 12, 2014 9:39:16 AM UTC-4:30, orchid barua wrote: > > The view portion has this: > def question_check_anon(request, quiz): > """ > check if a question is correct, adds to score if needed and return the > previous questions details > """ > quiz_id = str(quiz.id)

Re: Timeseries Data Collection as a Reusable App

2014-03-14 Thread RLange
Thank you all for the great input. Russell, your design I think will make the best framework - after all, defining and registering a model is hardly more difficult than defining each model in the settings. Plus, I'm realizing now that each *type* of data may come with its own particular functio

Admin TabularInline show_url doesn't works.

2014-03-14 Thread Fabrizio Alongi
Hi, I've my Django Product and Lists Product with m2m relation with an intermediate model. My problem is that in admin, when I show one List with related products (with TabularInline), in the product row I have a ForeignKey field (rendered with drop down widget) and up to it a string with curren

Re: Documentation of modules

2014-03-14 Thread Christian Waterkeyn
Thanks Camillo! This is rather complete code, but as it is extensively documented, it satisfies my request! -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to dj