Re: WHERE TO PLACE BUSINESS LOGIC IN DJANGOS' MTV

2014-09-08 Thread Derek
There are many more wise heads than me ... so I can only report on what 
many others have said.

"Fat Models, Helper Modules, Thin Views, Stupid Templates" i.e Put more 
logic into anything but views and templates;
Template tags and filters should contain the minimum logic possible 
(http://slidedeck.io/accavdar/DjangoBestPractices)

and a much longer version of this 
here: 
http://programmers.stackexchange.com/questions/250035/where-exactly-should-python-business-logic-be-placed-in-django

In reply to your issues:

1. What has size to do with it?  Split them up into different sub-files if 
you need to keep things short & then "import" them into the models file.

2. Custom managers are essentially fancy "filters" and not business logic - 
keep them short, focused and to-the-point.

3. Yes; if appropriate for your case i.e. you need logic shared across 
multiple places in your app/project (see also the stackexchange answer).

(4) Unit testing is a whole other story.  But there is nothing particularly 
weird or obscure in this approach that could not be tested.

Finally, remember the Zen of Python:

If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.


HTH
Derek

On Sunday, 7 September 2014 09:26:13 UTC+2, Eddilbert Macharia wrote:
>
> Hi All,
>
> I have been to post like this 
> https://groups.google.com/forum/#!topic/django-users/Ykppb4uELJ4 and 
> other places and i'm even more confused than when i started.
>
> Where should the business logic be placed in django, and what should go 
> where in the following suggestions below ?
>
> i'm aware of the following suggestions of placing the business logic:
>
>1.  in the model.py module as custom methods to models to be used in 
>the instances of the model, this i have seen that using the http request 
>and response is a security issue.also placing this business logic here 
>makes this module extreme big.
>2.  custom managers the manager affects the entire database table of 
>the specified model,
>3.  separate module to hold the business logic e.g service.py,
>
>
> What i have seen in complete unity from the posts is that the business 
> logic should not be in the view.py module, as of my understanding its 
> supposed to handle http requests and response and delegating templates to 
> use.also it becomes hard to do unit testing.
>
> Regards,
> Eddilbert Macharia.
>

-- 
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/f7afe39c-e9da-47ce-aeb7-c1bc4a3aca99%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Updating Django project from 1.4 (if not older) to 1.7

2014-09-08 Thread Derek
Maybe a long shot... but if the project was designed to run in a 
virtualenv, then there may be a requirements.txt file which will describe 
what is needed to run it, including the Django version.

On Saturday, 6 September 2014 22:30:35 UTC+2, Abdulla Al-Khenji wrote:
>
> Hello all,
>
> I have been assigned with updating a Django project that was last 
> developed in 2012 to the latest version, fixing bugs, and security issues, 
> and updating deprecated code to match the latest version.
>
> Couple of questions I couldn't answer myself:
>
> 1) How can I check which version this application was built on?
> 2) I don't see a "manage.py" file anywhere, how can get that file? I need 
> it to run the application on a local server at least.
> 3) How do I go about and actually "update" all the deprecated code?
> 4) Would you guys recommend that we start writing it again from scratch?
>
> I have 4 weeks to do that, so time plays a crucial role here..
>
> 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/af0fe0c2-e711-40a5-94a1-6ea9f7bb7453%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: deploying django on heroku

2014-09-08 Thread ngangsia akumbo
i still dont get it bro

On Sunday, September 7, 2014 10:04:51 PM UTC+1, Kevin Ndung'u wrote:
>
> As it says, just run those commands, setting your username and email, to 
> set your git identity (Username and Email address) which is required for 
> commits.
>
> On Saturday, September 6, 2014 1:21:09 PM UTC+3, ngangsia akumbo wrote:
>>
>> i have another error
>>
>> yems python-getting-started # git commit -m "Demo"
>>
>> *** Please tell me who you are.
>>
>> Run
>>
>>   git config --global user.email "y...@example.com"
>>   git config --global user.name "Your Name"
>>
>> to set your account's default identity.
>> Omit --global to set the identity only in this repository.
>>
>> fatal: unable to auto-detect email address (got 'root@yems.(none)')
>>
>>
>> On Friday, September 5, 2014 4:10:59 PM UTC+1, Koed00 wrote:
>>>
>>> Looks like Gunicorn can't find your app module hellodjango.wsgi
>>> Did you make a wsgi.py in your app folder as described in the Heroku 
>>> docs?
>>>
>>> On Friday, September 5, 2014 12:19:25 PM UTC+2, ngangsia akumbo wrote:

 i had a problem trying to deply django on heroku

 yems bphotel # foreman start
 11:13:37 web.1  | started with pid 9269
 11:13:37 web.1  | [2014-09-05 11:13:37 +] [9269] [INFO] Starting 
 gunicorn 19.1.1
 11:13:37 web.1  | [2014-09-05 11:13:37 +] [9269] [INFO] Listening 
 at: http://0.0.0.0:5000 (9269)
 11:13:37 web.1  | [2014-09-05 11:13:37 +] [9269] [INFO] Using 
 worker: sync
 11:13:37 web.1  | [2014-09-05 11:13:37 +] [9276] [INFO] Booting 
 worker with pid: 9276
 11:13:37 web.1  | [2014-09-05 11:13:37 +] [9276] [ERROR] Exception 
 in worker process:
 11:13:37 web.1  | Traceback (most recent call last):
 11:13:37 web.1  |   File 
 "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 507, in 
 spawn_worker
 11:13:37 web.1  | worker.init_process()
 11:13:37 web.1  |   File 
 "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 
 114, in init_process
 11:13:37 web.1  | self.wsgi = self.app.wsgi()
 11:13:37 web.1  |   File 
 "/usr/local/lib/python2.7/dist-packages/gunicorn/app/base.py", line 66, in 
 wsgi
 11:13:37 web.1  | self.callable = self.load()
 11:13:37 web.1  |   File 
 "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 65, 
 in load
 11:13:37 web.1  | return self.load_wsgiapp()
 11:13:37 web.1  |   File 
 "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 52, 
 in load_wsgiapp
 11:13:37 web.1  | return util.import_app(self.app_uri)
 11:13:37 web.1  |   File 
 "/usr/local/lib/python2.7/dist-packages/gunicorn/util.py", line 356, in 
 import_app
 11:13:37 web.1  | __import__(module)
 11:13:37 web.1  | ImportError: No module named hellodjango.wsgi
 11:13:37 web.1  | Traceback (most recent call last):
 11:13:37 web.1  |   File 
 "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 507, in 
 spawn_worker
 11:13:37 web.1  | worker.init_process()
 11:13:37 web.1  |   File 
 "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 
 114, in init_process
 11:13:37 web.1  | self.wsgi = self.app.wsgi()
 11:13:37 web.1  |   File 
 "/usr/local/lib/python2.7/dist-packages/gunicorn/app/base.py", line 66, in 
 wsgi
 11:13:37 web.1  | self.callable = self.load()
 11:13:37 web.1  |   File 
 "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 65, 
 in load
 11:13:37 web.1  | return self.load_wsgiapp()
 11:13:37 web.1  |   File 
 "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 52, 
 in load_wsgiapp
 11:13:37 web.1  | return util.import_app(self.app_uri)
 11:13:37 web.1  |   File 
 "/usr/local/lib/python2.7/dist-packages/gunicorn/util.py", line 356, in 
 import_app
 11:13:37 web.1  | __import__(module)
 11:13:37 web.1  | ImportError: No module named hellodjango.wsgi
 11:13:37 web.1  | [2014-09-05 11:13:37 +] [9276] [INFO] Worker 
 exiting (pid: 9276)
 11:13:37 web.1  | Traceback (most recent call last):
 11:13:37 web.1  |   File "/usr/local/bin/gunicorn", line 11, in 
 11:13:37 web.1  | sys.exit(run())
 11:13:37 web.1  |   File 
 "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 74, 
 in run
 11:13:37 web.1  | WSGIApplication("%(prog)s [OPTIONS] 
 [APP_MODULE]").run()
 11:13:37 web.1  |   File 
 "/usr/local/lib/python2.7/dist-packages/gunicorn/app/base.py", line 185, 
 in 
 run
 11:13:37 web.1  | super(Application, self).run()
 11:13:37 web.1  |   File 
 "/usr/local/lib/python2.7/dist-packages/gunicorn/app/base.py", line 71, in 
 run
 11:13:37 web.1  | Arbiter(self).run()
 11:13:37 web.1 

Python 3 and MySQL

2014-09-08 Thread Collin Anderson
If anyone has any experience using MySQL with Python 3, we're discussing on 
django-development what to officially support.

https://groups.google.com/d/topic/django-developers/n-TI8mBcegE/discussion

-- 
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/57b20ef9-bbc9-4e93-96da-a00d61cc2400%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Does Django detect changes in models Meta ?

2014-09-08 Thread Michael A. Martin
Migrations in 1.7 is the replacement for south. 

> On Sep 2, 2014, at 1:44 PM, Norman Bird  wrote:
> 
> OK, I found out that in order to change the schema of the tables one has to 
> install and run a migration tool. I used south. just install south and check 
> out their website for basic use and you basically run a few commands from the 
> command line and it sees the changes you made and migrate the changes to your 
> tables. I found that it does not work very well on sqlite3 Db, so I converted 
> my DB to MYSQL and did that. 
> 
> Or find another migration tool other than south, but in order to update 
> tables in Django, the easiest way is with a migration tool. And I found this 
> all out via stackoverflow. :-)
> 
> thanks
> 
> 
> 
>> On Fri, Aug 22, 2014 at 11:42 PM, Norman Bird  
>> wrote:
>> how about: python manage.py sql myapp 
>> I just changed my model and I had to runt that in order to build the tables. 
>> 
>> 
>>> On Fri, Aug 22, 2014 at 11:49 AM, Norman Bird  
>>> wrote:
>>> I stand corrected. :-) 
>>> 
>>> 
 On Fri, Aug 22, 2014 at 11:47 AM, Larry Martell  
 wrote:
 On Fri, Aug 22, 2014 at 9:55 AM, Norman Bird  
 wrote:
 > I am new, just completed the tutorials, but from my understanding you run
 > "python manage.py syncdb" and that rebuilds the tables etc.
 
 No, syncdb only create tables that do not exist. It does not alter any
 existing tables.
 
 >
 > On Friday, August 22, 2014 3:32:43 AM UTC-4, termopro wrote:
 >>
 >> Hi there,
 >>
 >> I am using Django 1.7 RC2.
 >> I have created models and have run all the migrations so Django created
 >> tables in database.
 >> Now i decided to change database table names and have added Meta class 
 >> to
 >> models containing table name:
 >>
 >> class SomeModel(models.Model):
 >>...
 >>class Meta:
 >>   db_table = 'newname'
 >>
 >> Now when i run "makemigrations" Django doesn't detect any changes in
 >> models:
 >> "No changes detected in app 'blabla'."
 >> As far as i understand the logic, Django should change table names from
 >> 'appname_somemodel" to "newname".
 >>
 >> Is this an expected behavior or i am missing something?
 
 --
 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/Yj6Guv0ch5k/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/CACwCsY6SXWrzFVthSXGEMGbF2UmVaP1dMiO%2ByDc1W8Qy_28OSQ%40mail.gmail.com.
 For more options, visit https://groups.google.com/d/optout.
>>> 
>>> 
>>> 
>>> -- 
>>> Thank You,
>>> 
>>> Norman Bird
>>> Principal Web Development Consultant
>>> DatabaseInDays.com
>>> (703) 986-7157
>> 
>> 
>> 
>> -- 
>> Thank You,
>> 
>> Norman Bird
>> Principal Web Development Consultant
>> DatabaseInDays.com
>> (703) 986-7157
> 
> 
> 
> -- 
> Thank You,
> 
> Norman Bird
> Principal Web Development Consultant
> DatabaseInDays.com
> (703) 986-7157
> -- 
> 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/CAH_r61gA2tDtjhETuA4nN5AvzQOVah5Ygu4r5Z_8hV4_4m2k6g%40mail.gmail.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/5B54766A-F489-4ADF-81F3-482C8036DF2F%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Does Django detect changes in models Meta ?

2014-09-08 Thread Michael A. Martin
Maybe Migrations is just really buggy? I am using PostgreSQL as the backend. I 
added a column with a default value and then did makemigrations then migrate. 
It doesn't work. I get a very long error.

> On Sep 7, 2014, at 8:54 AM, Malik Rumi  wrote:
> 
> Django 1.7rc2 here. Same question, same hope for an answer. It may be that 
> not all possible changes to a model are intended to be picked up. For 
> example, I created all my models directly in 1.7rc2, and I have not changed 
> any fields. What I have done is changed / added some meta and methods. Maybe 
> these changes don't 'count'? 
> 
>> Your models will be scanned and compared to the versions currently contained 
>> in your migration files, and then a new set of migrations will be written 
>> out. Make sure to read the output to see what makemigrations thinks you have 
>> changed - it’s not perfect, and for complex changes it might not be 
>> detecting what you expect.
> 
> and
> 
>> Migrations are Django’s way of propagating changes you make to your models 
>> (adding a field, deleting a model, etc.)
> 
>  So it might be that unless you change something that actually hits the 
> database, there won't be anything to migrate, and that makes sense, but it 
> would be nice if someone with expertise, experience, and inside knowledge 
> could confirm and explain that. 
> 
>> On Tuesday, September 2, 2014 3:16:45 PM UTC-5, David Los wrote:
>> Very, very good question. I am experiencing the same issues with Django 
>> 1.7rc2 and 1.7rc3.
>> 
>> Syncdb and sql statements are intended for Django < 1.7.
>> 
>> Would love to hear a solution!
>> 
>> Op vrijdag 22 augustus 2014 09:32:43 UTC+2 schreef termopro:
>>> 
>>> Hi there,
>>> 
>>> I am using Django 1.7 RC2.
>>> I have created models and have run all the migrations so Django created 
>>> tables in database.
>>> Now i decided to change database table names and have added Meta class to 
>>> models containing table name:
>>> 
>>> class SomeModel(models.Model):
>>>...
>>>class Meta:
>>>   db_table = 'newname'
>>> 
>>> Now when i run "makemigrations" Django doesn't detect any changes in models:
>>> "No changes detected in app 'blabla'."
>>> As far as i understand the logic, Django should change table names from 
>>> 'appname_somemodel" to "newname".
>>> 
>>> Is this an expected behavior or i am missing something?
> 
> -- 
> 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/c618d499-a1a0-4cbc-953c-0e14bb8f9d59%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/5D1B3515-04E8-46FD-823B-32B64E1B4124%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django admin list sort error

2014-09-08 Thread Derek
Colin

Good suggestion, but I already have a stack of "extra" fields like this
(for special needs e.g. calculated  or reformatted fields).  However, doing
this for normal fields that Should Just Work seems like a real hack.
 Surely the answer is that the underlying SQL is not being generated
properly?

Derek



On 5 September 2014 19:26, Collin Anderson  wrote:

> It guess it's pretty complicated, but it's possible to specify it kind of
> like this:
>
> class MyAdmin(admin.ModelAdmin):
> fields = ['name', 'theplace']
>
> def theplace(self, obj):
> return obj.place.name
> theplace.admin_order_field = ['place__name']
>
>  --
> 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/wotonl4i01U/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/74dba43b-9462-4bbe-96a6-7672ddd3fbd6%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/CAF1Wu3MMOeNg%2BXCVjDBAOi8-eVd9G92BGb5yB5G5g_QMBwxv6w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Suggestions about building new ecommerce website

2014-09-08 Thread Shreyans Jain


I want some suggestions on building a big eCommerce website . I 
have a good experience of making website in asp.net ,asp.net Ajax and 
sql server 2008 . Now I am thinking about moving from Microsoft (because of 
cost) . Please
help me choose between php(plain),php with mvc framework,django (not 
rails because of steep learning curve and updating the website after the
host has updated the version).I have no experience on any of the above 
three.

and I will develop alone and I want to cost to be on lower side and site 
should be fast and scalable too.
Any help would be useful

-- 
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/f141c8f6-a8ce-4847-b6a4-432575b9a583%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Does Django detect changes in models Meta ?

2014-09-08 Thread Malik Rumi
>>Maybe Migrations is just really buggy? I am using PostgreSQL as the
backend. I added a column with a default value and then did makemigrations
then migrate. It doesn't work. I get a very long error<<

h.. I hope not. I'm using Postgres too. Looks like I'll have to add
a new field to my models tonight when I get off work from the day job. I'll
let you know what happens.

On Mon, Sep 8, 2014 at 9:38 AM, Michael A. Martin 
wrote:

> Maybe Migrations is just really buggy? I am using PostgreSQL as the
> backend. I added a column with a default value and then did makemigrations
> then migrate. It doesn't work. I get a very long error.
>
> On Sep 7, 2014, at 8:54 AM, Malik Rumi  wrote:
>
> Django 1.7rc2 here. Same question, same hope for an answer. It may be that
> not all possible changes to a model are intended to be picked up. For
> example, I created all my models directly in 1.7rc2, and I have not changed
> any fields. What I have done is changed / added some meta and methods.
> Maybe these changes don't 'count'?
>
> Your models will be scanned and compared to the versions currently
>> contained in your migration files, and then a new set of migrations will be
>> written out. Make sure to read the output to see what makemigrations thinks
>> you have changed - it’s not perfect, and for complex changes it might not
>> be detecting what you expect.
>
>
> and
>
> Migrations are Django’s way of propagating changes you make to your models
>> (*adding a field, deleting a model,* etc.)
>
>
>  So it might be that unless you change something that actually hits the
> database, there won't be anything to migrate, and that makes sense, but it
> would be nice if someone with expertise, experience, and inside knowledge
> could confirm and explain that.
>
> On Tuesday, September 2, 2014 3:16:45 PM UTC-5, David Los wrote:
>>
>> Very, very good question. I am experiencing the same issues with Django
>> 1.7rc2 and 1.7rc3.
>>
>> Syncdb and sql statements are intended for Django < 1.7.
>>
>> Would love to hear a solution!
>>
>> Op vrijdag 22 augustus 2014 09:32:43 UTC+2 schreef termopro:
>>>
>>> Hi there,
>>>
>>> I am using Django 1.7 RC2.
>>> I have created models and have run all the migrations so Django created
>>> tables in database.
>>> Now i decided to change database table names and have added Meta class
>>> to models containing table name:
>>>
>>> class SomeModel(models.Model):
>>>...
>>>class Meta:
>>>   db_table = 'newname'
>>>
>>> Now when i run "makemigrations" Django doesn't detect any changes in
>>> models:
>>> "No changes detected in app 'blabla'."
>>> As far as i understand the logic, Django should change table names from
>>> 'appname_somemodel" to "newname".
>>>
>>> Is this an expected behavior or i am missing something?
>>>
>>  --
> 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/c618d499-a1a0-4cbc-953c-0e14bb8f9d59%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>  --
> 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/Yj6Guv0ch5k/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/5D1B3515-04E8-46FD-823B-32B64E1B4124%40gmail.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/CAKd6oBz6K89a6_4_%3DkvUeMcaTqNNwetqEbKdroRz41pak8maKg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Suggestions about building new ecommerce website

2014-09-08 Thread Charly Román
If you ask in a django users list you might have answers recommending
Django.


2014-09-08 8:16 GMT-05:00 Shreyans Jain :

> I want some suggestions on building a big eCommerce website . I
> have a good experience of making website in asp.net ,asp.net Ajax and
> sql server 2008 . Now I am thinking about moving from Microsoft (because
> of cost) . Please
> help me choose between php(plain),php with mvc framework,django (not
> rails because of steep learning curve and updating the website after the
> host has updated the version).I have no experience on any of the above
> three.
>
> and I will develop alone and I want to cost to be on lower side and site
> should be fast and scalable too.
> Any help would be useful
>
> --
> 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/f141c8f6-a8ce-4847-b6a4-432575b9a583%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Charly Román
Software Developer
http://croman.mx

-- 
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/CABeWMUZEy%3DK-ML_n731aLtM7%2Bts4S0Ud7wjufS_nRFmV7oEy2w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Simple task. Get request.META values listed on a page via template

2014-09-08 Thread Артём Мутерко
I need to list all values from request.META in Django using template.

I've done it without template like this
(code from my views.py)

def display_meta(request):
  values = request.META.items()
  values.sort()
  html = []
  for k, v in values: 
  html.append(‘%s%s’ % (k, v))
  return HttpResponse(‘%s’ % ‘\n’.join(html))

For example I have template 'values.html', how can I do the same as above 
but using template and not hardcoding html in views.py?

-- 
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/4673f20b-aa76-4012-882b-fa370299ba1a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Suggestions about building new ecommerce website

2014-09-08 Thread Sithembewena Lloyd Dube
As you are a one-man team and would like to minimise time to market and
cost, I highly recommend Django. Fantastic community, fairly straight
forward to learn framework. Rails has more magic than I find useful when
learning and Django's admin rocks.

On Mon, Sep 8, 2014 at 6:04 PM, Charly Román  wrote:

> If you ask in a django users list you might have answers recommending
> Django.
>
>
> 2014-09-08 8:16 GMT-05:00 Shreyans Jain :
>
> I want some suggestions on building a big eCommerce website . I
>> have a good experience of making website in asp.net ,asp.net Ajax and
>> sql server 2008 . Now I am thinking about moving from Microsoft (because
>> of cost) . Please
>> help me choose between php(plain),php with mvc framework,django (not
>> rails because of steep learning curve and updating the website after the
>> host has updated the version).I have no experience on any of the above
>> three.
>>
>> and I will develop alone and I want to cost to be on lower side and site
>> should be fast and scalable too.
>> Any help would be useful
>>
>> --
>> 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/f141c8f6-a8ce-4847-b6a4-432575b9a583%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Charly Román
> Software Developer
> http://croman.mx
>
> --
> 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/CABeWMUZEy%3DK-ML_n731aLtM7%2Bts4S0Ud7wjufS_nRFmV7oEy2w%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Regards,
Sithu Lloyd Dube

-- 
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/CAH-SnCAXyC0%3D2RjQ6mx__4TYe_JzxUM9Wi8SYu6mM5w_coF4jg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


settings.py

2014-09-08 Thread ngangsia akumbo
when i run the 
django-admin.py startproject this is the settings file i have

"""
Django settings for bphotel project.

For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'j-3!deoj%m-m_po8o3$zv8-qgkn1$j)!c!*s#)wdb!t95_39lo'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

TEMPLATE_DEBUG = True

ALLOWED_HOSTS = []


# Application definition

INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',

MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
)

ROOT_URLCONF = 'bphotel.urls'

WSGI_APPLICATION = 'bphotel.wsgi.application'


# Database
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}

# Internationalization
# https://docs.djangoproject.com/en/1.7/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.7/howto/static-files/

STATIC_URL = '/static/'


Please i need some help here dont understand what is going on

-- 
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/d2c848fe-12df-46ca-85d5-8df5c25d0320%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: settings.py

2014-09-08 Thread Andrew Pinkham
Hi Ngangsia,

On Sep 8, 2014, at 12:16 PM, ngangsia akumbo  wrote:
> when i run the 
> django-admin.py startproject this is the settings file i have

I've glanced through the file. It looks fine to me, but I may have missed 
something.

> Please i need some help here dont understand what is going on

Are you following the tutorial? Are you experiencing a problem in particular? 
We need a little bit more information before we can help you.

Andrew

-- 
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/92EAC67F-B01D-4869-9BDC-0DDCA281A752%40andrewsforge.com.
For more options, visit https://groups.google.com/d/optout.


Re: settings.py

2014-09-08 Thread ngangsia akumbo
i am trying to host build an app to host it on heroku

On Monday, September 8, 2014 6:21:49 PM UTC+1, Andrew Pinkham wrote:
>
> Hi Ngangsia, 
>
> On Sep 8, 2014, at 12:16 PM, ngangsia akumbo  > wrote: 
> > when i run the 
> > django-admin.py startproject this is the settings file i have 
>
> I've glanced through the file. It looks fine to me, but I may have missed 
> something. 
>
> > Please i need some help here dont understand what is going on 
>
> Are you following the tutorial? Are you experiencing a problem in 
> particular? We need a little bit more information before we can help you. 
>
> Andrew 
>
>

-- 
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/0ea822ab-37b8-43bd-b020-a2e216cb2c9b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django-jython: I am getting an error when I run the migrate command on Jython-Django 1.7

2014-09-08 Thread Michael Martin
I ran sqlmigrate because I understand that it creates the sql calls which
are to be ran against the database via the database connecter.   I am not a
DBA, but my first opinion is that the sql calls don't look right to me.
Anybody out there know SQL for Postgresql really well?

C:\Users\mike\workspace\lwc>jython manage.py sqlmigrate joins 0002_join_ref_
idBEGIN;ALTER TABLE `joins_join` ADD COLUMN `ref_id` varchar(120)
DEFAULT "ABC" NOT NULL;ALTER TABLE `joins_join` ALTER COLUMN `ref_id`
DROP DEFAULT;
COMMIT;


On Sun, Sep 7, 2014 at 11:51 PM, Pitchblack  wrote:

> I hoping that you can help me out. I currently have Django1.7 running on
> windows7/Java7/Jython2.7/Postgresql9.3/postgresql-9.3-1102.jdbc41/django_jython-1.7.0b2-py2.7.
> egg
>
>  I learned today that on Django 1.7 has makemigrations and migrate
> commands built in. But even so when I try to apply those commands in that
> order I am getting some sort of error. How can I resolve this error?
>
> For more information on django migrations. Django 1.7 Migrations
> 
>
> For more details about django on jython and the database settings. postgresql
> on jython-django
> 
> After creating a project in Django and setting it all up and have
> everything running, I began to start creating models.
>
>
> What steps will reproduce the problem?
> 1. I first created a model in django with some fields
>
> from django.db import models
>
> # Create your models here.
> class Join(models.Model):
>  email = models.EmailField(unique=True)
>  ip_address = models.CharField(max_length=
> 120, default="ABC")
>  #auto_now means when it was added, auto_now means when it is updated
>  timestamp = models.DateTimeField(auto_now_add = True,
> auto_now=False)
>  updated = models.DateTimeField(auto_now_add = False, auto_now=True)
>
>  def __unicode__(self):
>  return "%s" %(self.email)
>
>
> 2. I then run jython manage.py makemigrations joins
> 3. I then run jython manage.py migrate joins
> 4. Tables are created in database
> 5. I forgot to add a field using modeling, so I add it see ref_id below
>
> from django.db import models
>
> # Create your models here.
> class Join(models.Model):
>  email = models.EmailField(unique=True)
>  ref_id = models.CharField(max_length=120, null=True)
>  ip_address = models.CharField(max_length=120, default="ABC")
>  #auto_now means when it was added, auto_now means when it is updated
>  timestamp = models.DateTimeField(auto_now_add = True,
> auto_now=False)
>  updated = models.DateTimeField(auto_now_add = False, auto_now=True)
>
>  def __unicode__(self):
>  return "%s" %(self.email)
>
>
> 6. I then run jython manage.py makemigrations joins
> 7. I then run jython manage.py migrate joins
>
>
>
>
>
> What is the expected output?
> I was expecting the new field to produce a new column for the existing
> table and the column to have default values of "ABC".
>
>
> What do you see instead?
> It errors out badly.
>
>
> File "C:\jython2.7b2\Lib\site-packages\django_jython-1.7.0b2-py2.7.egg\doj\db\
>
> backends\__init__.py", line 180, in execute
>  self.cursor.execute(sql, params)
> django.db.utils.Error: ERROR: could not determine data type of parameter
> $1
> [SQL
> Code: 0], [SQLState: 42P18]
>
> I have attached the entire error in a file to this post.
>
>
> What version of the product are you using? On what operating system?
> I currently have Django1.7c3 running on windows7, Java7, Jython2.7b2,
> Postgresql 9.3, postgresql-9.3-1102.jdbc41, and the
> django_jython-1.7.0b2-py2.7.egg
>
>
>  --
> 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/db7a8702-ae47-4bb9-a58d-474c3efb8b19%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/CAD0urK1%2B87BqB1zbM5inGwONVQfzdy4FPAUTUeZ9QqzmJOqvOg%40mail.gmail.com.
For more options, visit https://groups.go

Query parameters in the URL, with REST Framework

2014-09-08 Thread Elio Gerson Clímaco Herrera
Hi, everybody.

I, stared using *REST Framework*  
few days ago, but I, can't find how create a customized url with parameter, 
in Django this kind of url is written like this.

url(r'^author/(?P\d+)/books/$', BooksList.as_view(), name = 
'books'),

for this 

*http://mysite/author/1/books*

I, try with:
router.register(r'author/(?P\d+)/books', BooksList, base_name = 
'Books')
but this don't work.

*Here is my code.*

# models.py
class Author(models.Model):
Name = models.CharField(max_length = 50)

class Book(models.Model):
Book = models.ForeignKey(Author)
Title = models.CharField(max_length = 200)

def __unicode__(self):
return self.Title


# views.py
class BooksList(viewsets.ModelViewSet):
model = Book
serializer_class = BookSerializer
def get_queryset(self):
author = self.kwargs['author']
queryset = Book.objects.filter(Author = author)
return queryset

# urls.py
router = routers.DefaultRouter()
router.register(r'books', BooksList, base_name = 'Books')

admin.autodiscover()

urlpatterns = patterns('',
url(r'^api/', include('rest_framework.urls', namespace = 'rest_framework')),
)

-- 
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/f2eb0566-b38c-44f4-8814-f93710d03cec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Suggestions about building new ecommerce website

2014-09-08 Thread Collin Anderson
If you're looking for reusable apps to help you out there's two ecommerce 
ones:

satchmo: https://bitbucket.org/chris1610/satchmo/wiki/Home

oscar: http://tangentlabs.github.io/django-oscar/

-- 
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/445c8198-c658-4d21-bef1-a779d4f5cbff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Suggestions about building new ecommerce website

2014-09-08 Thread Ezequiel Bertti
Another one

LFS: http://www.getlfs.com/

On Mon, Sep 8, 2014 at 5:03 PM, Collin Anderson 
wrote:

> If you're looking for reusable apps to help you out there's two ecommerce
> ones:
>
> satchmo: https://bitbucket.org/chris1610/satchmo/wiki/Home
>
> oscar: http://tangentlabs.github.io/django-oscar/
>
> --
> 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/445c8198-c658-4d21-bef1-a779d4f5cbff%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Ezequiel Bertti
E-Mail: eber...@gmail.com
Cel: (21) 99188-4860

-- 
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/CACrQMYoU9jDrezD6R8jMyqbqS5xWWrBb9sfbuA%3D%2BDedCnhWzxQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Suggestions about building new ecommerce website

2014-09-08 Thread Luca Corti


https://www.djangopackages.com/grids/g/ecommerce/

Il 2014-09-08 15:16 Shreyans Jain ha scritto:

I want some suggestions on building a big eCommerce website . I
have a good experience of making website in asp.net [1] ,asp.net [1]
Ajax and
sql server 2008 . Now I am thinking about moving from Microsoft
(because of cost) . Please
 help me choose between php(plain),php with mvc framework,django (not
rails because of steep learning curve and updating the website after
the
 host has updated the version).I have no experience on any of the
above
three.

and I will develop alone and I want to cost to be on lower side and
site should be fast and scalable too.
Any help would be useful

 --
 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 [2].
 To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/f141c8f6-a8ce-4847-b6a4-432575b9a583%40googlegroups.com
[3].
 For more options, visit https://groups.google.com/d/optout [4].


Links:
--
[1] http://asp.net
[2] http://groups.google.com/group/django-users
[3]
https://groups.google.com/d/msgid/django-users/f141c8f6-a8ce-4847-b6a4-432575b9a583%40googlegroups.com?utm_medium=email&utm_source=footer
[4] 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/4c4684c22563bac43975064ae55b3b56%40mail.fantacast.it.
For more options, visit https://groups.google.com/d/optout.


Newbie question about Django and Python versions.

2014-09-08 Thread Andrey Consalter
Hi there,

I've been studying programming with Python 2.7 and Django 1.6, and a few 
days ago Django 1.7 was release and with it, the new tutorial that I had 
just started.
What you guys would recommend? Keep working with my current environment or 
update it?
How this updates work? How "deep" are they?
Would a project/app wrote with previous versions still work with the new 
ones?

Thanks in advance!

-- 
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/19246110-90bf-449a-934e-d55b4f41df6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Newbie question about Django and Python versions.

2014-09-08 Thread Michael A. Martin
Is anyone else trying out 1.7? I do a jython manage.py runserver 8080 and then 
it seems to want to render but isn't. 

> On Sep 8, 2014, at 1:30 PM, Andrey Consalter  wrote:
> 
> Hi there,
> 
> I've been studying programming with Python 2.7 and Django 1.6, and a few days 
> ago Django 1.7 was release and with it, the new tutorial that I had just 
> started.
> What you guys would recommend? Keep working with my current environment or 
> update it?
> How this updates work? How "deep" are they?
> Would a project/app wrote with previous versions still work with the new ones?
> 
> Thanks in advance!
> -- 
> 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/19246110-90bf-449a-934e-d55b4f41df6d%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/13628B3C-F3CD-40DC-9E6B-D117473EA1BE%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django migrations directly import custom fields?

2014-09-08 Thread Greg
Hi all,

I'm moving over to the new migrations, and I've noticed whenever I
create a migration involving a custom model field, it imports that field
at the top of the migration. The south docs were always quite firm about
not doing this sort of thing, in case the code changed in the future. Is
this a design decision, i.e. we now expected to make sure imports in our
migration files always work in the future? What are the reasons for
this? I can imagine this causing issues when refactoring old code for
example.

If this is more a question for django-developers, let me know and I'll
post it there.

Thanks,
Greg



-- 
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/5636e5d3-53e8-46c5-b26b-ca52be11173c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Newbie question about Django and Python versions.

2014-09-08 Thread Russell Keith-Magee
Hi Andrey,

On Tue, Sep 9, 2014 at 4:30 AM, Andrey Consalter 
wrote:

> Hi there,
>
> I've been studying programming with Python 2.7 and Django 1.6, and a few
> days ago Django 1.7 was release and with it, the new tutorial that I had
> just started.
> What you guys would recommend? Keep working with my current environment or
> update it?
>

If you're just starting out - still at the stage of running the tutorial,
then you won't lose much by starting again - but you also won't lose much
by finishing the tutorial on the version you started with. 1.7 introduced a
couple of small changes to the tutorial, so if you ran the tutorial a
second time (this time with 1.7), you'd probably spot a couple of minor
changes in the commands you need to issue; but the code itself will be
almost exactly the same.


> How this updates work? How "deep" are they?
>

1.7 is a fairly big release, but if you're at the tutorial stage, you
should be able to just update Django without too much difficulty.


> Would a project/app wrote with previous versions still work with the new
> ones?
>

Broadly speaking, yes - Django has a very strong backwards compatibility
policy, so code written for one version will generally work with the next
version. If something is introduced that isn't backwards compatible, we
introduce it softly over a couple of releases, and your code will spit out
lots of warnings telling you what needs to be updated.

Yours,
Russ Magee %-)

-- 
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/CAJxq848cK_3BscLLjWRKnQjLQRAVdTQ1ALqYSrKFCSs-kndCnA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Has anyone had issues with the server in 1.7 running dog slow or not at all?

2014-09-08 Thread Michael A. Martin
Has anyone had issues with the server in 1.7 running dog slow or not at all? I 
was using a beta version of 1.7 and the server ran on top of jython with no 
issue. The only thing that was failing was migrations. Now I  do a jython 
manage.py runserver 8080 and the browser seems to not want to render my old 
apps. Any suggestions?

-- 
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/E0F1B89D-1BC7-4430-80C4-A5E5F1EFD610%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Newbie question about Django and Python versions.

2014-09-08 Thread Andrey Consalter
Thanks Russ, that clarifies a lot! Nice to see guys like you helping newcomers!

-- 
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/0dcca997-adbd-4dab-b759-ae14e796d13c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.