Re: serve static files

2013-08-26 Thread Wesley Ni
Yeah, correct! Add nostatic option to runserver fix my problem. Thanks. 在 2013年8月27日星期二UTC-4上午12时46分08秒,Jani Tiainen写道: > > If you're using contrib.staticfiles app, your DEBUG is True and you're > using runserver django automagically maps (overrides) your staticfile > serving. > > If you want t

Re: serve static files

2013-08-26 Thread Jani Tiainen
If you're using contrib.staticfiles app, your DEBUG is True and you're using runserver django automagically maps (overrides) your staticfile serving. If you want to manually add staticfile serving, you have to give --nostatic parameter to runserver to omit all magic that happena automatically.

Re: Template variables in translation blocks

2013-08-26 Thread Some Developer
On 24/08/13 14:56, Ariel Calzada wrote: you have to append strings first http://stackoverflow.com/questions/4386168/how-to-concatenate-strings-in-django-templates and then call trans 2013/8/24 Some Developer mailto:someukdevelo...@gmail.com>> I have a title and a header block which norm

Paginating YouTube API results

2013-08-26 Thread Sithembewena Lloyd Dube
Hi everyone, I am using django-endless-pagination to paginate YouTube API results. I have a view called 'search' and a url pattern as follows: url(r'^search/$', 'find_music.views.search', name='search'), In the view, I check request.method and handle it as follows: - if POST, get search term and

Re: serve static files

2013-08-26 Thread Wesley Ni
Sorry but it still doesn't work. http://stackoverflow.com/questions/4730716/django-static-files-problem Here also mentioned the issue that pattern conflicts with STATIC_URL. 在 2013年8月26日星期一UTC-4下午1时28分42秒,mantaszilinskis写道: > > import settings > instead of 'document_root' : STATIC_ROOT, try 'doc

Re: syncdb issue (begginer stuff)

2013-08-26 Thread Andre Terra
On Mon, Aug 26, 2013 at 1:19 PM, Natko Perko wrote: > @laurent i guess it worked, but now i get the error no module named > wikicamp.wiki.. this is all the code i have so far.. make sure the folder containing wikicamp is inside your PATH so you don't get import errors. make sure there's an __in

Re: problem: returning date, it is different from the date stored in the database

2013-08-26 Thread raul salinas
*ooh yes! the solution :* * * *USE_TZ=False* # By default you are in True El lunes, 26 de agosto de 2013 15:56:41 UTC-5, raul salinas escribió: > > greetings here is a my problem with time date display either the admin or > a template, it is different from the date stored in the databas

problem: returning date, it is different from the date stored in the database

2013-08-26 Thread raul salinas
greetings here is a my problem with time date display either the admin or a template, it is different from the date stored in the database models.py class subsystem (models.Model): setting = models.CharField (max_length = 200) date = models.DateTimeField (default = datetime.now) d

Re: [View Django] Problem with view that makes add and update

2013-08-26 Thread C. Kirby
Have you verified that the url being called has a music_id? On Monday, August 26, 2013 10:40:52 AM UTC-5, Marcos Luiz Wilhelm wrote: > > Hello! > I'm having problems with a view that makes add and update > The view generates a new record rather than change a instance. > My code is this: http://pas

Re: syncdb issue (begginer stuff)

2013-08-26 Thread Natko Perko
@laurent i guess it worked, but now i get the error no module named wikicamp.wiki.. this is all the code i have so far.. from django.db import models # Create your models here. class Page(models.Model): name = models.CharField(maxlength="20", primary_key=True) content = models.T

Re: serve static files

2013-08-26 Thread Mantas Zilinskis
import settings instead of 'document_root' : STATIC_ROOT, try 'document_root' : settings.STATIC_ROOT, On Mon, Aug 26, 2013 at 10:05 AM, Wesley Ni wrote: > Forget to say that I use Django 1.5.2 > > 在 2013年8月26日星期一UTC-4上午10时58分38秒,Wesley Ni写道: > >> I hit an issue when trying serve static files. >

Re: [] error

2013-08-26 Thread Charly Román
Have you definded __unicode__ method in model? 2013/8/26 Apokalyptica Painkiller > Patrick if you want to show us your code use: http://pastebin.com/ > > > 2013/8/26 Ramiro Morales > >> On Mon, Aug 26, 2013 at 11:17 AM, Patrick Larmann >> wrote: >> > Hello guys I am following the django docs

Re: Passing variables to css file in django

2013-08-26 Thread Chris Lawlor
The simplest solution is probably to keep all of the CSS that users can't customize in an external file (to be served as a static asset), but move anything that's user customizable to the of your base template, in a

Re: sandbox/ Saap to start using django

2013-08-26 Thread Javier Guerra Giraldez
On Mon, Aug 26, 2013 at 5:34 AM, Renato Pontefice wrote: > I would start to learn it. I would start to use in a shared environment while developing (or learning), you don't need a deployment environment. if you have a working Python interpreter in your machine, just do "python ./manage.py runse

[View Django] Problem with view that makes add and update

2013-08-26 Thread Marcos Luiz Wilhelm
Hello! I'm having problems with a view that makes add and update The view generates a new record rather than change a instance. My code is this: http://pastebin.com/rZNAeN0p Someone can help me please? -- You received this message because you are subscribed to the Google Groups "Django users" gr

serve static files

2013-08-26 Thread Wesley Ni
I hit an issue when trying serve static files. In settings, debug is True, and with the followinig: STATIC_ROOT = os.path.join(freelancer_path,"staticfiles") STATIC_URL = '/staticfiles/' urls.py: (r'^staticfiles/(?P.*)$','django.contrib.staticfiles.views.serve', {'document_root' : STATIC_

Re: serve static files

2013-08-26 Thread Wesley Ni
Forget to say that I use Django 1.5.2 在 2013年8月26日星期一UTC-4上午10时58分38秒,Wesley Ni写道: > > I hit an issue when trying serve static files. > > In settings, debug is True, and with the followinig: > STATIC_ROOT = os.path.join(freelancer_path,"staticfiles") > STATIC_URL = '/staticfiles/' > > urls.py: > (

Re: [] error

2013-08-26 Thread Ramiro Morales
On Mon, Aug 26, 2013 at 11:17 AM, Patrick Larmann wrote: > Hello guys I am following the django docs tutorial part 1 and am having > trouble moving on. Instead of receiving [] i get [ Poll object>]. I have tried converting the unicode to str but to no avail. I > am just trying to move on. THx gu

Re: [] error

2013-08-26 Thread Apokalyptica Painkiller
Patrick if you want to show us your code use: http://pastebin.com/ 2013/8/26 Ramiro Morales > On Mon, Aug 26, 2013 at 11:17 AM, Patrick Larmann > wrote: > > Hello guys I am following the django docs tutorial part 1 and am having > > trouble moving on. Instead of receiving [] i get > [ > Poll o

Re: [] error

2013-08-26 Thread Apokalyptica Painkiller
Hi Patrick, why don't you try to re write that sentence again? May be you write it wrong. I remembered had same error. I wanted to see your code from models.py but it seems to have nothing in it. 2013/8/26 Robin Lery > You gave the .pyc file. > > > On Mon, Aug 26, 2013 at 7:47 PM, Patrick Larm

Re: syncdb issue (begginer stuff)

2013-08-26 Thread Mantas Zilinskis
for your environment: you should definitely look into this http://www.jeffknupp.com/blog/2012/02/09/starting-a-django-project-the-right-way/ if you're using mac also this http://hackercodex.com/guide/python-virtualenv-on-mac-osx-mountain-lion-10.8/ setup your settings.py http://www.rdegges.com/t

Re: [] error

2013-08-26 Thread Robin Lery
You gave the .pyc file. On Mon, Aug 26, 2013 at 7:47 PM, Patrick Larmann wrote: > Hello guys I am following the django docs tutorial part 1 and am having > trouble moving on. Instead of receiving [] i get [ Poll object>]. I have tried converting the unicode to str but to no avail. > I am just

Re: syncdb issue (begginer stuff)

2013-08-26 Thread Laurent Meunier
On 26/08/2013 14:34, Natko Perko wrote: Hi out there, I just dove into Django (literally) and had so many issues installing it and knowing where to start from that I don't even know how I made it this far, so i finally started working on a project by mimicing this tutorial http://showmedo.com/vi

Re: how do beginner can...begin

2013-08-26 Thread Derek
I have not done this myself; but I see Heroku provide a quite detailed guide to setting up a Django project in their environment: https://devcenter.heroku.com/articles/django Maybe try this, and contact their support if it fails... On Monday, 26 August 2013 11:05:10 UTC+2, Renato Pontefice wro

how to model a reflexive many to many relationship?

2013-08-26 Thread slim
I'm trying to build an e-learning platform I have *users (Utilisateur) *who can take several *courses* ,each course have several *modules* and a module can be in several courses a user can be a student or teacher or admin, a student is "managed" by a teacher or several and a teacher can also be

Re: django template loop collections.defaultdict(lambda: collections.defaultdict(list))

2013-08-26 Thread Daviddd
I solved in this way: my_dict = collections.defaultdict(lambda: collections.defaultdict(list)) for obj in queryset: my_dict[int(obj.position.split('-')[0])][int(obj.position.split('-')[2])].append(obj) for obj in my_dict: my_dict[obj].default_factory = No

Re: django template loop collections.defaultdict(lambda: collections.defaultdict(list))

2013-08-26 Thread Daviddd
On Friday, August 23, 2013 5:58:38 PM UTC+2, Daviddd wrote: > > Dear All, > > In my view I create the following dictionary of lists from a queryset > > #view.py > queryset = MyModel.objects.filter(owner=user, > dashboard=tab).order_by('position') > my_dict = collections.defaultdict(lambda: colle

Re: django template loop collections.defaultdict(lambda: collections.defaultdict(list))

2013-08-26 Thread Thomas Scrace
On Monday, 26 August 2013, Daviddd wrote: > Sincerely, I don't know how I can create the dict without using > defaultdict. > > D > You can create it using a defaultdict if you want to, but once it is created, and before you pass it to the template, loop through all the values of your outer dict a

sandbox/ Saap to start using django

2013-08-26 Thread Renato Pontefice
Hi, I'm new to Django. I would start to learn it. I would start to use in a shared environment (like sandbox, or some Saap...) I've started tryng to install it in - openshift - heroku but without achievement. I already seen the doc on the djago web site, but without an environment to try it,

how do beginner can...begin

2013-08-26 Thread Renato Pontefice
Hi, I'm a Django beginner (or, moreover, user that would start with django) I know that many doc could be foud onthe web site of django. But, my first first issue, is an indipendent (indipendent from any pc work, house...) installation of django. Or, moreover, a place where i can installa instal

django refreshing problem

2013-08-26 Thread Harjot Mann
In django whenever I make some template I need to refresh it. I am not getting what is the problem, is it some cache problem, even I disabled it using never_cache but nothing worked, Is there anyone who faced the same problem. Please help me I want to know that exactly what is happening and why? --

Re: Problem with translations

2013-08-26 Thread Andreas Kuhne
Has nobody heard of this issue before? It is rather disturbing and means that our site crashes from time to time for some users. Regards, Andréas 2013/8/21 Andreas Kuhne > Hi, > > I am working on a website that is available in 10 different languages, and > we have the translations working. If

Re: html templates and dynamic loading

2013-08-26 Thread Bastien Amiel
Le 24/08/2013 04:44, Mantas Zilinskis a écrit : this might help you http://stackoverflow.com/questions/1879872/django-update-div-with-ajax let me know if you need more help Thank you for this good pointer. On Fri, Aug 23, 2013 at 10:51 AM, Bastien Amiel > wrote: