can't create django project using Windows command prompt!

2016-10-05 Thread Garin morel
I would like to start web designing using django! but Whenever i type "
django-admin.py startproject mySite" in cmd this code popup through 
notepad, Then what should I do?

#!c:\users\crepin\envs\myproject\scripts\python.exe
from django.core import management

if __name__ == "__main__":
management.execute_from_command_line()




-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/cbd1eff0-1332-42cb-ad1e-3d86f18610cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: can't create django project using Windows command prompt!

2016-10-05 Thread Andreas Kuhne
Hi,

First make sure that you have  a valid virtual environment - it's the
easiest way to run python code. When that is working, you can just write :
"python django-admin.py startproject mySite" - your problem is that .py
files have been associated with notepad ++, and therefore it opens the file
to edit. But by adding python before, you will run the code instead.

Regards,

Andréas

2016-10-05 10:42 GMT+02:00 Garin morel :

> I would like to start web designing using django! but Whenever i type "
> django-admin.py startproject mySite" in cmd this code popup through
> notepad, Then what should I do?
>
> #!c:\users\crepin\envs\myproject\scripts\python.exe
> from django.core import management
>
> if __name__ == "__main__":
> management.execute_from_command_line()
>
>
> 
>
>
> --
> 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 https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/cbd1eff0-1332-42cb-ad1e-3d86f18610cf%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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALXYUb%3D5sf9rPxPMYBnvDWAhoAyUd3c0F2Tzq%2BjkfzzGsDmRJA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Add rows in migrations?

2016-10-05 Thread Mario R. Osorio
You can do that with fixtures:

https://docs.djangoproject.com/en/1.10/howto/initial-data/



On Tuesday, October 4, 2016 at 7:21:07 PM UTC-4, Victor Porton wrote:
>
> After generating DB scheme, I need to add two rows with certain data to 
> certain table.
>
> How to do it?
>
> Can it be handled with migrations?
>
> A complication is that these two rows contain strings dependent on the 
> user's language.
>
> Can this be done?
>

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5db3f602-f0b7-444c-82ee-4a51659dbfb3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django-quiz modification

2016-10-05 Thread Yew Tze Ee
Hi Tom,

May I know do I need to start my own project?

How to do python manage.py runserver?

On Tuesday, 15 July 2014 04:23:50 UTC+8, Tom Walker wrote:
>
> Hi Orchid,
>
> I am the author of the quiz app that has been recently updated - check it 
> out: https://github.com/tomwalker/django_quiz
>
> It should be a lot easier for you to work with now.
>
> Why dont you add it on as a feature request and I will try to get it added 
> soon.
>
> If you have a solution already, I would be interested to see what you came 
> up with.
>
> All the best,
>
> Tom
>
>
>
> On Monday, 10 March 2014 06:04:35 UTC, orchid barua wrote:
>>
>> I want to modify the django-quiz application.
>> https://github.com/tomwalker/django_quiz
>>
>> The quesiton will be a multiple true false type. Each question will have 
>> 5 stem, each will be tested for true/false. Each will carry partial marks 
>> eg. 1 will be awarded for a correct ans. And there will be a system for 
>> penalty eg. deduct 0.5 marks for a wrong answer of a stem. 
>>
>> I am modifying the model like this:
>>
>> *Question model:*
>> class Question(models.Model):
>>
>> quiz = models.ManyToManyField(Quiz, blank=True, )
>> 
>> category = models.ForeignKey(Category, blank=True, null=True, )
>> 
>> content = models.CharField(max_length=1000, 
>>blank=False, 
>>help_text="Enter the question text that 
>> you want displayed",
>>verbose_name='Question',
>>)
>> 
>> explanation = models.TextField(max_length=2000,
>>blank=True,
>>help_text="Explanation to be shown 
>> after the question has been answered.",
>>verbose_name='Explanation',
>>)
>> 
>>
>> class Answer(models.Model):
>> question = models.ForeignKey(Question)
>> 
>> content = models.CharField(max_length=1000, 
>>blank=False, 
>>help_text="Enter the answer text that you 
>> want displayed",
>>)
>> 
>> correct = models.BooleanField(blank=False, 
>>   default=False,
>>   help_text="Is this a correct answer?"
>>   )
>> incorrect = models.BooleanField(blank = False, default =False, 
>> help_text = "is this incorrect ?")
>>
>> The original quiz model is here:
>> https://github.com/tomwalker/django_quiz/blob/master/quiz/models.py
>>
>> How can I modify the view and models to achieve my functionality? Can you 
>> please atleast suggest an algorithm for the process?
>>
>

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6e748c88-a5bf-4901-9b13-60fa9e0d8691%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django-quiz modification

2016-10-05 Thread Yew Tze Ee
yewtzeee@yewtzeee-VirtualBox:~/django-project/quiz_app/django_quiz$ python 
setup.py install
running install
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

[Errno 13] Permission denied: 
'/usr/local/lib/python2.7/dist-packages/test-easy-install-32250.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

/usr/local/lib/python2.7/dist-packages/

I get this error when running python setup.py

On Tuesday, 15 July 2014 04:23:50 UTC+8, Tom Walker wrote:
>
> Hi Orchid,
>
> I am the author of the quiz app that has been recently updated - check it 
> out: https://github.com/tomwalker/django_quiz
>
> It should be a lot easier for you to work with now.
>
> Why dont you add it on as a feature request and I will try to get it added 
> soon.
>
> If you have a solution already, I would be interested to see what you came 
> up with.
>
> All the best,
>
> Tom
>
>
>
> On Monday, 10 March 2014 06:04:35 UTC, orchid barua wrote:
>>
>> I want to modify the django-quiz application.
>> https://github.com/tomwalker/django_quiz
>>
>> The quesiton will be a multiple true false type. Each question will have 
>> 5 stem, each will be tested for true/false. Each will carry partial marks 
>> eg. 1 will be awarded for a correct ans. And there will be a system for 
>> penalty eg. deduct 0.5 marks for a wrong answer of a stem. 
>>
>> I am modifying the model like this:
>>
>> *Question model:*
>> class Question(models.Model):
>>
>> quiz = models.ManyToManyField(Quiz, blank=True, )
>> 
>> category = models.ForeignKey(Category, blank=True, null=True, )
>> 
>> content = models.CharField(max_length=1000, 
>>blank=False, 
>>help_text="Enter the question text that 
>> you want displayed",
>>verbose_name='Question',
>>)
>> 
>> explanation = models.TextField(max_length=2000,
>>blank=True,
>>help_text="Explanation to be shown 
>> after the question has been answered.",
>>verbose_name='Explanation',
>>)
>> 
>>
>> class Answer(models.Model):
>> question = models.ForeignKey(Question)
>> 
>> content = models.CharField(max_length=1000, 
>>blank=False, 
>>help_text="Enter the answer text that you 
>> want displayed",
>>)
>> 
>> correct = models.BooleanField(blank=False, 
>>   default=False,
>>   help_text="Is this a correct answer?"
>>   )
>> incorrect = models.BooleanField(blank = False, default =False, 
>> help_text = "is this incorrect ?")
>>
>> The original quiz model is here:
>> https://github.com/tomwalker/django_quiz/blob/master/quiz/models.py
>>
>> How can I modify the view and models to achieve my functionality? Can you 
>> please atleast suggest an algorithm for the process?
>>
>

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/42e81a91-5a85-4f4c-a332-5debe5423c55%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Python Django on Hostica server

2016-10-05 Thread Andris Diržininkas
Hi there

Actually I have very basic knowlage about web programming but I'm working 
with a web programmer who does it on Python Django. I asked him to put the 
almost finished site on my hostica server and he wanted to know - do they 
host Python Django and how do they do this? Maybe someone can give me a 
precise information about this, so I can send it further to my web 
programmer and he puts the working page on hostica, actually he should be 
asking this question, not me. I have subscribet for Hostica plan Simple 
2016.

Thank you

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7a4f663f-68f5-4446-8188-8406f3a201c5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django-quiz modification

2016-10-05 Thread Yew Tze Ee
How to runserver? like python manage.py runserver

On Monday, 10 March 2014 14:04:35 UTC+8, orchid barua wrote:
>
> I want to modify the django-quiz application.
> https://github.com/tomwalker/django_quiz
>
> The quesiton will be a multiple true false type. Each question will have 5 
> stem, each will be tested for true/false. Each will carry partial marks eg. 
> 1 will be awarded for a correct ans. And there will be a system for penalty 
> eg. deduct 0.5 marks for a wrong answer of a stem. 
>
> I am modifying the model like this:
>
> *Question model:*
> class Question(models.Model):
>
> quiz = models.ManyToManyField(Quiz, blank=True, )
> 
> category = models.ForeignKey(Category, blank=True, null=True, )
> 
> content = models.CharField(max_length=1000, 
>blank=False, 
>help_text="Enter the question text that you 
> want displayed",
>verbose_name='Question',
>)
> 
> explanation = models.TextField(max_length=2000,
>blank=True,
>help_text="Explanation to be shown 
> after the question has been answered.",
>verbose_name='Explanation',
>)
> 
>
> class Answer(models.Model):
> question = models.ForeignKey(Question)
> 
> content = models.CharField(max_length=1000, 
>blank=False, 
>help_text="Enter the answer text that you 
> want displayed",
>)
> 
> correct = models.BooleanField(blank=False, 
>   default=False,
>   help_text="Is this a correct answer?"
>   )
> incorrect = models.BooleanField(blank = False, default =False, 
> help_text = "is this incorrect ?")
>
> The original quiz model is here:
> https://github.com/tomwalker/django_quiz/blob/master/quiz/models.py
>
> How can I modify the view and models to achieve my functionality? Can you 
> please atleast suggest an algorithm for the process?
>

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/cbe8dace-ea84-4cda-854f-8c1a0c4e853f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Python Django on Hostica server

2016-10-05 Thread ludovic coues
>From what I have read of hostica, they only offer to host website
written in PHP.

2016-10-05 15:21 GMT+02:00 Andris Diržininkas :
> Hi there
>
> Actually I have very basic knowlage about web programming but I'm working
> with a web programmer who does it on Python Django. I asked him to put the
> almost finished site on my hostica server and he wanted to know - do they
> host Python Django and how do they do this? Maybe someone can give me a
> precise information about this, so I can send it further to my web
> programmer and he puts the working page on hostica, actually he should be
> asking this question, not me. I have subscribet for Hostica plan Simple
> 2016.
>
> Thank you
>
> --
> 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 https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/7a4f663f-68f5-4446-8188-8406f3a201c5%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 

Cordialement, Coues Ludovic
+336 148 743 42

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEuG%2BTbcdogRx2F5tJn7KKBYk4zdbB4jy0YD53690zEfGGi-4Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Urgent Need: Strong Python/Django Developer needed immediately

2016-10-05 Thread Sunil Kumar


*Duration: Long term (3 years)*

*Interview: Telephonic and then in-person (Sorry, we don’t pay for 
airfare/travel reimbursement for interview or any relocation expenses, if 
selected)*

*Location: Bethesda, MD*

*Rate: Open – Commensurate with experience.  *

*Visa Requirements: GC and Citizens only*

 

 

The incumbent is a middle to senior software developer with deep technical 
understanding of the development framework, the underlying language, 
platform, and related technologies.  They are specifically charged with 
assisting Client OCCS transition 50 software projects from the Coldfusion 
Server Technology to the Django/Python Framework. Duties include: 

- Advising developers in the best approach to migrating their 
existing projects into the new framework

- Mentoring developers in adapting to ORM and converting existing 
Database Schema into Model-oriented schemas

- Training developers on the Python/Django framework

- Training/Advocating a Test-driven approach to software development

- Advising Systems Support staff on how best to support the new 
application framework in the client systems infrastructure

- Researching and Prototyping solutions to challenges posed by the 
Client systems infrastructure

- Researching and Recommending approaches to republish APIs on the 
Django/Python platform

- Developing and Evangelizing best practices among developers.

 

The incumbent:

- Has 5 years of Django/Python Development Experience with 10-15 
years Software Development/IT Development Experience

- Demonstrates a full understanding of Human Factors, Usability, 
and Accessibility (especially Section 508)

- Implements software solutions using modern techniques and 
toolsets including the use of Git, Continuous Integration Systems (Bamboo, 
JIRA, Stash)

- Follows Agile processes and methodologies

- Demonstrates the Ability to perform data modelling and data 
manipulation using SQL on Oracle, MySQL, and PostgreSQL

- Demonstrates ability to work with Frontend technologies: HTML5, 
CSS3, and Advanced Javascript Frameworks such as AngularJS or JQuery

- Demonstrates technical expertise as a user of all platforms 
associated with the Development process: Windows 7-10, Mac OSX, and Centos 
6-7

- Works with Stakeholders, Users, and Project Managers to meet 
Client Project Goals and Milestones

- Language Skills: Python(3.x), Django(1.8+), BASH, JavaScript, CSS 
2/3

 

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6cd6d058-2ba9-47f5-9e40-0b01a35a1622%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Advanced search with aggregations

2016-10-05 Thread Raffa
Hi all
I have to create a page where I insert some cascade combobox  that fill 
dynamically through which I perform aggregations on the db records.
For example I want to know how many pants I still have in all Italian 
stores. I select from the combobox that contains the field "area" the 
"Italia" value, then I click on "Calculate pants":  the result I get is the 
sum of the pants of all records with area = Italy.
How can I perform that?
Thank in advance

Raffaella

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/98495fe4-258a-41c8-a57d-f1e1cecc63cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Advanced search with aggregations

2016-10-05 Thread M Hashmi
Kindly provide some details like what are your models so people can
understand what you are trying to do according to the available models.



On Wed, Oct 5, 2016 at 8:38 AM, Raffa  wrote:

> Hi all
> I have to create a page where I insert some cascade combobox  that fill
> dynamically through which I perform aggregations on the db records.
> For example I want to know how many pants I still have in all Italian
> stores. I select from the combobox that contains the field "area" the
> "Italia" value, then I click on "Calculate pants":  the result I get is the
> sum of the pants of all records with area = Italy.
> How can I perform that?
> Thank in advance
>
> Raffaella
>
> --
> 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 https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/98495fe4-258a-41c8-a57d-f1e1cecc63cf%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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANoUts4skezctxy77%2B6Qqc9FLB%2BS8pb%3DdNb5_sX%3Djh3KiT5tnA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


quasi-distributed system sharing data in django

2016-10-05 Thread Ricardo Pascal
Hello folks,

I have two django projects, (let call them A and B) they are independent
applications (with different django versions), I'm in need to sync some
data/models from A to B.

My plan is to use the post_save signal to start a celery task that will
post a subset of data from A to B using the B API.

This new data will be stored in models at B and be used in relationships
with data in B. (To make things easier, those data will never(probably) be
created or updated from B application)

I'm seeing the necessity to keep the primary key on both
applications synchronized too.

My questions is: should I keep using the auto-increment id from django, or
instead use some uuid as pk?

Also, any better idea on how to implement this? Tips, unforeseen problems
or any rant about that matter will be appreciated.

Thanks in advance,

--
Att.
Ricardo Pascal

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJ5FqeoypDP0520sNcpxC82NHAy-wbWbWs8RWXktPzyhDOXUFg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: quasi-distributed system sharing data in django

2016-10-05 Thread Mike Dewhirst

On 6/10/2016 7:40 AM, Ricardo Pascal wrote:

Hello folks,

I have two django projects, (let call them A and B) they are 
independent applications (with different django versions), I'm in need 
to sync some data/models from A to B.Â


My plan is to use the post_save signal to start a celery task that 
will post a subset of data from A to B using the B API.


This new data will be stored in models at B and be used in 
relationships with data in B. (To make things easier, those data will 
never(probably) be created or updated from B application)


I'm seeing the necessity to keep the primary key on both 
applications synchronized too.Â


My questions is: should I keep using the auto-increment id from 
django, or instead use some uuid as pk?


Ricardo

You say "never(probably)" and that sounds like a decision needs to be 
made. I would always decide in favour of the easiest answer and the 
least work right now.


Therefore I'd suggest using the Django auto-incrementing key in the B 
project.


Synchronising keys across two projects feels ugly. If you can't decide 
between "never" and "never(probably)" you could always add an 
IntegerField to the applicable model class in project A to store a copy 
of the primary key. Maybe use the migration and then the model save() 
method to populate it.


At least then you would have a simple independent mechanism to find the 
corresponding record in B should you ever need to update the data.


Mike



Also, any better idea on how to implement this? Tips, unforeseen 
problems or any rant about that matter will be appreciated.


Thanks in advance,

--
Att.
Ricardo Pascal
--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJ5FqeoypDP0520sNcpxC82NHAy-wbWbWs8RWXktPzyhDOXUFg%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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5ded72ac-4e3f-2358-9957-2cbb35df64ab%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.