problem with generic views (monthly archive) and different languages

2008-09-13 Thread Julian
hi there, in my settings.py there is the language specified as "de_de", wich works well with things like: {{{ blog_entry.timestamp|date:"b" }}} in may, it returns "Mai", wich is german for may. but i am using the generic views for my blog archive, and monthly based i'm doing things like: {{{

faking a cron job

2008-09-28 Thread Julian
hi there, i have written a middleware-class wich is doing what a cronjob should do. it is doing some backup-stuff, and repeats that every 12 hours. it is a thread and is placed in the list of middleware-classes, but not processing any request or overwriting any typical method for a middleware cla

Re: faking a cron job

2008-09-28 Thread Julian
okay guys, you've convinced me - it'll do a cronjob! --~--~-~--~~~---~--~~ 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 gr

Reverse foreign key lookup with unknown model

2009-01-31 Thread Julian
hi there, I have a problem I really cannot solve on my own. lets say I have three models: class A(models.Model): ... class B(models.Model): fk = models.OneToOneField("A") class C(models.Model): fk = models.OneToOneField("A") If I have then a single A-instance, how can I determine

doctest testing with templatefilters

2009-04-12 Thread Julian
hello, I am testing some of my filters with doctests. it's very easy, but I have to call the module with the filters manually: python /foo/bar/templatetags/eggs_extra.py -v to let the doctest run. Now I've added at the end of the egg.py the following code: def run_doctest(): import doctes

how to switch of autosaving for a m2m-relationship

2009-06-06 Thread Julian
hello, i have a queryset and a model with a manytomany-relationship, let's say a pizza has toppings. my pizza margharita has already some toppings and now i retrieve a queryset of some more and want to add them to the pizza: for topping in toppings: pizza.toppings.add(topping) the problem

Re: how to switch of autosaving for a m2m-relationship

2009-06-06 Thread Julian
hi russell, thanks, this is what I've found studying the code but not in the documentation. thanks a lot! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dja

how to cache a generic view?

2009-06-14 Thread Julian
hi, I've read much about caching in django but I cannot solve a problem: cache a generic view. I find only this one about caching generic views via google: http://luddep.se/notebook/2008/09/22/cache-generic-views-django/?dzref=117698 but there's the problem that if something on that page change

Testing custom inclusion tag

2010-07-11 Thread Julian
Hi, I've written a custom inclusion tag for a project of mine. The problem is: how can i test it? I've got a TestCase which has some methods: def get_tagcloud_template(self, argument): return """{%% load taggit_extras %%} {%% include_tagcloud %s %%} """ % arg

problem with block tag and autoescaping

2010-09-15 Thread Julian
Hi, I'm a little bit confused. I'm writing a block tag which manipulates all the included urls in a special way to track users. therefor I've written a custom template-tag which does mainly the following in the render-method: 1. render the nodelist 2. parse the html with beautifulsoup 3. manipula

tracking changes of a model's attributes

2010-09-17 Thread Julian
hi, i'm writing a little statistical app for a django-project. everytime a very model is saved, something's stored in the db, depending on the model's attributes. if one of the attributes changes, I have to change the statisitical data otherwise it would leed to inconsistency. I need to know the o

custom filter -- automatically apply first option

2010-09-17 Thread Julian
hi, I've written successfully an custom filter for the admin-interface. if I visit http://localhost:8000/admin/usertracking/analyze/ coming from http://localhost:8000/admin/), none of the filters is applied, although it's marked as "selected" on the right side on the website. the reason is proba

overriding the admin's template sucks

2010-09-20 Thread Julian
Hi, I want to display a customized table for a model in the admin. I've just written a customized filter, which works very well. The problem: My model has a field 'timestamp' which is a datetimefield. It may be null, so in the admin it's displayed as '(None)'. I want to replace '(None)' with 'All

Re: overriding the admin's template sucks

2010-09-20 Thread Julian
thanks for that simple solution, but I'm very reluctant to do this, because putting template-logic in python-files reminds me of my PHP- days. nevertheless, it's a quick way to solve my problem. another problem will be to remove the admin-action-checkbox, because it's displayed even though I'm not

combine two testrunner

2010-10-06 Thread Julian
Hi, I'm testing an app doing it with django-nose.NoseTestSuiteRunner. Now I want to use django-coverage by default, it got an own test-runner function. Is there a way to concat those two testrunner? ATM I'm doing it as follows: from django_nose import NoseTestSuiteRunner def runtests(*test_args)

using cache.set with large object

2010-01-07 Thread Julian
ng smaller objects works fine. is there any restriction to the size of cached objects? how can I check if the value was successfully set? regards Julian -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, sen

Best Practice for developing djangoapp in a repository

2010-01-21 Thread Julian
p.py and everytime I change the code I have to reinstall it in order to test it within a djangoapp. this is another possibility, but makes me not happy. 3.) ??? so what's the best practice to solve that problem? extending sys.path and keeping the folder its own place? Regards Julian -- You rece

stupid problem with subfolder

2007-09-01 Thread Julian
hi there, i am relativly new to django, everything's quite fine until now, so here's my problem: i've developed a django-application with the development server. now i want to deploy it in a subdirectory of my domain, lets call it www.domain.com/appl/ fastcgi is running, apache's right configure

Re: stupid problem with subfolder

2007-09-02 Thread Julian
I've found out this: http://code.djangoproject.com/ticket/5320, wich has the underlying issue of this: http://code.djangoproject.com/ticket/1516 wich isn't fixed yet. thanks for reading julian On 1 Sep., 22:00, Julian <[EMAIL PROTECTED]> wrote: > hi there, > > i a

i18n: Has anyone experienced that but too?

2007-09-06 Thread Julian
Hi there, I opened a ticket yesterday, now I'm wondering about being alone with that bug. Please look here: http://code.djangoproject.com/ticket/5347 Thanks Julian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

dynamic choices in a ChoiceField

2008-01-13 Thread Julian
Hi there, I have cards and decks, decks have ManyToMany cards, and if you want to add a card, you have to chose a deck; quite simple. my forms.py contains something like that: class CardForm(forms.Form): deck = forms.ChoiceField(required=True,choices=[(d.id,d.name) for d in Deck.objects.all

add RequestContext automatically to each render_to_response call

2008-03-10 Thread Julian
hi, I've been writing a django-application and now I need the RequestContext for some new features. I don't want to add context_instance=RequestContext(request) to each render_to_response call manually in my views.py. How can I can I solve my problem? I could do this with retrieving the request

how to access the host-name in settings.py

2007-09-13 Thread Julian
hello, in a view it's easy to find out under wich host the django-project ist running: {{{ def view(request): from django import http hostname = http.get_host(request) }}} hostname ist set to localhost:8000 running the django-app with ./ manage.py runserver but how do i access the full host-

admin interface broken

2007-12-13 Thread Julian
Hi there, i haven't been developing my django project for some weeks and so i continued my work today. there are three links on the right upper corner of the admin interface (documentation, change password, logout) but all of them point to "http://127.0.0.1:8000/admin/"; and nothing happens if i

Re: admin interface broken

2007-12-13 Thread Julian
this one solved it: http://groups.google.com/group/django-users/browse_thread/thread/ed22e4efc279d68d/d72a2e2f79156e01 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

i18n in modells

2007-12-15 Thread Julian
Hi there, is there any tutorial/howto/example for a smart solution to bring i18n into django models? i have an object A with a property name. this name should be available in any languages specified in settings.LANGUAGES. until now i have an I18NNameValueField with the properities languagecode

how to handle a zero-based pagination in templates as one-based?

2007-12-20 Thread Julian
hi there, I do want to use pagination, but I don't know how to solve a problem. template-code: {% for p in paginator.page_range %} {{p}} {% endfor %} but obviously it should be: {% for p in paginator.page_range %} {{p}} {% endfor %} because in my-view I use the objectpaginator object zero-ba

how to access a tuple in a template

2007-12-20 Thread Julian
hi, i am passing a tuple (1,2) to a template in a variable like this: render_to_response("template.html",{"tuple":(1,2)}) how can i access the single-values without a for-loop in the template? --~--~-~--~~~---~--~~ You received this message because you are subscr

Re: how to handle a zero-based pagination in templates as one-based?

2007-12-20 Thread Julian
okay, thanks. i think this will bring me to a comfortable solution. --~--~-~--~~~---~--~~ 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 unsubscri

Re: how to access a tuple in a template

2007-12-20 Thread Julian
thanks, great! --~--~-~--~~~---~--~~ 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] F

how to access the permalink-decorator in the settings.py with a named url pattern?

2007-12-21 Thread Julian
hi, i have a name url pattern: url( r'^login/', 'login', {'template_name': "config/templates/ login.html"},name="config-login"), this works perfectly in the template for {% url config_login %} but wouldn't it hurt the dry principle to write the login-url in the settings.py? right, so i want t

What is Django?

2011-08-23 Thread Julian
Is there any document available that describes WHAT Django is? I am not looking for an installation guide, neither for tutorial, nor for "Django is a high-level Python Web framework". But: What does this framework include? What is it used for? How does it increase productivity? Why shouldn't I use

Server HTTP Client

2011-03-03 Thread Julian
Hi, Is there anything on in Python or Django that can be used as a server side HTTP Client. Something like HTTP Unit and jsdom from NodeJS. I'm trying to log into some custom site and scrap the data from them. It would be a plus if the client also support javascript. Thanks. Julian --

Re: Server HTTP Client

2011-03-03 Thread Julian
is at http://wwwsearch.sourceforge.net/mechanize . I've used it > in my work place and it works quite well. > > cheers, > Marwan > > On Thu, Mar 3, 2011 at 9:59 PM, Julian wrote: > Hi, > > Is there anything on in Python or Django that can be used as a server > side HTTP Cl

Re: What's the Better approach to do these?

2018-08-19 Thread Julian
Hello Fellipe, sounds like you're developing a multi-tenancy webapp. Maybe https://github.com/bernardopires/django-tenant-schemas is the right tool for you. Regards, Julian Am Sonntag, 19. August 2018 17:29:16 UTC+2 schrieb Fellipe Henrique: > > Hello, > > I need to build a s

Re: problem with block tag and autoescaping

2010-09-16 Thread Julian Moritz
Am Donnerstag, den 16.09.2010, 11:18 +0100 schrieb Nuno Maltez: > On Wed, Sep 15, 2010 at 4:50 PM, Julian wrote: > > before returning, all paramaters in the urls are separated by & as > > they should be. in the template the & occur as &. for example, the >

Re: Django hosting website

2008-03-24 Thread Julian DeFronzo
webfaction.com, has great reviews. But I personally don't use them. On Mon, Mar 24, 2008 at 1:11 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Anyone kows a good and cheep django hosting service website? > > Thanks

Re: Django hosting website

2008-03-24 Thread Julian DeFronzo
2:09 PM, Bryan Veloso <[EMAIL PROTECTED]> wrote: > > >Lots more flexibility, but when things break its your fault. > > Well at least you're able to rebuild instead of begging customer > service to do it for you. I'll definitely submit my +1 for Slic

Re: Weird apache problem

2007-01-06 Thread Julian Romero
On 1/6/07, Chris Brand <[EMAIL PROTECTED]> wrote: I got apache with mod_python up and running ok. Then I used manage.py reset on one of my apps. Since then, I can't see that app in the Admin page. It was showing up fine before. It also shows up fine if I use the development server. I've rest

Re: Debugging Django: print statements?

2007-01-23 Thread Julian Romero
On 1/22/07, rzimerman <[EMAIL PROTECTED]> wrote: > > > What's the best way to do debugging in Django? Usually when I program, > I use "print" statements to identify problems. But Django seems to > surpress all output to stdout. The best way, no doubt, is a graphical debugger that remotely connec

Re: Debugging Django: print statements?

2007-01-27 Thread Julian Romero
On 1/27/07, Don Arbow <[EMAIL PROTECTED]> wrote: > > > Using print statements to debug a program is like figuring out what > is wrong with your car by listening for weird noises. Using a > debugger is like opening the hood and tweaking the engine with tools. > > Opening the hood seems a good approa

Re: Problem getting Apache/mod_Python to work with Django

2007-01-27 Thread Julian Romero
On 1/27/07, Pramod Subramanyan <[EMAIL PROTECTED]> wrote: > > > File > "/usr/lib/python2.4/site-packages/Django-0.95.1-py2.4.egg > /django/db/backends/postgresql/base.py" > in cursor > 43. self.connection = Database.connect(conn_string) > > OperationalError at /mysite/admin/ > FATAL: role "da

Re: Tools for writing HTML templates

2007-01-30 Thread Julian Romero
On 1/28/07, Paulo <[EMAIL PROTECTED]> wrote: > > > For quick and dirty wireframes OmniGraffle < > http://www.omnigroup.com/applications/omnigraffle/ > is great (not > sure of a Windows alternative). You can use Photoshop or Illustrator > (or their open source brethren) as well but it is overkill if

Re: Django Cheat Sheet

2007-02-14 Thread Julian Romero
On 2/13/07, John Sutherland <[EMAIL PROTECTED]> wrote: > > > Hi all, > > Firstly, sorry for the cross-post. > > My employer, Mercurytide [1], as some of you may have seen in the > past, publishes white-papers on a monthly basis. This month it's > another Django themed one: a Django cheat sheet: > >

Re: how to postpone HttpResponse but still get new requests

2007-02-14 Thread Julian Romero
Did you tried twisted? http://twistedmatrix.com/projects/core/documentation/howto/async.html On 2/9/07, Dill0r <[EMAIL PROTECTED]> wrote: > > > Hi, > > i got a producer-consumer class which await new items from the > clients, does sth with them and provides them to all clients. > > the url "getNe

URLField and Web Sockets URLs

2012-10-04 Thread Julian Cerruti
Apparently the current implementation of URLField rejects Web Sockets URLs such as ws://my.server.com/ This seems to be due to the implementation of the underlying URLValidator, which has a regex to search for ftp or http based URLs only. Is there any chance the URLValidator regexp can be updat

Re: URLField and Web Sockets URLs

2012-10-05 Thread Julian Cerruti
orientation. Best, Julian On Thursday, October 4, 2012 5:43:41 PM UTC-3, Kurtis wrote: > > Looks like this is similar and shows that people want other protocols as > well: > http://stackoverflow.com/questions/8778416/what-are-the-valid-values-for-a-django-url-field > > Yo

Model caching per python session

2011-08-22 Thread Julian Hodgson
e many different users will be using the database at the same time, and it should be possible for each user to see the latest state of the DB. Any suggestions welcomed. Cheers, Julian -- You received this message because you are subscribed to the Google Groups "Django users&

Re: Model caching per python session

2011-08-22 Thread Julian Hodgson
So I really need a way of closing the transaction or flushing the sql in django, without starting a new python session. Any ideas warmly received. Julian. On Aug 22, 2011 8:30 PM, "Daniel Roseman" wrote: > On Monday, 22 August 2011 17:16:24 UTC+1, Julian Hodgson wrote: >>

Re: Model caching per python session

2011-08-23 Thread Julian Hodgson
FYI: this does the trick: from django.db import connection connection.close() On Tue, Aug 23, 2011 at 12:29 AM, Julian Hodgson < julian.of.lon...@googlemail.com> wrote: > Ok, that makes sense. > > The thing is, we've written some python plugins for Softimage to read and &g

Test DB Connection

2011-10-14 Thread Julian Hodgson
hould only be run from the workbox not on the server loadSettings() This works fine even when it can't connect. But later if I do: from passion.cg.models import * users = User.objects.filter( username='julian') print users then I get # OperationalError: (1044, "Access denied f

TypeError: unhashable type: 'ManyToManyField'

2011-02-24 Thread Julian Hodgson
ManyToMany fields. I don't mind hacking the code to fix this but I need some pointers as to what's happening! Check here for the error: http://dpaste.com/444668/ Best, Julian -- You received this message because you are subscribed to the Google Groups "Django users" grou

Initial save()

2011-03-12 Thread Julian Hodgson
I need to set up some default values on a ManyToMany field only when a model is first created. How can I find out in the save() override if the object is being created for the first time? Do I check the table for rows which have self.id or is this not defined till after the save? Julian

Intuition about (potentially) sending multiple password reset emails

2014-12-03 Thread Julian Gindi
I'm working with Django's built-in password reset capabilities, and noticed this curious line... https://github.com/django/django/blob/master/django/contrib/auth/forms.py#L231 can someone explain the intuition behind this line? It seems weird to potentially send multiple password reset emails.

Django Migrations: Converting a PK field to ID + PK for Multi-table Inheritance

2020-09-22 Thread Julian Klotz
migrations.AddField( model_name='person', name='actor_ptr', field=models.OneToOneField(auto_created=True, default=0, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='resources.a