How to do the chrome extension work only with logged users?

2020-08-02 Thread Bruno Salles Pereira
How to do the chrome extension work only with logged users -- 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...@googlegroups.com. To view

Re: django.urls.exceptions.NoReverseMatch: 'courses' is not a registered namespace

2020-04-24 Thread Bruno Gama
Hi Raja Sekar Sambath I tried what you said and didn't run well. I don't know why is not running with reverse function. I managed do what I wanted. I did this: def get_absolute_url(self): return '%s' % self.slug Thanks & Regards, Bruno Gama +55 12 9 9171-6336. Le ven. 24 avr. 2020

Re: django.urls.exceptions.NoReverseMatch: 'courses' is not a registered namespace

2020-04-24 Thread Bruno Gama
Thank you, Raja Sekar Sambath. It stopped the error. I don't manage do what I want, but the error stopped running. Le ven. 24 avr. 2020 à 03:34, Raja Sekar Sambath a écrit : > decorating get_absolute_url with @staticmethod may help I think > > On Fri, 24 Apr 2020 at 00:35, Bruno Ga

Re: django.urls.exceptions.NoReverseMatch: 'courses' is not a registered namespace

2020-04-23 Thread Bruno Gama
I tried it, but happens the same error. Le jeu. 23 avr. 2020 à 13:54, Jorge Gimeno a écrit : > > > On Thu, Apr 23, 2020, 7:46 AM Bruno Gama wrote: > >> I have a problem since I tried to use get_absolute_url(self): to enter in >> a url beyond a photo. When I used , my in

django.urls.exceptions.NoReverseMatch: 'courses' is not a registered namespace

2020-04-23 Thread Bruno Gama
I have a problem since I tried to use get_absolute_url(self): to enter in a url beyond a photo. When I used , my index.html stopped running. Here I have the top level url.py from django.contrib import adminfrom django.urls import path, includefrom simplemooc.core import views, urlsfrom

django.urls.exceptions.NoReverseMatch: 'courses' is not a registered namespace

2020-04-23 Thread Bruno Gama
Hi, I have a problem since I tried to use get_absolute_url(self): to enter in a url beyond a photo. When I used , my index.html stopped running. Here I have the top level url.py from django.contrib import admin from django.urls import path, include from simplemooc.core import

Re: Creating a new Django project, Stuck with the very first steps

2020-03-24 Thread Bruno Santos
Hello, try to uninstall python and install again. Have just one installation of python, 2.7 or 3.5.2 Em ter, 24 de mar de 2020 08:11, Rodolphe Gohard escreveu: > Hello, I am wanting to create a django project. > > I followed the instructions on installing django here: >

Re: How to get a list of queryset selected fields

2017-06-15 Thread Bruno Soares
> > Take a look at `values_list` too. https://docs.djangoproject.com/en/dev/ref/models/querysets/#values-list Em quinta-feira, 15 de junho de 2017 12:51:56 UTC-3, Todor Velichkov escreveu: > > That's it, I want to get

good pratices to write many lines on database

2017-01-04 Thread Bruno Barbosa
through celery get then and use a bulk_create to insert all data on database? Bruno -- -- 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-user

Re: makemigrations generates new migration when nothing has changed

2016-12-01 Thread Bruno A.
I've seen that happening when calling a callable as one of the keyword argument rather than passing the callable itself. Typical example: class TimeFramedModel(models.Model): created = models.DateTimeField(default=timezone.now*()*) Instead of: class TimeFramedModel(models.Model):

Re: Downside of using shortuuid as primary key

2016-10-27 Thread Bruno A.
Hi, I've inherited a project where a core model was done like this, and let me tell you right away: *don't do this*. The performances don't seem too much affected (see comment below the answer), but I do know there are a few limitations that come

Re: Django Custom Models

2016-07-13 Thread Bruno A.
Hi, If you find yourself doing that a lot in your project, yes a custom manager is the way to go. Keep in mind that you can more then one manager attached to your model, but the order matters . For the admin purposes,

Re: Why server Heroky add random symbols between filename and his extension?

2016-05-08 Thread Bruno A.
What storage class are you using for your static files (setting STATICFILES_STORAGE)? It looks like what ManifestStaticFilesStorage would do... Also make sure that collectstatic

Re: New Django User

2016-04-07 Thread Bruno Barbosa
Hello Chen, welcome to Django community! I think you can start with Django Tutorial: https://docs.djangoproject.com/en/1.9/intro/tutorial01/ Good luck! -- Bruno Barbosa Web Developer *brunobarbosa.com.br <http://brunobarbosa.com.br>* On Thu, Apr 7, 2016 at 6:29 AM, Chen <lekhuso...@

Re: collectstatic to bucket folder

2016-03-23 Thread Bruno A.
I believe the S3BotoStorage class is using the setting AWS_LOCATION to decide where to store it. Adding this to your settings.py should do the job: AWS_LOCATION = os.environ.get('AWS_LOCATION', 'static') On Wednesday, 23 March 2016 10:46:39 UTC, Naveen Yadav wrote: > > I'm serving static files

Re: collectstatic to bucket folder

2016-03-23 Thread Bruno A.
I believe the S3BotoStorage class is using the setting AWS_LOCATION to decide where to store it. Adding this to your settings.py should do the job: AWS_LOCATION = os.environ('AWS_LOCATION', 'static') On Wednesday, 23 March 2016 10:46:39 UTC, Naveen Yadav wrote: > > I'm serving static files from

Re: Error running Django tutorial

2016-03-19 Thread Bruno Barbosa
Ruth, Show me the code! How is your urls.py? and the views.py? paste your code in https://gist.github.com/ and reply this email. -- Bruno Barbosa Web Developer *brunobarbosa.com.br <http://brunobarbosa.com.br>* On Thu, Mar 17, 2016 at 3:50 PM, Ruth <rmil...@contextualgenomics.c

Re: unhashable type: 'dict'

2016-03-15 Thread Bruno Barbosa
you forgot the function name auth_views.logout as a second parameter as mentioned above. try it: url(r'^logout/$', *auth_views.logout*, {'next_page': 'boardgames_home'}, name='boardgames_logout'), -- Bruno Barbosa Web Developer *brunobarbosa.com.br <http://brunobarbosa.com.br>* On Tue,

Re: Django Hello

2016-03-04 Thread Bruno Barbosa
But these tutorials are online.. you don't need download it.. -- Bruno Barbosa Web Developer *brunobarbosa.com.br <http://brunobarbosa.com.br>* On Fri, Mar 4, 2016 at 5:57 PM, <direco...@infomed.sld.cu> wrote: > I have been seeing it but I just have acces https://www.dj

Re: Django Hello

2016-03-04 Thread Bruno Barbosa
I think that a good start point is the django official website https://www.djangoproject.com/ and your intro tutorial: https://docs.djangoproject.com/en/1.9/intro/ Also, you can see the Django spanish site: http://django.es/ -- Bruno Barbosa Web Developer On Fri, Mar 4, 2016 at 4:25 PM, <dir

Re: Admin page missing icons

2016-03-04 Thread Bruno Barbosa
sorry, the correct command is: python manage.py collectstatic -- Bruno Barbosa Web Developer On Fri, Mar 4, 2016 at 5:09 PM, Bruno Barbosa <bsbru...@gmail.com> wrote: > Are you running django with DEBUG=False? > ​​ > Try run python.py manage.py collectstatic then reload page.

Re: Admin page missing icons

2016-03-04 Thread Bruno Barbosa
Are you running django with DEBUG=False? ​​ Try run python.py manage.py collectstatic then reload page. -- Bruno Barbosa Web Developer *brunobarbosa.com.br <http://brunobarbosa.com.br>* On Fri, Mar 4, 2016 at 4:13 PM, <aspel...@gmail.com> wrote: > In your browser enable &qu

Django job opportunity in Bordeaux, France

2016-01-12 Thread bruno desthuilliers
We're looking for a Python / Django dev : http://emploi.alsacreations.com/offre-565470-Developpeur-django-python.html -- 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

Re: Multiple serializers

2015-12-14 Thread Bruno A.
Also having your models would be helpful. On Saturday, 12 December 2015 02:21:07 UTC, Daniel Chimeno wrote: > > This question is more about DRF than > Django itself, I haven't use it for a while so I can't answer you, > but please, put the code in a proper

Re: What is the best way to dynamically build and insert templatetags from data?

2015-08-31 Thread Bruno A.
Hi, >From the doc https://docs.djangoproject.com/en/1.8/howto/custom-template-tags/#writing-custom-template-tags Have you looked at registering one template tag with parameters? That seems to cover your example, but I appreciate it's probably much simpler than the actual use case. Otherwise,

Re: Testing related models without saving

2015-07-16 Thread Bruno A.
This might help maybe: https://docs.djangoproject.com/en/1.8/ref/models/fields/#django.db.models.ForeignKey.allow_unsaved_instance_assignment On Thursday, 16 July 2015 12:21:30 UTC+1, Roland Swingler wrote: > > Hi all, > > I've very recently come to to Django from a rails background, and >

Re: Testing related models without saving

2015-07-16 Thread Bruno A.
You did not quote your models, but I assume your UserProfileDetails has a OneToOne or ForeignKey relationship with User model. With Django, you generally need to save the related model before adding it to the Foreignkey, as the relationship in UserProfileDetails is using the primary key

Re: How to DRY, define a set of model-fields and reuse them as multiple instances

2015-06-10 Thread Bruno A.
It looks like you want a Model to inherit from multiple base model? Multiple time from the same one, with different parameters? I'm not sure I understood what you are trying to do, but maybe abstract models can help you?

Re: Installation OPEN VOLUNTEERS

2015-05-24 Thread Bruno A.
Bonjour Thomas, Voici le lien vers le guide en Français https://docs.djangoproject.com/fr/1.8/intro/ Open volunteer a l'air d'être basée sur une version de Django très ancienne (1.1?) donc j'ai peur que tu rencontres beaucoup de problèmes à l'installation, la documentation de Django 1.1 n'est

Re: Defining base templates for reusable apps

2015-05-09 Thread Bruno A.
Hi, I've never done it, but I myself want to do a similar thing, so I've been thinking about it a bit. The solutions I've thought of are the following: - Template inheritance, as you mention. You provide the base template, but it might not be straightforward for the app's user to

Re: Model with two e-mail fields uniques

2015-04-08 Thread Bruno A.
> Traceback (most recent call last): > File "", line 1, in > ... > raise ValueError('Need at least one e-mail.') > ValueError: Need at least one e-mail. > > > On Wednesday, April 8, 2015 at 11:38:28 AM UTC-4, Bruno A. wrote: > >> +1 for Javier's

Re: Model with two e-mail fields uniques

2015-04-08 Thread Bruno A.
+1 for Javier's answer, use a simple Foreign key on the e-mail field, not a ManyToMany on the Person (M2M allows an email to belong to multiple users). The Foreign key ensures an e-mail belongs to only 1 user, and that 2 users cannot have the same e-mail, but lets a user have multiple. To

Re: Question about subdomains.

2015-02-11 Thread Bruno Barcarol Guimarães
It depends if there is a need to separate the code from the sites on three projects. If the code is not so complex and you can fit them all on a single project, you can just configure the web servers to serve the same project on the three domains. On Tuesday, February 10, 2015 at 3:22:29 PM UTC,

PostGis, GeoDjango. How to install a updated version?

2014-12-10 Thread Bruno Messias
Someone managed to install postgis 2.4 and gdal 1:11 on a Ubuntu distribution 14. I followed several tutorials. I fixed many errors, but the only thing I can do is instal an older postgis, 2.0.3 (2009) version. Atualmente, I'm deploying a project that needs of postgis. -- You received this

Re: Runtime warning about a naive datetime when running the test command

2014-11-17 Thread Bruno Barcarol Guimarães
Hi Daniel. The problem is you're probably generating a naive datetime at some point in your code. The best way to solve this is to run the tests with $ python -W error manage.py test That way an exception will be raised instead of a warning. From there you can probably figure out where it is

Re: Dango signal can't delete directory

2014-11-06 Thread Bruno Barcarol Guimarães
> os.path.exists fails to see the directory as well. This is strange. Are you sure you are referencing the right directory (it happens...)? The only other reason I can think of is your program or apache (or both) running with mount namepsace on /tmp. That said: > When it creates a new tile

Re: How to restrict a class based view to one user group?

2014-11-06 Thread Bruno Barcarol Guimarães
Hi Daniel. You're looking for the `user_passes_test` decorator: https://docs.djangoproject.com/en/1.7/topics/auth/default/#limiting-access-to-logged-in-users-that-pass-a-test Remember you need to decorate the `dispatch` method of a CBV. -- You received this message because you are subscribed

Django Form Wizard: Why is this happening?

2013-08-29 Thread Bruno Lottero
*I have a dinamic form wizard step as following:* class AltaForm6(forms.Form): CHOICES = ((1, 1,), (2, 2,)) username = ChoiceFieldInvalid(required=True, label="Usuario", widget=forms.RadioSelect, choices=CHOICES) username2 = forms.CharField(required=False, label="Otro")def

Django Form Wizard: Why is this happening?

2013-08-29 Thread Bruno Lottero
*I have a dinamic form wizard step as following:* class AltaForm6(forms.Form): CHOICES = ((1, 1,), (2, 2,)) username = ChoiceFieldInvalid(required=True, label="Usuario", widget=forms.RadioSelect, choices=CHOICES) username2 = forms.CharField(required=False, label="Otro") def

Remote Authentication and Session Management

2013-07-31 Thread bruno
I'm using Django to build a *frontend* application which will fetch data from a remote (RESTful, for the matter) API for presentation to users that can authenticate within the API. This API will, upon every successful login, output a *cookie* which I will need to use in further requests, and

Re: Insert variable into RequestContext?

2013-05-06 Thread bruno desthuilliers
Looks like you want a context_processor : https://docs.djangoproject.com/en/1.5/ref/templates/api/#subclassing-context-requestcontext -- 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

Re: Request for comments on a new Open Source Paas platform for Django

2013-03-05 Thread Bruno Girin
On Tuesday, March 5, 2013 7:56:37 PM UTC, Dave Murphy wrote: > > On Tuesday, March 5, 2013 7:03:36 PM UTC, Bruno Girin wrote: >> >> So I'd much rather have the charm auto-generate part of the config in a >> sensible way and then tell people: if you use Juju, don't pr

Re: Request for comments on a new Open Source Paas platform for Django

2013-03-05 Thread Bruno Girin
ing values in two places: the django settings and the startup scripts that sets the environment variables. So I'd much rather have the charm auto-generate part of the config in a sensible way and then tell people: if you use Juju, don't provide those settings in your config, the charm will do it. Bru

Re: Request for comments on a new Open Source Paas platform for Django

2013-03-03 Thread Bruno Girin
different config elements in different files but this implies that juju'ised applications would need to follow the same structure. Is that a good idea? Cheers, Bruno On Saturday, 2 March 2013 20:14:19 UTC, Christopher Glass wrote: > > Hi Patrick, > > Great to hear you're interested in writ

Re: configure url

2012-11-15 Thread bruno desthuilliers
On Thursday, November 15, 2012 7:25:28 AM UTC+1, rh wrote: > > All the tutorials I looked at didn't explain (?P\w+) and it seems > that the > tutorials say things like "it's a regular expression, go read python docs > for more". > Maybe regexs are consider ugly plumbing stuff unsuitable for

Re: Django mod-wsgi multiple instances of One Class object

2012-11-06 Thread bruno desthuilliers
On Monday, November 5, 2012 7:07:23 PM UTC+1, drunksaint wrote: > This model was running perfectly in the DEV deployement. When I moved to > PROD in apache, this broke (as in there are multiple instances of scObj > being created, so a score update from player-1's move on player-2 is not >

Re: Design decision

2012-11-06 Thread bruno desthuilliers
On Tuesday, November 6, 2012 3:13:40 PM UTC+1, rdollinger wrote: > > Hi, > > I'm starting a new project, that is composed with various modules > (application). This project will sold to costumers (ca. 100) with different > configurations (modules, language, ...). My intention is to have models,

Re: settings.py DEBUG crash

2012-09-02 Thread Alex Bruno Cáceres
ontrib.admin in your media directory, django look for that > files first) > > hope to help you > > 2012/8/31 Alex Bruno Cáceres <alexbruno...@gmail.com > > >> Hello people! >> I'm learning Django and have a doubt. >> When I set DEBUG=False in settings.py, Dajngo

settings.py DEBUG crash

2012-08-31 Thread Alex Bruno Cáceres
Hello people! I'm learning Django and have a doubt. When I set DEBUG=False in settings.py, Dajngo Admin looses CSS theme, it crashes layout and show only HTML. Why it happens? I did something wrong? -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Django Admin doesn't show all fields from model when registered.

2012-08-18 Thread bruno desthuilliers
Le jeudi 16 août 2012 21:00:56 UTC+2, Tundebabzy a écrit : > > Ok I fixed it and in case someone else falls into such a trap, here's > how I fixed it. > > My Answer model had a field with name 'is_correct' and had a method > with name 'is_correct'. > Everything in Python is an object,

Re: Django TypeError

2012-07-23 Thread bruno desthuilliers
On Tuesday, July 17, 2012 8:00:39 AM UTC+2, sandy wrote: > > I want to have different views for my application for different types > of users. For this I have this code for my views.py file : > > def index1(request): > u = User.objects.all() > This has been solved. > if

Re: Problem to complète the xml template

2012-07-05 Thread bruno desthuilliers
On Wednesday, July 4, 2012 8:12:50 PM UTC+2, nef wrote: > > Hello, > Bonjour > I want to cry a function allowing me to complete a template *. Xml. May I > have a problem with the passage of the object render_to_response. In short > here is my code. In fact, I do not know how to return an

Re: have an object available in every templates

2012-06-29 Thread bruno desthuilliers
On Thursday, June 28, 2012 5:53:46 PM UTC+2, Bastian wrote: > > Well, I was curious to see if it worked with a context processor so I > tried and indeed it works. After all it's only returning an object or list > of objects in a dictionary. Now I don't know which method is the most >

Re: interpretting urls

2012-06-28 Thread bruno desthuilliers
On Wednesday, June 27, 2012 11:53:56 PM UTC+2, Sam007 wrote: > > > Going thru the doc link you gave, I did not understand the term middleware > request processing? > > but if the incoming HttpRequest object has an attribute called urlconf (set > by middleware *request >

Re: interpretting urls

2012-06-27 Thread bruno desthuilliers
On Tuesday, June 26, 2012 6:52:06 PM UTC+2, Sam007 wrote: > > Hi, > > I am bit confused about what exactly do these urls imply in the url.py > > This is all documented here : https://docs.djangoproject.com/en/dev/topics/http/urls/ -- You received this message because you are subscribed to the

Re: ImportError: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.

2012-06-26 Thread bruno desthuilliers
Désolé, je ne parle pas espagnol... On Monday, June 25, 2012 7:49:01 AM UTC+2, totechess wrote: > > Tengo el siguiente problema. Con la última actualización de django 1.5 > supongamos estoy en un directorio x y al hacer django-admin > startproject miProyecto me genera la carpeta miProyecto con

Re: am new to the django ,facing problem in searching the database with primary key(student id)

2012-06-26 Thread bruno desthuilliers
On Tuesday, June 26, 2012 8:47:27 AM UTC+2, rick wrote: > > Reverse for 'add_record.views.search' with arguments '( Student_login object>,)' and keyword arguments '{}' not found. > > Your problem is with reverse url resolving, not with "searching the database". -- You received this message

Re: Hey

2012-06-25 Thread bruno desthuilliers
On Monday, June 25, 2012 8:05:13 AM UTC+2, Pervez Mulla wrote: > > HI, > > How can I extract data from DB so that I can take that data n send it to > templates to display graphs according to DataBase values . > How can I write view function for that? > Everything you need to know is here :

Re: Render time

2012-06-25 Thread bruno desthuilliers
On Monday, June 25, 2012 1:34:08 PM UTC+2, larry@gmail.com wrote: > > Now they want me to add to that how long > the browser takes to render the page > How would server code ever know this ? -- You received this message because you are subscribed to the Google Groups "Django users"

runserver cache my template files

2012-06-22 Thread bruno desthuilliers
I assume you did check your browser cache ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/vcMDF4DurtYJ. To post to this group, send email to

Re: Custom Tags and Includes, invalid block !

2012-06-19 Thread bruno desthuilliers
On Tuesday, June 19, 2012 12:37:29 AM UTC+2, upmauro wrote: > > Hello, sorry my english ! > > I have one question, i create one custom tag and this works fine. > > But i have a situation : > > *site.html* > * > * > {% include "header.html" %} > > Django looks the best framework for web ! > > {%

Re: trailing slash defeats get_absolute_url

2012-06-15 Thread bruno desthuilliers
On Friday, June 15, 2012 9:42:33 AM UTC+2, Mike Dewhirst wrote: > > On 15/06/2012 5:11pm, bruno desthuilliers wrote: > > You have to end your url patterns with a slash, ie r'^search/'. > > Ok. I added a trailing slash to the get_absolute_url method like so ... > return

trailing slash defeats get_absolute_url

2012-06-15 Thread bruno desthuilliers
You have to end your url patterns with a slash, ie r'^search/'. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/JAbME4x4ZusJ. To post to this group, send

trailing slash defeats get_absolute_url

2012-06-15 Thread bruno desthuilliers
You have to end your url patterns with a slash, ie r'^search/'. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/iks8SsEo2v4J. To post to this group, send

Re: 'ascii' codec can't encode character u'\xe4'

2012-06-14 Thread bruno desthuilliers
On Thursday, June 14, 2012 1:58:28 PM UTC+2, lawgon wrote: > > On Thu, 2012-06-14 at 04:19 -0700, bruno desthuilliers wrote: > > > I have an application which runs on a webfaction hosting. > > > > > > > > How is it deployed exactly ? > > apach

Re: 'ascii' codec can't encode character u'\xe4'

2012-06-14 Thread bruno desthuilliers
On Thursday, June 14, 2012 12:35:40 PM UTC+2, lawgon wrote: > > hi, > > I have an application which runs on a webfaction hosting. How is it deployed exactly ? (sorry never used webfaction hosting for django - nor for anything else FWIW) > I also have > the same app running on my devel

Re: more than 1 level of belongsTo

2012-06-08 Thread bruno desthuilliers
What about posting your CakePHP questions to a CakePHP related group ? On Jun 8, 2:56 pm, rahajiyev wrote: > Hi, I have a model Foo belongsTo Bar, which in turn belongsTo Xyzzy. > When I do $this->Foo->find('all'); > > sql dump shows that the SQL join is performed only

Re: RSS Feed

2012-06-08 Thread bruno desthuilliers
On Jun 8, 1:53 pm, armagan wrote: > Hi, > > I'm trying to implemente an rss to my project. I have done a simple > example in django doc. Which one ? url, please. > But I have an error in urls.py. > > from 'blogum.feeds import LatestEntriesFeed' ==> I've imported this, I

Re: url_dir

2012-06-06 Thread bruno desthuilliers
On Jun 6, 12:50 pm, Satvir Toor wrote: > I read the linkhttps://docs.djangoproject.com/en/1.3/topics/http/urls/ > > above unable to understand what is regular expression in url pattern > e.g r'^pyrheology/plot/tensile/(?P\d+).png$' Do you mean "I don't understand where's

Re: url_dir

2012-06-06 Thread bruno desthuilliers
On Jun 6, 12:32 pm, Satvir Toor wrote: > Please explain me the following code that exists in urls.py file of > the project. > url(r'^pyrheology/plot/str/(?P\d+).png$',\ >         'pyrheology.views.str_tmc_plot_img',\ >         name='pyrheology-str-tmc-plot-img'),

Re: Accessing current URI from template tag

2012-06-06 Thread bruno desthuilliers
On Jun 6, 10:27 am, Swaroop Shankar V wrote: > Hello All, > > Well my question is on how to get the current URI in a template tag. You'll have to use a RequestContext in the views rendering the templates where you use this templatetag, and activate the

Re: . delete() don't work

2012-06-06 Thread bruno desthuilliers
On Jun 5, 7:22 pm, Lucas Aride Moulin wrote: > The syncdb worked. Isso didn't know that the delete() need a table. > Thanks, It doesn't, of course. The problem you report is surprising to say the least... -- You received this message because you are subscribed to the

Re: How to perform a simple search ignoring characters with accents (á, é, í, ó, ú)

2012-06-05 Thread bruno desthuilliers
Since no one seemed to mention it so far: what about using a real fulltext search engine ? (hint : django-haystack provides a django-ish, unified API over quite a few known search engines). -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Retrieve datas from database

2012-06-04 Thread bruno desthuilliers
On Jun 4, 2:23 pm, by-neron wrote: > however, > > in mysite/template/index.html > >  {% for post in latestPosts %} >      {{ post.id }} >     {% endfor %} > prints nothing because it could not send data here. How can i send it ? You pass them as a Context object to the

Re: Using the django.contrib.auth User in my model - database error

2012-06-04 Thread bruno desthuilliers
On Jun 4, 11:01 am, xTalisman wrote: > Solved : > I dropped all the database tables (including the contib.auth ones) and ran > syncdb, suddenly everything was fine. odd , but is working now . Well, nice to know it works now, but yes this _is_ odd. -- You received

Re: Understanding Django for PHP developer

2012-06-04 Thread bruno desthuilliers
On Jun 3, 12:18 pm, mikegolf wrote: > Hi, > I've started to learn Django recently, however for last 5+ years I've > been developing using PHP (especially Yii) and thus asking if there's > any tutorial / documentation on significant differences in > *thinking*. > What I mean is

Re: Using the django.contrib.auth User in my model - database error

2012-06-04 Thread bruno desthuilliers
On Jun 4, 9:49 am, xTalisman wrote: > I ran syncdb without a problem ,  then when I used the admin interface I > get the following error : > > Exception Type: DatabaseError at /admin/coordination/project/ > Exception Value: no such column:

Re: Problem with Django Project

2012-06-01 Thread bruno desthuilliers
On Jun 1, 10:47 am, cmac0tt wrote: > Learning Django/Python by converting a warped >0.96 project to a 1.4 > project with python 2.7.3 > > So this is my github to make it easier. Can anyone tell me what it is > thats causing me to keep chasing errors around? Just a

Re: Adding values to formdata of ModelForm before saving

2012-05-31 Thread bruno desthuilliers
On 31 mai, 20:09, Schmidtchen Schleicher wrote: > Thank you for your quick answer, but it doesn't really work. It raises the > exception "can't assign to operator" > My view now looks like this: > > @login_required > > def create_termin(request, calid, year=None,

Re: sqlall fails silently

2012-05-31 Thread bruno desthuilliers
On May 31, 8:24 am, vijay shanker wrote: > hi > i defined three models and put them in /appname/models/ a.py, b.py, > c.py. and a __init__.py in which i import all classes defined inside > a.py/b.py/c.py. > > when i try to do a ./manage.py sqll appname at prompt , it simply

Re: image files do not get deleted on deleting an object

2012-05-31 Thread bruno desthuilliers
On May 31, 9:14 am, kenneth gonsalves wrote: > hi, > > I have just noticed that on deleting an object, the images and files > stored on disk for this object do not get deleted. Is this a bug or a > feature?

Re: derived fields and getattr

2012-05-25 Thread bruno desthuilliers
On May 25, 2:32 pm, Larry Martell <larry.mart...@gmail.com> wrote: > On Fri, May 25, 2012 at 2:24 AM, bruno desthuilliers > > >> I couldn't use the display name or the getattr failed. > > > ??? > > When I first did: > > extra(select={"Delta"

Re: track change

2012-05-25 Thread bruno desthuilliers
On May 24, 11:00 pm, Carsten Jantzen wrote: > > Not sure what you mean by detecting skill change using properties, I > havn't looked into that. > Could you point to some documentation about it. Python has a strong support for computed attributes[1], and offers a builtin

Re: derived fields and getattr

2012-05-25 Thread bruno desthuilliers
On May 24, 11:50 pm, Larry Martell wrote: > I got this to work by adding the derived field to the drill down query > with queryset.extra, and then it was available with getattr. The only > issue I had was they wanted the derived field displayed with a name > (not

Re: loop over model ids ? possible ?

2012-05-25 Thread bruno desthuilliers
On May 25, 8:19 am, doniyor wrote: > hey guys, > i need to loop over the number of ids of objects in my db table and create > accordingly the same number of html fields. how can i do it.. my effort is > this: >  numberOfIds = Produkt.objects.count() >         i = 1; >  

Re: derived fields and getattr

2012-05-24 Thread bruno desthuilliers
On May 24, 3:44 pm, Larry Martell <larry.mart...@gmail.com> wrote: > On Thu, May 24, 2012 at 2:27 AM, bruno desthuilliers > > <bruno.desthuilli...@gmail.com> wrote: > > On May 23, 10:39 pm, Larry Martell <larry.mart...@gmail.com> wrote: > >> I was asked

Re: django-crequest - New app announcement

2012-05-24 Thread bruno desthuilliers
On May 24, 2:57 pm, Alireza Savand <alireza.sav...@gmail.com> wrote: > On Thursday, May 24, 2012 4:46:34 PM UTC+4, bruno desthuilliers wrote: > > > > Uhu... What if I'm running my code from the shell or a command ? > > By the way, there is also *set_request*(*request

Re: track change

2012-05-24 Thread bruno desthuilliers
On May 23, 10:45 pm, Carsten Jantzen wrote: > When I load the player I would like to see his latest stats. > If I goto the players page I would like to be able to view when and > what skill changed. > > I am looking for a good way to implement it. > I was thinking to make

Re: How to call RegexValidator explicitly?

2012-05-24 Thread bruno desthuilliers
On May 24, 4:30 am, forthfan wrote: > > from django import forms > from django.core.validators import * > > class IdentForm(forms.Form): >   ident = forms.CharField() >   ident_type = forms.ChoiceField(choices=( >       ('EIN','Employer ID'), >       ('SSN','Social

Re: django-crequest - New app announcement

2012-05-24 Thread bruno desthuilliers
On May 24, 12:35 pm, Alireza Savand wrote: > Hi > Yesterday i released an app for django. > *Basically it's just a middleware to access current request of your django > application from anywhere in your code.* Uhu... What if I'm running my code from the shell or a

Re: derived fields and getattr

2012-05-24 Thread bruno desthuilliers
On May 23, 10:39 pm, Larry Martell wrote: > I was asked to make a mod to a large django app that I didn't write. > They wanted me to add a derived field to a query, e.g. select > col1-col2 from table ... I assume you're talking about using queryset.extra ? > I did that

Re: Registering and authenticating via iPhone/Android app

2012-05-24 Thread bruno desthuilliers
On May 23, 3:12 pm, Roarster <ianstrachan2...@googlemail.com> wrote: > Thanks Bruno.  I've had a bit more of a look into this and everyone seems > to be using OAuth, as you mention.  I did try to get this working with the > Tastypie API but I couldn't really find any document

Re: Is there a custom forms component of python-web?

2012-05-24 Thread bruno desthuilliers
plonk. On May 24, 9:58 am, kevon wang wrote: > I want to find a plugin of django what it can custom fields in the form. > The functions include custom fields in web page and create the fields in > database. > plug's flow like these: >      1.we can define fields in web

Re: Registering and authenticating via iPhone/Android app

2012-05-23 Thread bruno desthuilliers
On May 23, 1:12 pm, Roarster wrote: > I'm developing a site using Django using the built in user authentication > module.  This is all working fine and users can register, login, etc. on > the web site with no problems.  The plan is to also have companion >

Re: Is there a custom forms component of python-web?

2012-05-23 Thread bruno desthuilliers
On May 23, 12:27 pm, kevon wang wrote: > Is there a component as above Yes. > thanks! You're welcome. hint #1: google is your friend. Took me about 15 seconds to get the answer, so way less than the time you spent posting your question. hint #2: what you're looking

Re: ordering m2m query based on through table

2012-05-23 Thread bruno desthuilliers
On May 23, 11:43 am, akaariai wrote: > I would guess you would get duplicate objects returned. We programmers are usually very bad at guessing. So when in doubt, check, don't guess ;) > I think the > query works as follows: >   - Fetch all Blook's categories >   - For those

Re: DB joining 3 tables in django admin, while searching on the primary table

2012-05-23 Thread bruno desthuilliers
On May 20, 9:42 am, Aditya Sriram M wrote: > I tried this but it failed? Can you pls correct me? yes : "it failed" is the worst possible way to describe a problem if you expect to get some help. If you get an exception and traceback, please read them carefully, and

Re: ordering m2m query based on through table

2012-05-23 Thread bruno desthuilliers
On May 22, 4:34 pm, akaariai wrote: > So, you would want to do collection.songs.all() and have that ordered > by the sequence defined in the m2m table? I agree - this seems to be > somewhat hard currently. I currently have a similar scheme in one of our projects, works fine

Re: Django site updater

2012-05-23 Thread bruno desthuilliers
git (or whatever versioning system you're using) + South for schema migrations + virtualenv / pip for depencies + a simple shell script on the server to update the whole damn thing and restart services (Apache, whatever). You can even have the script run by a cron job so the server is updated

Re: ModelForms and CreateView Help

2012-05-22 Thread bruno desthuilliers
On May 22, 10:34 am, wchildsuk wrote: > Hi, > > I'm trying to use generic class based views to edit a specific > queryset but I can't see to get my code working. I've defined queryset Nope, cf Xavier's answer on this. > and relevant form but when the form renders it

  1   2   3   4   5   6   7   8   9   10   >