Re: online Django users directory ?

2013-08-20 Thread Avraham Serour
What for? On Aug 21, 2013 12:04 AM, "Fabrice Romand" wrote: > Hi, > > Do you know any online Django users directory ? > > if not, will you support a such project ? > > > -- > You received this message because you are subscribed to the Google Groups > "Django users"

Re: ManyToManyField select only results that match

2013-08-20 Thread Gerd Koetje
mm that seems to not work when i do it on multiple field kleurogen = models.ManyToManyField(Keuzes, blank=True, null=True) kleurhaar = models.ManyToManyField(Keuzes, blank=True, null=True) django.core.management.base.CommandError: One or more models did not validate: profielen.profielen:

Re: ManyToManyField select only results that match

2013-08-20 Thread Gerd Koetje
i think i got it, i was foing it at the wrong spot. i added this to my forms.py kleurogen = forms.ModelMultipleChoiceField(queryset=Keuzes.objects.filter(groep_id= 'kleurogen')) works like a charm -- You received this message because you are subscribed to the Google Groups "Django users"

ManyToManyField select only results that match

2013-08-20 Thread Gerd Koetje
Hi all, I got a form where i use a manytomany field likes this kleurogen = models.ManyToManyField(Keuzes, blank=True, null=True) This works fine but takes all the results from Keuzes How can i only get the results from Keuzes that have the groep 'kleurogen' i tried this but it doesnt work

Re: Bulk-creating two ForeignKey linked models - id field for relationship isn't set properly?

2013-08-20 Thread Victor Hooi
Hi, Cool, thanks for the link to the ticket. Very interesting reading, and I learnt something =). Apparently the ticket says the patch still needs docs/tests - guess it'll be a while before this gets integrated then...hmm. Cheers, Victor On Wed, Aug 21, 2013 at 2:11 AM, Simon Charette

Re: Bulk-creating two ForeignKey linked models - id field for relationship isn't set properly?

2013-08-20 Thread Victor Hooi
Hi, In the source file (JSON) - I have a list of Products dictionaries. The images are one of the elements in that dictionary - hence, the link between them is that images is a child of Product. Hence, when I loop through to create Product, I can create the images and link it there. At the

online Django users directory ?

2013-08-20 Thread Fabrice Romand
Hi, Do you know any online Django users directory ? if not, will you support a such project ? -- 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

Re: Django Periodic tasks

2013-08-20 Thread Arnold Krille
On Sat, 17 Aug 2013 03:36:29 +0100 Some Developer wrote: > I'm aware of django-cron and django-celery, both of which are capable > of doing what I want but I was wondering if I was just making a > fundamental design mistake and there maybe a better option that > someone

Re: Any Tutorials on Django similar to Web2py ????????????????

2013-08-20 Thread Rich Haase
I second the book recommendation. I had a cursory knowledge of django (enough to get myself in trouble) prior to reading 2 scoops of django. Now I have enough knowledge to really make a mess... j/k. It's a great book for learning about the nitty gritty of django development and informing the

Re: Any Tutorials on Django similar to Web2py ????????????????

2013-08-20 Thread Sergio Infante Montero
Maybe, you need some book like this https://django.2scoops.org/ Regards On Tue, Aug 20, 2013 at 11:21 AM, Marcos Moyano wrote: > There are several ways to manage sessions, or cache. That's up to you > according to your needs. > You can find documentation about sessions,

Adding custom WHERE conditions to query sets (MySQL user defined functions)

2013-08-20 Thread Jon Dufresne
Hi, My Django application was ported from a legacy application. This legacy application has some MySQL user defined functions that are frequently used in the WHERE clause of queries. Is it possible to use these stored functions and still return query sets? I want to do something like

Re: Representing infinity or "no limit" in an integer field?

2013-08-20 Thread Jason Arnst-Goodrich
To be honest, I've never dealt with huge data sets but in the cases I have dealt with it's never been a problem. This might be relevant: http://dev.mysql.com/doc/refman/5.0/en/is-null-optimization.html Unless someone shows me pretty compelling stats otherwise, I'll always lean to implementing

Re: Django Admin CSS missing

2013-08-20 Thread Glenn Vulkers
And it's working, thanks alot! Op dinsdag 20 augustus 2013 18:35:35 UTC+2 schreef Glenn Vulkers: > > Hello everyone, > > I'm just reading throught djangobook.com where I came to Chapter 6 so > far. It's about The Django Admin. I installed the admin and such > but I notice that the CSS is

Re: Django Admin CSS missing

2013-08-20 Thread Alex Franco
There you have your problem and answer... uncomment these lines: # 'django.middleware.csrf.CsrfViewMiddleware', # 'django.contrib.sites', # 'django.contrib.staticfiles', # 'django.contrib.admin', Voilà! -- @jafrancov On Tuesday, August 20, 2013 11:59:28 AM UTC-5, Glenn Vulkers

Re: Django Admin CSS missing

2013-08-20 Thread Glenn Vulkers
I'm running manage.py runserver. Django version is: 1.5.1 in Settings.py I have this: MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', # 'django.middleware.csrf.CsrfViewMiddleware',

Re: Django Admin CSS missing

2013-08-20 Thread Alex Franco
Are not missing, but if you are following the djangobook you probably commented something in your settings file as you did on chapter 5, review the middleware, staticfiles and templeate loaders lines, the issue is probably there. On Tuesday, August 20, 2013 11:35:35 AM UTC-5, Glenn Vulkers

Re: Django Admin CSS missing

2013-08-20 Thread Bill Freeman
Not enough information. Django works fine with python2.7, so we would need to know, for example, which version of Django, how you installed it, whether you are using manage.py runserver or whether you are running behind Apache or something else, and what exactly you mean by "I installed the admin

Django Admin CSS missing

2013-08-20 Thread Glenn Vulkers
Hello everyone, I'm just reading throught djangobook.com where I came to Chapter 6 so far. It's about The Django Admin. I installed the admin and such but I notice that the CSS is missing. Does anyone know what to do? I'm running Python2.7 Glenn -- You received this message because you are

Re: Any Tutorials on Django similar to Web2py ????????????????

2013-08-20 Thread Marcos Moyano
There are several ways to manage sessions, or cache. That's up to you according to your needs. You can find documentation about sessions, caching and much more here: https://docs.djangoproject.com/en/1.5/ Rgds On Tue, Aug 20, 2013 at 1:12 PM, JAI PRAKASH SINGH < jaiprakashsingh...@gmail.com>

Re: Any Tutorials on Django similar to Web2py ????????????????

2013-08-20 Thread JAI PRAKASH SINGH
Thank you sir, but i need that kind of tutorials which is complete , in terms of security, session, cache like udacity tutorilas on web2py .. on web development. Please revert back if u have any kind of link on it On Tue, Aug 20, 2013 at 9:35 PM, carlos wrote: >

Re: Any Tutorials on Django similar to Web2py ????????????????

2013-08-20 Thread carlos
https://docs.djangoproject.com/en/1.5/intro/tutorial01/ Cheers On Tue, Aug 20, 2013 at 9:57 AM, JAI PRAKASH SINGH < jaiprakashsingh...@gmail.com> wrote: > Any Tutorials on Django similar to Web2py > > -- > You received this message because you are subscribed to the Google

Any Tutorials on Django similar to Web2py ????????????????

2013-08-20 Thread JAI PRAKASH SINGH
Any Tutorials on Django similar to Web2py -- 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 post to

Re: Defining custom template tags in a new app

2013-08-20 Thread Tom Evans
On Tue, Aug 20, 2013 at 1:54 PM, Daniel Roseman wrote: > Django doesn't care what app the tags are in, as long as that app is in > INSTALLED_APPS and the tags are in the templatetags directory inside the app > (and Python requires a blank __init__.py in that directory too).

extending from django.contrib.sites.models import Site

2013-08-20 Thread Gerd Koetje
is it possible to extend from django.contrib.sites.models import Site Coudlnt find any help related -- 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

Re: Best-practice for "join mailing list" form on every page

2013-08-20 Thread Tom Evans
On Mon, Aug 19, 2013 at 8:18 PM, Steven Smith wrote: > I've got a simple form with one field that appears in the footer of my site, > asking users to enter their email address to subscribe to our mailing list. > > Rather than duplicate the form-processing logic in every

Re: How do I create a script to fill in django admin login form and submit?

2013-08-20 Thread 7equivalents
I feel as if I'm getting closer, yet haven't successfully logged in yet. I have added in the missing key. I went to the django.contrib.auth.forms to find the name of the form that gets submitted in the login page. It seems to be called AuthenticationForm. import requests login_url =

Job Opportunity @ Dartmouth (Hanover, NH)

2013-08-20 Thread Casey Greene
Hi django-users, I wanted to let you guys know about a job opportunity in my lab for a position where we'd like to have someone with django expertise. The listing is available through the Dartmouth jobs website: https://searchjobs.dartmouth.edu/postings/20736 This position is on site in our lab

Re: Defining custom template tags in a new app

2013-08-20 Thread Tom Lockhart
On 2013-08-20, at 3:53 AM, kandelabr wrote: > Hello! > > I want to define a new template tag and use it in a number of applications > inside my django project. The documentation says: > > Custom template tags and filters must live inside a Django app. If they > relate

Re: Defining custom template tags in a new app

2013-08-20 Thread Daniel Roseman
On Tuesday, 20 August 2013 11:53:27 UTC+1, kandelabr wrote: > Hello! > > I want to define a new template tag and use it in a number of applications > inside my django project. The documentation says: > > *Custom template tags and filters must live inside a Django app. If they > relate to an

Re: Bulk-creating two ForeignKey linked models - id field for relationship isn't set properly?

2013-08-20 Thread Daniel Roseman
On Tuesday, 20 August 2013 12:10:34 UTC+1, Victor Hooi wrote: > Hi, > > 1. Hmm, in that case, using bulk_create may not work - I'm currently > relying on generating the full lists of Products and ProductImages, then > saving in a batch at the end. > > So I need to loop through and call .save()

Best-practice for "join mailing list" form on every page

2013-08-20 Thread Steven Smith
I've got a simple form with one field that appears in the footer of my site, asking users to enter their email address to subscribe to our mailing list. Rather than duplicate the form-processing logic in every single view, what should I do? - POST to one location, but use a context processor

If type of a field could be DYNAMIC

2013-08-20 Thread Vlad Krab
Hi everyone, I`m trying to solve this problem for a really long time but can`t find a solution. I write an app, the feature is to LET USER CHANGE FIELD`S TYPE. But I can not. My Django and Python knowlege are weak now, despite I`ve tried to find something like this a lot. *Please, may you

Defining custom template tags in a new app

2013-08-20 Thread kandelabr
Hello! I want to define a new template tag and use it in a number of applications inside my django project. The documentation says: *Custom template tags and filters must live inside a Django app. If they relate to an existing app it makes sense to bundle them there; otherwise, you should

Re: Is it possible to have 1-to-Many and 1-to-1 relationships for one specific table?

2013-08-20 Thread Daniel Roseman
On Tuesday, 20 August 2013 12:12:40 UTC+1, Pepsodent Cola wrote: > Ok let's start from the very beginning because this MVC business is making > me juggle too many balls all at once. More than I can handle and > understand. > > > ### PART A.1 > With this Filter 5 view code I get the list result

Re: Is it possible to have 1-to-Many and 1-to-1 relationships for one specific table?

2013-08-20 Thread Pepsodent Cola
Ok let's start from the very beginning because this MVC business is making me juggle too many balls all at once. More than I can handle and understand. ### PART A.1 With this Filter 5 view code I get the list result that I expect. But it is not ordered the way I want. class

Re: Bulk-creating two ForeignKey linked models - id field for relationship isn't set properly?

2013-08-20 Thread Victor Hooi
Hi, 1. Hmm, in that case, using bulk_create may not work - I'm currently relying on generating the full lists of Products and ProductImages, then saving in a batch at the end. So I need to loop through and call .save() individually on each Product, then the corresponding ProductImages, before

Re: Django signals to all connections?

2013-08-20 Thread Jani Tiainen
Hi, Well it seems that you have understood things a bit incorrectly. First at all, only logged in user is the one accessing some page (a view) from Django system. After that there is nobody logged in traditional sense - there is no simple way to detect that user closed browser and was "logged

Re: Representing infinity or "no limit" in an integer field?

2013-08-20 Thread Simon Riggs
On 20 August 2013 11:46, Jani Tiainen wrote: > I think pretty latest PostgreSQL can use indexes to filter NULL values as > well (doesn't have facility to store them though). Postgres can use an index to find NULL values, so SELECT * FROM foo WHERE col IS NULL can be indexed.

Re: Representing infinity or "no limit" in an integer field?

2013-08-20 Thread Jani Tiainen
On Mon, 19 Aug 2013 11:14:54 -0700 (PDT) Jason Arnst-Goodrich wrote: > > > > > Problem is that usually databases aren't very fast to search NULL values > > so if you have to for example produce often list of products that you can > > buy "infinite amount", you would like

Re: Bulk-creating two ForeignKey linked models - id field for relationship isn't set properly?

2013-08-20 Thread Daniel Roseman
On Tuesday, 20 August 2013 10:57:52 UTC+1, Victor Hooi wrote: > Hi, > > *1. Bulk Creating Products/ProductImages* > > I have a Django custom management command that bulk-loads a list of > products and product images from a JSON file. > > I have a Product model, along with an ProductImage model -

Re: Is it possible to have 1-to-Many and 1-to-1 relationships for one specific table?

2013-08-20 Thread Daniel Roseman
On Tuesday, 20 August 2013 11:25:02 UTC+1, Pepsodent Cola wrote: > > But the above Detail list initially works by a 1-to-Many relationship. > When I add my 1-to-1 relationship in order to connect the votes field to > Word table then I get a bunch of weird MVC conflicts that I don't >

Re: Is it possible to have 1-to-Many and 1-to-1 relationships for one specific table?

2013-08-20 Thread Pepsodent Cola
### PART A My detail page looks like this in the web browser. http://localhost:8000/navi_polls/specifics/1/ Page Filter 5 * Page - Leafy 2 = 18 votes * Page - Leafy 3 = 50 votes My intended goal is to have Filter 5 sort this list with the highest

Tech start up looking for a Python/Django rockstar - £300/day - fast start

2013-08-20 Thread Cal Leeming [Simplicity Media Ltd]
Hello all, One of our tech startup clients in London is currently looking for an experienced Python/Django rockstar. The position is full time, salary is £300/day, working remotely or on-site, shares are also being considered for those who can bring exceptional talent/experience. Currently in

Bulk-creating two ForeignKey linked models - id field for relationship isn't set properly?

2013-08-20 Thread Victor Hooi
Hi, *1. Bulk Creating Products/ProductImages* I have a Django custom management command that bulk-loads a list of products and product images from a JSON file. I have a Product model, along with an ProductImage model - each Product may have many ProductImages. class Product(models.Model): >