Re: problem with integrating bootstrap 3.1.1 and django 1.6

2014-03-15 Thread rafiee.nima
I'm using development server . and when i use   it 
seems work correctly but when I use   my project file and directory structure is like :

   1. root project folder
   1. app folder
   2. static
  1. css
 1. bootstarp.css
 2. js
  3. img
  3. media 
   4. template
  1. app 
  1. base.html
 


On Friday, March 14, 2014 7:49:32 PM UTC+3:30, Tom Evans wrote:
>
> On Fri, Mar 14, 2014 at 2:33 AM, Camilo Torres 
> > 
> wrote: 
> > python manage.py startapp testapp 
> > 
> > Inside the newly created test app directory, create static/css/ and put 
> your 
> > file there. Now try to reload your template to see if the template 
> loads. 
> > 
> > This may make it work for you, but in your case, is not the final 
> solution. 
> > You may need to actually put these static files that are 'site global' 
> in a 
> > central location in your filesystem, let's say: 
> /var/www/static/(css|js|etc) 
> > 
> > To do that, you need to add a setting to your settings.py: 
> > 
> > STATICFILES_DIRS = ( 
> > '/var/www/static/', 
> > ) 
> > 
> > That way you put all of your static site wide files inside 
> subdirectories in 
> > a common path. 
>
> This advice is wrong, do not copy your static files from 
> /static to a folder listed in STATICFILES_DIRS. 
>
> STATICFILES_DIRS is a list of _additional_ project folders that are 
> searched for files _in addition_ to your application static files. 
>
> However, you do need to copy the files from your application static 
> directories _and_ your project static file directories to the 
> directory specified by STATIC_ROOT. You do not do this manually, the 
> management command collectstatic does this for you. You also only need 
> to do this in production, in development (using runserver), the static 
> files are served for you by runserver. 
>
> For complete info on static files, there is an excellent step-by-step doc: 
>
> https://docs.djangoproject.com/en/1.6/howto/static-files/ 
>
> Cheers 
>
> Tom 
>

-- 
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 this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3b32d61d-3465-4c00-87a5-f11dfb33e702%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: database design problem.

2014-03-15 Thread Lachlan Musicman
I would make the imports model an "intermediate model" - see here:

https://docs.djangoproject.com/en/1.6/topics/db/models/#extra-fields-on-many-to-many-relationships

L.

On 16 March 2014 09:41, willy Hakizimana  wrote:
> Thank you guys so much. You guys rock!
>
>
> On Saturday, March 15, 2014 10:38:03 AM UTC-5, willy Hakizimana wrote:
>>
>> First of all, this community is amazing at how fast questions are
>> answered. I have learned so much.
>>
>>
>> I am designing an app with models that look like this.
>>
>> Country(country_id(PK), country_name, gdp, gdp_growth, income_per_capita)
>>
>> Product(product_id(PK), product_name, country_id(FK), imports_volume)
>>
>> Since I have to show imports_volume for the same product in each country,
>> I am stumped on how to design the db.
>>
>>
>>
>
> --
> 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 this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/03becba4-4127-4bac-b76d-c47e2cbd7b74%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 
>From this perspective it is natural that anarchism be marked by
spontaneity, differentiation, and experimentation that it be marked by
an expressed affinity with chaos, if chaos is understood to be what
lies outside or beyond the dominant game or system. Because of the
resistance to definition and categorisation, the anarchist principle
has been variously interpreted as, rather than an articulated
position, “a moral attitude, an emotional climate, or even a mood”.
This mood hangs in dramatic tension between utopian hope or dystopian
nihilism...
-
http://zuihitsu.org/godspeed-you-black-emperor-and-the-politics-of-chaos

-- 
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 this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGBeqiNSsWadO8JZ4O%2BgPXW_4XfY-OReXTDg%2BDEjJa3EEaDySA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: installing django trunk

2014-03-15 Thread Malik Rumi
First, Dan, thanks for the reply. Second, apologies for the long delay, but 
sometimes the day job gets in the way. Third, I did as you suggested, but 
Django 1.6.1 was NOT removed. My best guess is that the official 
documentation instruction that pip would take care of this for me only 
applies when going from one official release to another, not when going 
from an official release to a development release, though of course it does 
not say so explicitly.
pip did uninstall the 1.7 files from Python27/Scripts when I pointed it to 
them directly. I should add at this point that at the time of my original 
post, I did not realize that there were only 4 of them and that 
django-trunk was in the intended virtualenv alongside 1.6.1. 

However, pip would not only not uninstall django-trunk, it told me it 
wasn't installed, never mind the folder sitting there. Even better, git 
remove didn't work either. "Fatal: not a git repository"

So I deleted django-trunk the old fashioned way, through my OS. Then I 
activated the virtualenv, reconnected to git, and got django-trunk and the 
admin files where I expected them to be - in the virtualenv. When I saw 
this in my terminal window:

 Adding Django 1.7a2 to easy-install.pth file
Deleting C:\Envs\VE1\Scripts\django-admin.py
Installing django-admin-script.py script to C:\Envs\VE1\Scripts

I assumed that meant it was taking care of 1.6.1 at the same time it was 
installing 1.7a2, as I understood the install instructions to say it would 
do. But when I ran print(django.get_version()), I got 1.6.1!

Then I deleted both the django folder and the egg folder through Windows, 
but when I ran get_version again, I STILL got 1.6.1! I don't see how that 
is possible. There is another Django 1.6.1, but it is inside a DIFFERENT 
virtualenv, and when I exited the Python interpreter, I was right back to 
the VE I was working with. There is a django-admin in Python27, but when I 
opened it, it explicitly said that it was 1.7a2! Now it also had a line of 
code I didn't understand:

require('Django==1.7a2')
del require

What is this doing? Deleting a requirement as soon as it is created? I 
don't understand. 

Finally, I decided to runserver. The good news is that my site still works 
as it did before. The bad news is I have no idea how or why. Runserver also 
explicitly stated that it was running 1.6.1.

So, I guess I'll have to muddle along without migrations, which was the 
whole point of this exercise in futility. But I sure would like to 
understand what is happening here, if any of you wiser and more experienced 
heads can enlighten me. 



\
On Saturday, March 8, 2014 3:10:20 AM UTC-6, Malik Rumi wrote:
>
> I am going from 1.6.1 to 1.7a2, mostly to take advantage of the new 
> migrations feature.
> I followed the directions here 
> http://django.readthedocs.org/en/latest/topics/install.html#removing-old-versions-of-django
>  
> Since I originally installed with pip, supposedly that would take care of 
> removing the old version for me if I installed with pip now.
> I changed into the subdirectory where 1.6.1 is, which is inside 
> virtualenvwrapper.
> The commands they gave ran and reported success. However, 1.7a2 has been 
> installed at Python27/Scripts, not inside my virtualenv
> 1.6.1 seems to alive and well at its same original location.
> What do I now? Can I just delete the 1.6.1 folder? Will pip/virtualenv 
> know where to find 1.7a2 for my cuurent projects? Should I start the 
> install over?
> Thx.
>

-- 
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 this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/64ea91d3-f4df-470d-bad2-9c818708cb3c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: database design problem.

2014-03-15 Thread willy Hakizimana
Thank you guys so much. You guys rock!

On Saturday, March 15, 2014 10:38:03 AM UTC-5, willy Hakizimana wrote:
>
> First of all, this community is amazing at how fast questions are 
> answered. I have learned so much.
>
>
> I am designing an app with models that look like this.
>
> Country(country_id(PK), country_name, gdp, gdp_growth, income_per_capita)
>
> Product(product_id(PK), product_name, country_id(FK), imports_volume)
>
> Since I have to show imports_volume for the same product in each country, 
> I am stumped on how to design the db.
>
>
>  
>

-- 
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 this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/03becba4-4127-4bac-b76d-c47e2cbd7b74%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: database design problem.

2014-03-15 Thread Alvin Lindstam
Actually, the Django term for this is "through". Not via.

See 
https://docs.djangoproject.com/en/1.6/topics/db/models/#extra-fields-on-many-to-many-relationships
 
on how to specify the intermediate table to be used in many-to-many 
relationships.


Den lördagen den 15:e mars 2014 kl. 18:01:02 UTC+1 skrev Dennis Lee Bieber:
>
> On Sat, 15 Mar 2014 08:38:03 -0700 (PDT), willy Hakizimana 
> > declaimed the following: 
>
> >First of all, this community is amazing at how fast questions are 
> answered. 
> >I have learned so much. 
> > 
> > 
> >I am designing an app with models that look like this. 
> > 
> >Country(country_id(PK), country_name, gdp, gdp_growth, income_per_capita) 
> > 
> >Product(product_id(PK), product_name, country_id(FK), imports_volume) 
> > 
> >Since I have to show imports_volume for the same product in each country, 
> I 
> >am stumped on how to design the db. 
> > 
> If I understand your statement, you need (paraphrased) the 
> imports_volume to be for each product for each country... 
>
> That means it does NOT belong in either Country or Product tables. 
>
> Country(*countryID*, Name, gdp, gdp_growth, per_capita_income) 
>
> Product(*productID*,  Name) 
>
> Imports(_countryID_, _productID_, import_volume) 
>
> In Django terms (I believe), this is a many2many relationship 
> using a 
> via table (the native m2m would create a table with _countryID_, 
> _productID_ foreign keys only; the via table lets you add data specific to 
> the relationship itself... An intersect table in older database 
> terminology) 
>
> > 
> > 
> -- 
> Wulfraed Dennis Lee Bieber AF6VN 
> wlf...@ix.netcom.com HTTP://wlfraed.home.netcom.com/ 
>
>

-- 
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 this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9c0f640e-99e9-4d6d-9c89-067755b7f8de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using Redis as a DB backend for some models (not a caching backend!)

2014-03-15 Thread alonn
Thanks camilo but this is a caching framework. I know of and use.. Hardly
an answer to what I'm looking for
בתאריך 15 במרץ 2014 19:16, "Camilo Torres"  כתב:

> On Friday, March 14, 2014 3:10:09 PM UTC-4:30, Alon Nisser wrote:
>>
>> Can I use redis as a django database for some of my models? I'm aware
>> (and using) caching with django and redis, but I'm looking for something
>> else here: Something I can use at least some of the orm features with,
>> handle a django Model, etc.  I found 
>> django-redis-enginebut 
>> it doesn't look like an active project (pre alpha commits 3 years ago)
>> and django-nonrel  which
>> doesn't support redis and is actually a django fork and not Django proper.
>> Any ideas how to proceed from here? Thanks!
>>
> Hello
>
> A simple search with 'django redis' gives me this in the firsts results:
> http://niwibe.github.io/django-redis/
>
> Yours,
> Camilo
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/KN7aRUz_LV0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/e75fe08c-60da-4890-9e98-4aa4a2f84d0a%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAN3noj0M1BUDrGjiXQJhEeZ_UxL4yXaV4pCi67FW6GME6HAmbg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using Redis as a DB backend for some models (not a caching backend!)

2014-03-15 Thread Camilo Torres
On Friday, March 14, 2014 3:10:09 PM UTC-4:30, Alon Nisser wrote:
>
> Can I use redis as a django database for some of my models? I'm aware (and 
> using) caching with django and redis, but I'm looking for something else 
> here: Something I can use at least some of the orm features with, handle a 
> django Model, etc.  I found 
> django-redis-enginebut 
> it doesn't look like an active project (pre alpha commits 3 years ago) 
> and django-nonrel  which doesn't 
> support redis and is actually a django fork and not Django proper. Any 
> ideas how to proceed from here? Thanks!
>
Hello

A simple search with 'django redis' gives me this in the firsts results:
http://niwibe.github.io/django-redis/

Yours,
Camilo

-- 
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 this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e75fe08c-60da-4890-9e98-4aa4a2f84d0a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Can please someone explain this code from the docs?

2014-03-15 Thread Camilo Torres
On Friday, March 14, 2014 5:33:37 PM UTC-4:30, Voyager wrote:
>
> On 03/14/2014 11:49 PM, Shawn Milochik wrote: 
> > That's just the syntax for calling a method on the base class. 
> > 
> > 1. MultiEmailField is a subclass of forms.Field. 
> > 2. forms.Field has a method named validate. 
> > 3. MultiEmailField also has a method named validate, so it overrides the 
> > one on forms.Field. 
> > 
>
> Thank you. It seemed odd that the calling class name is used to call the 
> parent but the more I think about it the more it makes sense. super in 
> it self is a function that returns the parent of a given class. So it is 
> logical to include class in arguments list. 
>
Hello,

This has nothing to do with Django; *super() is a Python built-in* to 
manage calling/accessing attributes of the super class taking in account 
that Python supports multiple inheritance.

Regards,
Camilo

-- 
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 this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8b1ff3d5-f805-4c13-81a1-1ff80f8f7ba0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: messaging

2014-03-15 Thread Camilo Torres
On Friday, March 14, 2014 4:02:08 PM UTC-4:30, Ankit Singh wrote:
>
> i want to know that for certain task i want to send some message to user 
> on his cellphone .
> is there any way that i can do so in django with importing costly 
> application.
>
Hello,

You can do with a third party module/API/application. Django is not for 
sending SMSs, but for web front end.

You can do what you need inside a Django application. Your Django 
application can connect or use third party service to send the SMS.

Regards,
Camilo

-- 
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 this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7aed31aa-6a03-4805-8bdc-d6f3ffe48c1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [newbie] -- Regex-matching ("Tango with Django")

2014-03-15 Thread Camilo Torres
On Friday, March 14, 2014 8:14:57 PM UTC-4:30, David wrote:
>
> I am wodering whether my implementation is incorrect or whether there is 
> a typo in the textbook. My question is how I can make sense of these 
> instructions: "The regular expression to match about/ is r'^about/'". 
>
> I was following the "Tango with Django" book. 
>
> In the exercises of chapter 3 I am asked to 
>
> """ 
> Now map the view ['about', which we just created] to /rango/about/. For 
> this step, you’ll only need to edit the urls.py of the rango application. 
> """ 
>
> Later, the author givessome hints, specifically: 
>
>
> """ 
> The regular expression to match about/ is r'^about/' 
> """ 
>
> Now, there was no way to do this. I finally managed to get 
>
> http://127.0.0.1:8000/rango/and 
> http://127.0.0.1:8000/rango/about/ 
>
> running satisfactorily (my code is below), but I was not even sure this 
> was intended. The author possibly wanted to create 
>
> http://127.0.0.1:8000/about/instead of 
> http://127.0.0.1:8000/rango/about/ 
>
> Thanks for clarifying this issue for me! 
>
> Cheers, 
>
> David 
>
>
>
>
> Here is my project/urls.py 
>
> from django.conf.urls import patterns, include, url 
>
> from django.contrib import admin 
> admin.autodiscover() 
>
> urlpatterns = patterns('', 
> # Examples: 
> # url(r'^$', 'justnow.views.home', name='home'), 
> # url(r'^blog/', include('blog.urls')), 
>
> # url(r'^admin/', include(admin.site.urls)), 
> url(r'^rango/', include('rango.urls')),  # ADD THIS NEW TUPLE! 
> url(r'^about/', include('rango.urls')),  # ADD THIS NEW TUPLE! 
> ) 
>
>
>
> The app urls.py: 
>
> from django.conf.urls import patterns, include, url 
> from rango import views 
>
> urlpatterns = patterns('', 
> url(r'^$', views.index, name='Rangos index'), 
> url(r'about', views.about, name='About page'), 
> ) 
>
> The app views.py: 
>
> from django.http import HttpResponse 
>
> def index(request): 
> return HttpResponse("Rango says hello.  href='/rango/about/'>About") 
>
> def about(request): 
> return HttpResponse("Here is the about page.  href='/rango/'>Index") 
>
>
>
>
>
>
>
> david@ubuntu:~/[...]/django_project$ tree 
> . 
> ├── manage.py 
> ├── notes.txt 
> ├── rango 
> │   ├── admin.py 
> │   ├── admin.pyc 
> │   ├── __init__.py 
> │   ├── __init__.pyc 
> │   ├── models.py 
> │   ├── models.pyc 
> │   ├── tests.py 
> │   ├── urls.py 
> │   ├── urls.pyc 
> │   ├── views.py 
> │   └── views.pyc 
> └── tango_with_django_project 
> ├── __init__.py 
> ├── __init__.pyc 
> ├── settings.py 
> ├── settings.pyc 
> ├── urls.py 
> ├── urls.pyc 
> ├── wsgi.py 
> └── wsgi.pyc 
>
Hello,

To point the about view to  http://127.0.0.1:8000/about/, in you 
project/urls.py, you should change:
url(r'^about/', include('rango.urls')),  # ADD THIS NEW TUPLE!
to
url(r'^about/',  rango.views.about, name='About page'),
(of course, you have to import rango.views)

With your current configuration, these two links:
http://127.0.0.1:8000/rango/and 
http://127.0.0.1:8000/rango/about/ 

points to the same as:
http://127.0.0.1:8000/about/ and 
http://127.0.0.1:8000/about/about/  

Because you included the same urls for 'rango/' and 'about/'

Yours,
Camilo

-- 
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 this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/809b5684-ce25-469a-bb4b-13571bcc01f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Admin Multiupload Field

2014-03-15 Thread Jonathan Querubina
Camilo,

I can`t use inline (i tryied) because the user has to select file by file, not 
all the same time

On Mar 15, 2014, at 1:58 PM, Camilo Torres  wrote:

> 
> On Saturday, March 15, 2014 11:18:05 AM UTC-4:30, Jonathan Querubina wrote:
> how can i have a Multiupload Field on a Model for the Django Admin? 
> 
> I Found this: https://github.com/TND/django-files-widget 
> Hello,
> 
> I don't fully understand your needs, but may be you can use inlines:
> https://docs.djangoproject.com/en/1.6/ref/contrib/admin/#inlinemodeladmin-objects
> 
> Regards,
> Camilo
> 
> -- 
> 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 this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/4d360c3b-b977-4f6c-b626-1e5bb238a3ea%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/98A9E3A3-A659-4B90-A97F-B9BCBFA8F76D%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Admin Multiupload Field

2014-03-15 Thread Camilo Torres

On Saturday, March 15, 2014 11:18:05 AM UTC-4:30, Jonathan Querubina wrote:
>
> how can i have a Multiupload Field on a Model for the Django Admin? 
>
> I Found this: https://github.com/TND/django-files-widget 
>
Hello,

I don't fully understand your needs, but may be you can use inlines:
https://docs.djangoproject.com/en/1.6/ref/contrib/admin/#inlinemodeladmin-objects

Regards,
Camilo

-- 
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 this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4d360c3b-b977-4f6c-b626-1e5bb238a3ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: database design problem.

2014-03-15 Thread Larry Martell
On Sat, Mar 15, 2014 at 9:38 AM, willy Hakizimana  wrote:
> First of all, this community is amazing at how fast questions are answered.
> I have learned so much.
>
>
> I am designing an app with models that look like this.
>
> Country(country_id(PK), country_name, gdp, gdp_growth, income_per_capita)
>
> Product(product_id(PK), product_name, country_id(FK), imports_volume)
>
> Since I have to show imports_volume for the same product in each country, I
> am stumped on how to design the db.

I'd have a country table, a product table, and a product_country table:

Country(country_id(PK), country_name, gdp, gdp_growth, income_per_capita)
Product(product_id(PK), product_name)
Product_Country(id(PK), product_id(FK), country_id(FK), imports_volume)

-- 
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 this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACwCsY4WPcy6B6PeFY94TbOTF3eN9B2bc4DM8R_LAGe1EyKj7g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django Admin Multiupload Field

2014-03-15 Thread Jonathan Querubina
Hi guys,

Maybe this is a noob question, but how can i have a Multiupload Field on a 
Model for the Django Admin?

I Found this: https://github.com/TND/django-files-widget

And sounds amazing, but i can`t get Pillow installed on my mac (10.9 / Xcode 
5.1)

Any of you have this problem?

There`s an alternative?

Thanks!

-- 
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 this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/66E5D0D6-9CE8-4118-B485-7F60F19B0B05%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


database design problem.

2014-03-15 Thread willy Hakizimana
First of all, this community is amazing at how fast questions are answered. 
I have learned so much.


I am designing an app with models that look like this.

Country(country_id(PK), country_name, gdp, gdp_growth, income_per_capita)

Product(product_id(PK), product_name, country_id(FK), imports_volume)

Since I have to show imports_volume for the same product in each country, I 
am stumped on how to design the db.


 

-- 
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 this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4e0e2e28-2d24-4f1e-9e09-f9c45765baf4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.