Re: Redirect home page
I second Graeme's suggestion. It should make your life easier regarding translations. On Oct 11, 1:54 pm, Graeme Glasswrote: > On Oct 11, 12:24 am, Caisys wrote: > > > Hi, > > I would like visitors to my site homepagewww.example.comtobe > > redirected towww.example.com/en/inorder to allow for translations > > in the future. > > > What is the most efficient way? > > > 1- Use apache mod-rewrite? > > 2- I know i could use the HttpResponseRedirect function in django but > > i felt it might be wasteful to create a view only for this purpose. > > 3- Use a response header? > > > Thanks > > Is that not what the trans tags and internationalization are > for?http://docs.djangoproject.com/en/dev/topics/i18n/ --~--~-~--~~~---~--~~ 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...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Year/month archive help
Hello, Check out Django's built-in "generic" views: http://docs.djangoproject.com/en/dev/ref/generic-views/ It sounds like this solution might work for you if you just want to show an archive of your Posts. With this, you don't have to write any views, you only have to configure the urls and templates. Good luck! On Oct 7, 1:31 pm, icrismariuwrote: > Hello, i'm new to Django and started an application, i did the models, > views, templates, but i want to add some kind of archive to the bottom > of the page, something like > thishttp://www.flickr.com/photos/ionutgabriel/3990015411/. > > My model looks like this: > > class Post(models.Model): > titlu = models.CharField(max_length=45) > continut = models.TextField() > imagine = models.CharField(max_length=150) > data = models.DateTimeField() > modificat = models.DateTimeField (blank = True, null = True) > > I know i have to loop trough the model and on the "data" field...i've > searched all day for a solution, but didn't find anything. > > I want to show the year, and the months, and only the months who have > entries to be links so i can redirect users to another view where they > can see only the posts from that month. > > How can i do this? > > Thank you for you're help! > > p.s. sorry for my English --~--~-~--~~~---~--~~ 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...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: page not updating right away
Thanks Rock, that was it. I had to change my TIME_ZONE setting in my project's settings.py. On Oct 18, 10:11 am, Rock <[EMAIL PROTECTED]> wrote: > A very common problem is that the timezone or system clock is off. > Most Blog implementations allow you to create a blog entry "in the > future" so it shows up on your web page only after a specified time. > This capability plays havoc with noobies who haven't bothered to set > their timezone correctly in their settings.py. A 2 hour delay is the > most common since the settings.py defaults to Chicago and many shared > host servers are based in the Pacific timezone. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
page not updating right away
I am new to Django, but love it so far. I went through a tutorial and created a basic blog app. I'm using Django's admin interface to add new blog posts -- I have a blog "Post" model. My problem is that whenever I enter and save a new blog post via admin, its not showing up on the web page (template) right away. It usually shows up after a few hours. It shows up right away on the admin side though. This leads me to believe that there is some sort of caching going on, but I do not have any type of Django cache setting going on in my settings.py file. Is this a python cache issue? I've tried pkill python, but doesn't work either. Is there a template/web page cache in Django? My host is Dreamhost, so I am running Django with FastCGI. I know thats not the preferred set up, but just getting my feet wet with Django. Thanks for 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@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---