Re: Django formtools wizard produces blank page (No error returned)

2016-02-09 Thread James Schneider
On Mon, Feb 8, 2016 at 5:36 AM, Martín Torre Castro <
martin.torre.cas...@gmail.com> wrote:

> If I understand well, you mean that my form templates have to extend the
> main wizard template. Is that correct?
>
> In previous versions this was achieved by writing template_name =
> 'main_wizard_template.html' into the subclass of WizardView. Am I wrong?
>
> So, with {% extends 'registration/test_wizard.html' %} in 
> *registration/test_step1.html
> and **registration/test_step2.html* it should work.
>
> I will try tonight.
> Thanks.
>
>
Yes, the templates referenced in each step should extend your main
template, if you are doing something fancy in the template used for each
step.

Given the template in your OP, you probably don't even need to specify a
template per step, since you aren't doing anything different other than
having Django/formtools print the form using the default styling. A simple
class attribute like template_name = 'registration/test_wizard.html' would
probably suffice, since it should act as the fallback template if you don't
specify a template per step, and get rid of get_template_names() entirely
(since you're using the same template for every step). Your entire Wizard
class can probably look like this:

class WizardTest(SessionWizardView):
template_name = 'registration/test_wizard.html'

# Method called when all is done
def done(self, form_list, **kwargs):
return HttpResponseRedirect('/url-to-redirect-to/')

Obviously you'll need to have the other scaffolding in place for this to
work (list of forms passed to the view in the urls.py file, etc.), and I
don't believe any of the forms will be saved in this state (you'll need to
do that as part of your done() method), but everything should display and
should give you a base to work from.

-James

-- 
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/CA%2Be%2BciWrCr5HE74ikCaQEHHre-Mg_vE6Bjri878z3-45n-o-Eg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Running automated expiration date events

2016-02-09 Thread James Schneider
On Mon, Feb 8, 2016 at 10:18 AM, Rod Delaporte 
wrote:

> I have a field of a model that changes states but I need to automatically
> modify that value after an expiration datetime has come. Is there a way to
> do this?
>
> Here is an example:
>
> class Post(models.Model):
> created_at = models.DateTimeField(auto_now_add=True)
> languages = (
> ('1', 'active'),
> ('2', 'inactive'),
> )
> language = models.CharField(max_length=20, choices=languages,
> default='english')
> duration = models.DurationField(blank=True, null=True)
> expires = models.DateTimeField(blank=True, null=True)
> updated_at = models.DateTimeField(auto_now=True)
>
> @property
> def active(self):
> return self.expires > localtime(now())
>
> def save(self, *args, **kwargs):
> self.created_at = localtime(now())
> self.expires = self.created_at + self.duration
> return super(Post, self).save(*args, **kwargs)
>
>
> The problem I have is that I have to call the active function property to
> check if it's True or False and I'm looking for a way that this can be done
> automatically so the database updates itself.
> I've been thinking about Django-cron but I can't chose when to call the
> active function, this should be done for itself.
>
> Is this possible?
>

What is the issue with calling the active property? Your model doesn't have
what I'd presume to be a boolean field to store whether or not your model
is in an 'active' state. Checking the 'active' state as you are doing now
is far more accurate (down to the microsecond in most cases), rather than
relying on a recurring maintenance job to 'mark' all of your expired model
objects as expired in the database.

Doing so would a) cause management overhead by having a recurring job
running that constantly scavenges all of your records to update a single
boolean field, b) create an inconsistent state in your database between the
time that a record actually expires, and your recurring database
maintenance job to mark all of your records as expired. Depending on your
use case, this would mean that models stay 'active' longer than they are
supposed to, and c) add complication to your models to store a value that
can be just as easily computed based on already-existing data. Is there a
real difference between filter(is_expired=True) and
filter(expires__lt(localtime(now(? I'm betting that the two are
basically equivalent in terms of search and process time, and you don't
need to manage a separate field in your database with possibly stale
information. Calling 'if self.active' would be the same as calling 'if not
self.is_expired'. You can add model manager methods to automatically grab
all expired or all active records.

Even so, you may still want to manually toggle Post objects on/off, so you
would add a separate field like 'enabled', which would add a second
condition to whether or not a post is shown (post must not be expired and
must be enabled to be shown). Your 'active' property can easily be modified
to make that determination. Model manager methods can also be easily drawn
up to filter based on those conditions.

TL;DR; Having a separate field to track the expiry of an object is not
ideal. If you add the 'enabled' toggle as I suggested, you could get away
with having a recurring job (say, once a day) run through and mark expired
posts as disabled, since they wouldn't be displayed anyway if you keep the
conditions I mentioned earlier. Take advantage of model manager methods to
filter out the posts you want (or don't want due to their
expiration/enabled status), and look at management commands for running the
recurring jobs. Cron on the host running a management command would likely
be sufficient and much easier in this case, but Celery can probably perform
the job just as well:

https://docs.djangoproject.com/en/1.9/topics/db/managers/#adding-extra-manager-methods
https://docs.djangoproject.com/en/1.9/howto/custom-management-commands/

Side note, if you update an existing model, the created_at date is updated
to the current timestamp. In general, created_at type dates are not usually
modified after the initial insertion into the database. The updated_at
field should be used for these operations. Otherwise you lose (accurate)
historical tracking of your models.

-James

-- 
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/CA%2Be%2BciWuu7fD-U_bWT3st4AsM6rAf-W5FwgcjqRsc59JemXQHQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


WeakMethod import error in Django 1.9 with python 3.3

2016-02-09 Thread Mohammad Asif
Hello,

I'm using django 1.9.1 with python 3.3.
Whenever I'm running manage.py runserver, I'm getting following error.

* File 
"/home/travis/virtualenv/python3.3.5/lib/python3.3/site-packages/django/dispatch/__init__.py",
 
line 9, in *

* from django.dispatch.dispatcher import Signal, receiver # NOQA*

* File 
"/home/travis/virtualenv/python3.3.5/lib/python3.3/site-packages/django/dispatch/dispatcher.py",
 
line 14, in *

* from weakref import WeakMethod*

*ImportError: cannot import name WeakMethod*


As I was reading WeakMethod of weakref has been introduced in python 3.4, 
and its not exist in weakref of python 3.3.


Any suggestions on how to fix the same error with python 3.3.



Regards,

Asif

-- 
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/c9ed00b5-a8e3-474b-b76c-37a753f653fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


DjangoCon Europe 2016 -- Call for Sponsors!

2016-02-09 Thread Ola Sitarska
Hi everyone!

A number of generous sponsors have already stepped forward to help make 
DjangoCon 
Europe  happen, but we still need a couple 
more. Can you help? DjangoCon team would love to hear from you 
<2...@djangocon.eu>.

DjangoCon Europe is run entirely by volunteers, and every cent received in 
sponsorship will go towards making it the best event possible. The 
organizers aim to make the event as affordable and accessible as possible 
for everyone.

With your help, here are just some of the things we're able to do:

   - provide 20 free tickets and 5000€ towards the Scholarship program,
   - run a Django Girls workshop and give 21 free tickets for the attendees,
   - offer complimentary child care to everyone attending the conference 
   with their children,
   - offer live captioning and subsequent text transcripts of all talks at 
   the conference.

Sponsoring DjangoCon Europe is a great way to recruit Django developers, 
promote your product or give back to the community. The sponsorship 
packages start at 500€ and you can find more information in the sponsorship 
brochure .

Have a lovely day!
Ola & the DjangoCon Europe team

-- 
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/f59cbc3f-871a-4639-a987-d0f173a1c968%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django admin, InLineForm and many2many fields

2016-02-09 Thread Karim
Hello everyone, I have a problem and I don't understand how to solve it.

I have a simple model:

Supplier(models.Model):
organization = models.CharField(..)
location = models.ManyToManyfield(Location, blank=True)

Location(models.Model):
address = models.CharField(..)
active = models.BooleanField(default=True)

I created the inlineform to use in the supplier django-admin page:

class LocationInLineForm(admin.TabularInLine):
model = Supplier.Location.through

​
I would like to show the records in the inlineform based on the supplier
page in django admin. An administrator in the django admin click on a
supplier and the inlineform must shows only the location owned by the
selected supplier.

- I don't understand which method override (get_queryset?
formfield_for_foreignkey?)
- I don't know how to get the is of the supplier loaded in the django admin.

I would like also filter the location based on the active boolean field. Is
possible to do that?

Thanks


-- 
Karim N. Gorjux

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


Re: WeakMethod import error in Django 1.9 with python 3.3

2016-02-09 Thread Tim Graham
As noted in the Django 1.9 release notes, "Django 1.9 requires Python 2.7, 
3.4, or 3.5."

On Tuesday, February 9, 2016 at 5:49:41 AM UTC-5, Mohammad Asif wrote:
>
> Hello,
>
> I'm using django 1.9.1 with python 3.3.
> Whenever I'm running manage.py runserver, I'm getting following error.
>
> * File 
> "/home/travis/virtualenv/python3.3.5/lib/python3.3/site-packages/django/dispatch/__init__.py",
>  
> line 9, in *
>
> * from django.dispatch.dispatcher import Signal, receiver # NOQA*
>
> * File 
> "/home/travis/virtualenv/python3.3.5/lib/python3.3/site-packages/django/dispatch/dispatcher.py",
>  
> line 14, in *
>
> * from weakref import WeakMethod*
>
> *ImportError: cannot import name WeakMethod*
>
>
> As I was reading WeakMethod of weakref has been introduced in python 3.4, 
> and its not exist in weakref of python 3.3.
>
>
> Any suggestions on how to fix the same error with python 3.3.
>
>
>
> Regards,
>
> Asif
>

-- 
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/3952b48d-6bf0-40ee-a4bd-7194681a0cf0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Codec H.264 if Free?

2016-02-09 Thread ylativ oknesyl
I am web-programmer and using on my wesite video (mp4). Please tell me it 
is free or H.264 payable

-- 
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/36558d3c-0db3-488c-a723-c7eecfece712%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


./manage.py runserver 0.0.0.0:8080 is not working, No module named django.core.management

2016-02-09 Thread John Travolta
Hi,
in the past I succeeded to start python server but now I changed VPS and I 
can't do it. 

here is what I get, i tried to find an answer with google but no success:

*./manage.py runserver 0.0.0.0:8080*
Traceback (most recent call last):
  File "./manage.py", line 8, in 
from django.core.management import execute_from_command_line
ImportError: No module named django.core.management

I tried sudo, python, python3.4, python2.7, before ./manage, but no 
success. even if django is not upgraded, it should work, but it is not.

*(env)root@mx:~/mercury# pip freeze|grep -i django*
Django==1.8.3
*(env)root@mx:~/mercury# python*
Python 2.7.9 (default, Mar  1 2015, 12:57:24)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> import sys.path
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named path
>>> *print sys.path*
['', '/root/env/lib/python2.7', 
'/root/env/lib/python2.7/plat-x86_64-linux-gnu', 
'/root/env/lib/python2.7/lib-tk', '/root/env/lib/python2.7/lib-old', 
'/root/env/lib/python2.7/lib-dynload', '/usr/lib/python2.7', 
'/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', 
'/root/env/local/lib/python2.7/site-packages', 
'/root/env/lib/python2.7/site-packages']

all requirements are met just it is not upgraded:
(env)root@mx:~/mercury# pip install -r requirements.txt
Requirement already satisfied (use --upgrade to upgrade): Django==1.8.3 in /
root/env/lib/python3.4/site-packages (from -r requirements.txt (line 1))
Requirement already satisfied (use --upgrade to upgrade): mysqlclient==1.3.6 
in /root/env/lib/python3.4/site-packages (from -r requirements.txt (line 2))
Requirement already satisfied (use --upgrade to upgrade): pycrypto==2.6.1 in 
/root/env/lib/python3.4/site-packages (from -r requirements.txt (line 3))

any help?

-- 
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/eb9a149c-2b9c-45de-94e5-8d2ffe6a65a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


manage.py runserver is not working, No module named django.core.management

2016-02-09 Thread John Travolta
Hi,
in the past I succeeded to start python server but now I changed VPS and I 
can't do it. 

here is what I get, i tried to find an answer with google but no success:

*./manage.py runserver 0.0.0.0:8080*
Traceback (most recent call last):
  File "./manage.py", line 8, in 
from django.core.management import execute_from_command_line
ImportError: No module named django.core.management

I tried sudo, python, python3.4, python2.7, before ./manage, but no 
success. even if django is not upgraded, it should work, but it is not.

*(env)root@mx:~/mercury# pip freeze|grep -i django*
Django==1.8.3
*(env)root@mx:~/mercury# python*
Python 2.7.9 (default, Mar  1 2015, 12:57:24)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> import sys.path
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named path
>>> *print sys.path*
['', '/root/env/lib/python2.7', 
'/root/env/lib/python2.7/plat-x86_64-linux-gnu', 
'/root/env/lib/python2.7/lib-tk', '/root/env/lib/python2.7/lib-old', 
'/root/env/lib/python2.7/lib-dynload', '/usr/lib/python2.7', 
'/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', 
'/root/env/local/lib/python2.7/site-packages', 
'/root/env/lib/python2.7/site-packages']

all requirements are met just it is not upgraded:
(env)root@mx:~/mercury# pip install -r requirements.txt
Requirement already satisfied (use --upgrade to upgrade): Django==1.8.3 in /
root/env/lib/python3.4/site-packages (from -r requirements.txt (line 1))
Requirement already satisfied (use --upgrade to upgrade): mysqlclient==1.3.6 
in /root/env/lib/python3.4/site-packages (from -r requirements.txt (line 2))
Requirement already satisfied (use --upgrade to upgrade): pycrypto==2.6.1 in 
/root/env/lib/python3.4/site-packages (from -r requirements.txt (line 3))

any help?

-- 
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/20dae6d9-fc9f-4abd-ab23-d608f72f72b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ./manage.py runserver 0.0.0.0:8080 is not working, No module named django.core.management

2016-02-09 Thread Daniel Roseman
On Tuesday, 9 February 2016 17:02:25 UTC, John Travolta wrote:
>
> Hi,
> in the past I succeeded to start python server but now I changed VPS and I 
> can't do it. 
>
> here is what I get, i tried to find an answer with google but no success:
>
> *./manage.py runserver 0.0.0.0:8080 *
> Traceback (most recent call last):
>   File "./manage.py", line 8, in 
> from django.core.management import execute_from_command_line
> ImportError: No module named django.core.management
>
> I tried sudo, python, python3.4, python2.7, before ./manage, but no 
> success. even if django is not upgraded, it should work, but it is not.
>
> *(env)root@mx:~/mercury# pip freeze|grep -i django*
> Django==1.8.3
> *(env)root@mx:~/mercury# python*
> Python 2.7.9 (default, Mar  1 2015, 12:57:24)
> [GCC 4.9.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import sys
> >>> import sys.path
> Traceback (most recent call last):
>   File "", line 1, in 
> ImportError: No module named path
> >>> *print sys.path*
> ['', '/root/env/lib/python2.7', 
> '/root/env/lib/python2.7/plat-x86_64-linux-gnu', 
> '/root/env/lib/python2.7/lib-tk', '/root/env/lib/python2.7/lib-old', 
> '/root/env/lib/python2.7/lib-dynload', '/usr/lib/python2.7', 
> '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', 
> '/root/env/local/lib/python2.7/site-packages', 
> '/root/env/lib/python2.7/site-packages']
>
> all requirements are met just it is not upgraded:
> (env)root@mx:~/mercury# pip install -r requirements.txt
> Requirement already satisfied (use --upgrade to upgrade): Django==1.8.3 in 
> /root/env/lib/python3.4/site-packages (from -r requirements.txt (line 1))
> Requirement already satisfied (use --upgrade to upgrade): mysqlclient==1.3
> .6 in /root/env/lib/python3.4/site-packages (from -r requirements.txt (line 
> 2))
> Requirement already satisfied (use --upgrade to upgrade): pycrypto==2.6.1 
> in /root/env/lib/python3.4/site-packages (from -r requirements.txt (line 3
> ))
>
> any help?
>


Django is installed for Python 3.4, but you're running the shell and server 
in Python 2. Do `python3 manage.py ...`.
--
DR

 

-- 
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/d489b247-9aca-45b4-b8c4-4e860bb47c62%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Diving into Django 2016

2016-02-09 Thread Alan Auckland
Hi everyone, 
  I have been doing lots of reading about which way to go 
for web development and programming. I think I have finally decided to dive 
into Python with Django. 
I really like the idea that it is such a versatile language spreading 
across many areas. 

What resources do you recommend to get started with? 

I am learning this myself but I also have a few to start a business 
training others and offering them work experience and show others how to 
get employed and improve their chances of employment.

I have been doing some research and not sure which database is right to 
use. 
I really like the idea of learning Cassandra because it is fast and the 
most reliable DB I have read about, but not sure if its the right choice or 
if Django can even interact with it. 

On that note as well I have never heard of a web host providing Cassandra. 

My students will be building simple websites for clients  like 2-3 page 
information sites. 
Personally I would like to be building more involved sites. 

Where web hosting is concerned I want to keep it as low as possible and 
could really use some help finding a provider. 
This gets trickery when I might have students wanting to learn other 
technologies but I guess if I have to use more than one provider than that 
is all I can do. 
 (by this I mean if a student wants to develop in ASP.net or Node.Js) 

I have been thiking a reseller account would be a good solution. I want to 
charge clients for hosting and offer a reduced rate for the design and 
development from students. 
My aim is to make re-occurring revenue from the hosting over a long period 
as well as support people finding there way into awesome jobs :D 

I am worried that the only solution would be host sites myself but this 
seems quite daunting and discussion for a whole other topic. 

I have never worked in a real development job. I finished a HND last year, 
done nothing this year and I am applying to top up to a full degree this 
year. 

Thank you for reading 

I look forward to hearing from you all. 

 

-- 
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/651fba50-3460-4395-924f-1a00a8abe563%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


mathematical function and django connect

2016-02-09 Thread Xristos Xristoou
hello,


i create some python mathematical function on python idle,
i want to create website where the user import value numbers on the function
and take the results from that.
question one,how to connect my mathematical function on the django?
question two,how to connect input and output from the scipts in the website 
?
the second question i ask because input and output from the function is a 
dynamic define from the user



-- 
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/b9267697-b28e-4a03-af7c-88fd384cc72b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: mathematical function and django connect

2016-02-09 Thread Sergiy Khohlov
Add regext to the  url.py and  view function to it
Add function to the view.py accepted  function values from  request object
and return  value of  your functions
Create template  which few input values field and shown result

Many thanks,

Serge


+380 636150445
skype: skhohlov

On Tue, Feb 9, 2016 at 9:47 PM, Xristos Xristoou  wrote:

> hello,
>
>
> i create some python mathematical function on python idle,
> i want to create website where the user import value numbers on the
> function
> and take the results from that.
> question one,how to connect my mathematical function on the django?
> question two,how to connect input and output from the scipts in the
> website ?
> the second question i ask because input and output from the function is a
> dynamic define from the user
>
>
>
> --
> 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/b9267697-b28e-4a03-af7c-88fd384cc72b%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/CADTRxJMfi8ToRx3h0KkQFz5nYUDtKh-GLz5PP94fNR6nG_w8Sg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: mathematical function and django connect

2016-02-09 Thread Xristos Xristoou
what is regext?

Τη Τρίτη, 9 Φεβρουαρίου 2016 - 9:47:30 μ.μ. UTC+2, ο χρήστης Xristos 
Xristoou έγραψε:
>
> hello,
>
>
> i create some python mathematical function on python idle,
> i want to create website where the user import value numbers on the 
> function
> and take the results from that.
> question one,how to connect my mathematical function on the django?
> question two,how to connect input and output from the scipts in the 
> website ?
> the second question i ask because input and output from the function is a 
> dynamic define from the user
>
>
>
>

-- 
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/1d0bb319-dbcb-4193-b646-0640225414c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: mathematical function and django connect

2016-02-09 Thread Fabio C. Barrionuevo da Luz
https://en.wikipedia.org/wiki/Regular_expression

https://docs.djangoproject.com/en/1.9/topics/http/urls/

https://regex101.com/#python



On Tue, Feb 9, 2016 at 5:41 PM, Xristos Xristoou  wrote:

> what is regext?
>
> Τη Τρίτη, 9 Φεβρουαρίου 2016 - 9:47:30 μ.μ. UTC+2, ο χρήστης Xristos
> Xristoou έγραψε:
>>
>> hello,
>>
>>
>> i create some python mathematical function on python idle,
>> i want to create website where the user import value numbers on the
>> function
>> and take the results from that.
>> question one,how to connect my mathematical function on the django?
>> question two,how to connect input and output from the scipts in the
>> website ?
>> the second question i ask because input and output from the function is a
>> dynamic define from the user
>>
>>
>>
>> --
> 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/1d0bb319-dbcb-4193-b646-0640225414c1%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Fábio C. Barrionuevo da Luz
Palmas - Tocantins - Brasil - América do Sul

http://pythonclub.com.br/

Blog colaborativo sobre Python e tecnologias Relacionadas, mantido
totalmente no https://github.com/pythonclub/pythonclub.github.io .

Todos são livres para publicar. É só fazer fork, escrever sua postagem e
mandar o pull-request. Leia mais sobre como publicar em README.md e
contributing.md.
Regra básica de postagem:
"Você" acha interessante? É útil para "você"? Pode ser utilizado com Python
ou é útil para quem usa Python? Está esperando o que? Publica logo, que
estou louco para ler...

-- 
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/CAPVjvMabSKOPkvH_Mbf3%3DR48Bo%3DBwJE%3DBkGxe0HY6bDmwn-Hag%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: mathematical function and django connect

2016-02-09 Thread Xristos Xristoou
yeah my bad for the regext i know that with the full name btw,form its not 
nesecery to create ?
my task is to copy paste my code in the view,create the regext,and cell on 
my templete ?only just ?

Τη Τρίτη, 9 Φεβρουαρίου 2016 - 9:47:30 μ.μ. UTC+2, ο χρήστης Xristos 
Xristoou έγραψε:
>
> hello,
>
>
> i create some python mathematical function on python idle,
> i want to create website where the user import value numbers on the 
> function
> and take the results from that.
> question one,how to connect my mathematical function on the django?
> question two,how to connect input and output from the scipts in the 
> website ?
> the second question i ask because input and output from the function is a 
> dynamic define from the user
>
>
>
>

-- 
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/8995c788-8e4b-4aef-a175-8c8cd291d7f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: mathematical function and django connect

2016-02-09 Thread Xristos Xristoou
yeah my bad for the regext i know that with the full name btw,form its not 
nesecery to create ?
my task is to copy paste my code in the view,create the regext,and connect 
on my templete ?only just ?

hello,

>
>
> i create some python mathematical function on python idle,
> i want to create website where the user import value numbers on the 
> function
> and take the results from that.
> question one,how to connect my mathematical function on the django?
> question two,how to connect input and output from the scipts in the 
> website ?
> the second question i ask because input and output from the function is a 
> dynamic define from the user
>
>
>
>

-- 
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/3db82847-7e0b-4194-909f-270f9bc2b3c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Right place to decrypt/decode data from DB before passing it to UI without affect data in DB itself.

2016-02-09 Thread James Schneider
On Feb 8, 2016 10:00 AM, "learn django"  wrote:
>
> Hi,
>
> I store some data like email text, headers and from email address in
encoded format in the database.
> I want to have a  page where I can display all this information in
readonly format.
>

If you want data displayed in a read only format, then display the days
without using any forms.

> What is the ideal place & way to decode this information and pass it to
django UI.
>

The way is dependent on how you've stored the data. The place is likely as
close to the end of the request/rendering cycle as possible, maybe even in
the template rendering, using something akin the obj.get_foo_display()
which would be a method call on the model to convert the data from your
stored format to something human readable. You may also be doing the
conversion in the view of you need to do something with the data that a
template operation can't easily perform.

> I was thinking of reading all the information in my views.py.
> But then I don't want to affect my DB. aka information in DB should
remain encoded.
>
> eg.
>
> class FooViewSet(viewsets.ModelViewSet):
> queryset = Message.objects.all()
>
> Message object has headers, body and from fields which are encoded before
storing in db.
> If I perform any operation on queryset those changes will be reflected in
DB so I cannot do that.
>

There's no code there that would ever modify your data, unless the parent
class contains such code. If so, the library providing the parent class
likely has a read-only variant that you can use.

The only time the DB would be affected is if you executed a query set that
has a modification action attached to it, such as update() or delete().
Querying the data via filter() or all() should never change it.

> If I do something like below then I get exception for using list as
queryset becomes a list object instead of queryset object.
>
> class FooViewSet(viewsets.ModelViewSet):
> queryset = list(Message.objects.all())
> for obj in queryset:
> body = base64.b64decode(obj.body)
> obj.body = body
>

This class is not configured correctly, which is why you are getting the
traceback. Your queryset parameter should not include the list() wrapper.
The for loop needs to be contained in another class method that is called
at runtime, where you can gather the queryset and execute list() on it at
that point so you continue to get fresh data.

I'm assuming you are using DRF to provide the view set parent class. Please
read up on their documentation to determine the method hook to override and
insert your for loop. Even if this code loaded correctly, you would only
ever see the Foo objects that were available at the time the process was
started, since the class will only be instantiated once, and your queryset
parameter will always contain the same list of Foo objects. I doubt that's
what you want.

Another topic. You mentioned both decryption and decoding. There is a very
significant difference between those two concepts.

Base64 operations only handle encoding/decoding, not encryption. Granted,
to a human, it looks obfuscated and 'encrypted', but to a computer, it is
trivial to process and interpret. If you believe that having your data
Base64 encoded in the database is providing any sort of security benefit,
you are very mistaken. All you've done is made things much more difficult
for you as the programmer to convert between B64 and probably Unicode to
make things 'human-readable'. It also makes searching and indexing unusable
in most cases.

Google 'Base64 encryption' if you want more of an explanation.

-James

-- 
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/CA%2Be%2BciUbEaztP%3DJCwo%3D1YxqqAGETyY-Td_wNbb1dJScg1n_geg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: mathematical function and django connect

2016-02-09 Thread Fabio C. Barrionuevo da Luz
these questions will be answered with the knowledge that you acquire after
after completing the official tutorial:

https://docs.djangoproject.com/en/1.9/intro/

and additionally, perhaps :

http://masteringdjango.com/introduction/

or

http://www.tangowithdjango.com/book17/



On Tue, Feb 9, 2016 at 6:22 PM, Xristos Xristoou  wrote:

> yeah my bad for the regext i know that with the full name btw,form its not
> nesecery to create ?
> my task is to copy paste my code in the view,create the regext,and connect
> on my templete ?only just ?
>
> hello,
>
>>
>>
>> i create some python mathematical function on python idle,
>> i want to create website where the user import value numbers on the
>> function
>> and take the results from that.
>> question one,how to connect my mathematical function on the django?
>> question two,how to connect input and output from the scipts in the
>> website ?
>> the second question i ask because input and output from the function is a
>> dynamic define from the user
>>
>>
>>
>> --
> 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/3db82847-7e0b-4194-909f-270f9bc2b3c8%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Fábio C. Barrionuevo da Luz
Palmas - Tocantins - Brasil - América do Sul

http://pythonclub.com.br/

Blog colaborativo sobre Python e tecnologias Relacionadas, mantido
totalmente no https://github.com/pythonclub/pythonclub.github.io .

Todos são livres para publicar. É só fazer fork, escrever sua postagem e
mandar o pull-request. Leia mais sobre como publicar em README.md e
contributing.md.
Regra básica de postagem:
"Você" acha interessante? É útil para "você"? Pode ser utilizado com Python
ou é útil para quem usa Python? Está esperando o que? Publica logo, que
estou louco para ler...

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


Re: Diving into Django 2016

2016-02-09 Thread Muhammad M
Dear Alan,

If, as you stated, you haven’t worked in a real development job, it might be a 
bit of a challenge teaching others how to do the same since you may have 
limited exposure to the tools of the trade.

As for resources, here are a few that may be useful:

1. The Official Django Tutorial: https://docs.djangoproject.com/en/1.9/intro/ 
 


2. PostgreSQL is a database that is (perhaps most commonly) used with Django 
web projects. A suitable place to start may include 
http://www.postgresql.org/docs/9.0/static/tutorial.html 
  Please, note that 
while using Django, most of the time you will be using the Django ORM to access 
and manipulate the PostgreSQL database instead of writing DB queries against 
the database directly. See the Django tutorial for details.

As for integrating Cassandra with Django, you may have to do some research or 
ask around for more details on how to go about doing that. Or maybe somebody 
here has some related experience to share.

3. Web Hosting: I don’t know about where you can get web hosting to resell. But 
if you are interested in web hosts that pride themselves on supporting Django, 
a few options include:
> https://www.pythonanywhere.com/  
> http://www.webfaction.com  
> DigitalOcean.com  

https://code.djangoproject.com/wiki/DjangoFriendlyWebHosts 
 also provides a 
list of “django-friendly” web hosts.

I hope this would be of some help.

All the best.

Yours sincerely,
Muhammad 

> On Feb 9, 2016, at 1:56 PM, Alan Auckland  wrote:
> 
> Hi everyone, 
>   I have been doing lots of reading about which way to go for 
> web development and programming. I think I have finally decided to dive into 
> Python with Django. 
> I really like the idea that it is such a versatile language spreading across 
> many areas. 
> 
> What resources do you recommend to get started with? 
> 
> I am learning this myself but I also have a few to start a business training 
> others and offering them work experience and show others how to get employed 
> and improve their chances of employment.
> 
> I have been doing some research and not sure which database is right to use. 
> I really like the idea of learning Cassandra because it is fast and the most 
> reliable DB I have read about, but not sure if its the right choice or if 
> Django can even interact with it. 
> 
> On that note as well I have never heard of a web host providing Cassandra. 
> 
> My students will be building simple websites for clients  like 2-3 page 
> information sites. 
> Personally I would like to be building more involved sites. 
> 
> Where web hosting is concerned I want to keep it as low as possible and could 
> really use some help finding a provider. 
> This gets trickery when I might have students wanting to learn other 
> technologies but I guess if I have to use more than one provider than that is 
> all I can do. 
>  (by this I mean if a student wants to develop in ASP.net or Node.Js) 
> 
> I have been thiking a reseller account would be a good solution. I want to 
> charge clients for hosting and offer a reduced rate for the design and 
> development from students. 
> My aim is to make re-occurring revenue from the hosting over a long period as 
> well as support people finding there way into awesome jobs :D 
> 
> I am worried that the only solution would be host sites myself but this seems 
> quite daunting and discussion for a whole other topic. 
> 
> I have never worked in a real development job. I finished a HND last year, 
> done nothing this year and I am applying to top up to a full degree this 
> year. 
> 
> Thank you for reading 
> 
> I look forward to hearing from you all. 
> 
>  
> 
> -- 
> 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/651fba50-3460-4395-924f-1a00a8abe563%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 receivin

Re: Diving into Django 2016

2016-02-09 Thread Andrew Farrell
Hi Alan,

*Learning Django*
There are three resources I recommend for learning django:
- The official tutorial
, which walks you
through many of the major features of the framework.
- Test-Driven Development with Python
 by Harry Percival
- Django Unleashed
 by
Andrew Pinkham

*Databases*
When you are first learning, you should stick with the SQLite database that
comes pre-configured out of the box.

Once you start looking at production databases, you should be aware that
Django's model layer is designed to work with a traditional relational
database like Oracle

, MySQL

, MS SQL Server
,
or as most people recommend, PostgreSQL
.
Can you use a NoSQL database like mongodb, couchdb, or cassandra? Sure. I
can't give any recommendations on using them with django but there are
python  modules
 available
.

But the common wisdom is that for using django in production, the best
default choice is PostgreSQL.

*Hosting*

I unequivocally recommend DigitalOcean
. They will give you
full ssh access to a whole server for $5/month (prorated) and they have
clear easy-to-follow documentation on variety of topics including setting
up django in production
.
The experience of signing up and starting a server couldn't be simpler. If
you value your time above $2/hour, it far cheaper to use a VPS like
DigitalOcean than a generic shared hosting provider. Also, you get a $10
credit if you sign up using this link
, so it is free for two
months.

All the best,
Andrew Farrell

PS. If you want to learn more about setting up servers, I'll shamelessly
plug this tutorial I wrote .

On Tue, Feb 9, 2016 at 12:56 PM, Alan Auckland 
wrote:

> Hi everyone,
>   I have been doing lots of reading about which way to go
> for web development and programming. I think I have finally decided to dive
> into Python with Django.
> I really like the idea that it is such a versatile language spreading
> across many areas.
>
> What resources do you recommend to get started with?
>
> I am learning this myself but I also have a few to start a business
> training others and offering them work experience and show others how to
> get employed and improve their chances of employment.
>
> I have been doing some research and not sure which database is right to
> use.
> I really like the idea of learning Cassandra because it is fast and the
> most reliable DB I have read about, but not sure if its the right choice or
> if Django can even interact with it.
>
> On that note as well I have never heard of a web host providing Cassandra.
>
> My students will be building simple websites for clients  like 2-3 page
> information sites.
> Personally I would like to be building more involved sites.
>
> Where web hosting is concerned I want to keep it as low as possible and
> could really use some help finding a provider.
> This gets trickery when I might have students wanting to learn other
> technologies but I guess if I have to use more than one provider than that
> is all I can do.
>  (by this I mean if a student wants to develop in ASP.net or Node.Js)
>
> I have been thiking a reseller account would be a good solution. I want to
> charge clients for hosting and offer a reduced rate for the design and
> development from students.
> My aim is to make re-occurring revenue from the hosting over a long period
> as well as support people finding there way into awesome jobs :D
>
> I am worried that the only solution would be host sites myself but this
> seems quite daunting and discussion for a whole other topic.
>
> I have never worked in a real development job. I finished a HND last year,
> done nothing this year and I am applying to top up to a full degree this
> year.
>
> Thank you for reading
>
> I look forward to hearing from you all.
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to

Re: mathematical function and django connect

2016-02-09 Thread Xristos Xristoou

THNX for response but that toturial not answer on my questions
Τη Τρίτη, 9 Φεβρουαρίου 2016 - 9:47:30 μ.μ. UTC+2, ο χρήστης Xristos 
Xristoou έγραψε:
>
> hello,
>
>
> i create some python mathematical function on python idle,
> i want to create website where the user import value numbers on the 
> function
> and take the results from that.
> question one,how to connect my mathematical function on the django?
> question two,how to connect input and output from the scipts in the 
> website ?
> the second question i ask because input and output from the function is a 
> dynamic define from the user
>
>
>
>

-- 
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/f42b86ac-3fc5-4336-b9f7-dc950d069702%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Codec H.264 if Free?

2016-02-09 Thread Luis Zárate
I don't understand you question, but if you are looking for video support


https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats


You maybe need to take a look to ffmpeg (now avconf).



El martes, 9 de febrero de 2016, ylativ oknesyl <2vlyse...@gmail.com>
escribió:
> I am web-programmer and using on my wesite video (mp4). Please tell me it
is free or H.264 payable
>
> --
> 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/36558d3c-0db3-488c-a723-c7eecfece712%40googlegroups.com
.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
"La utopía sirve para caminar" Fernando Birri

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


Writing your first Django app, part 1 - Can't Follow it

2016-02-09 Thread michaelatnanocube
Hi, 

I am running into the same problem as this:
http://stackoverflow.com/questions/30493018/404-error-in-writing-your-first-django-app-tutorial

Now I can just follow the Alasdair's recommendation and delete the 
polls/url.py file, but the tutorial is very clear about having two separate 
urls.py. 
Is this a mistake in the tutorial?

I even copied and pasted the tutorials code and tried to run it and it 
still gave the same error:
*ImportError: No module named 'polls.urls'*

Very confusing for a first step tutorial, maybe this could be corrected if 
it is an issue?

Kind Regards


-- 
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/44703fc1-518a-4a25-ae56-4a7b2992860a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Diving into Django 2016

2016-02-09 Thread Cory Kitchens
Hey Allen,

Welcome to the Django community. I was in the same boat as you and 
researched endless web development frameworks, databases, and platforms. 
What I love about Django is the loose coupling amongst apps, and how 
readable the source code is. If you come from an MVC background, you can 
get up to speed with Django pretty quickly.

For resources, the sky is the limit!

Learning Python is a fun and rewarding experience. I began my Python 
journey with the following websites
Learn Python the Hard Way 
Official Django Tutorial 
Mastering Django 
Two Scoops of Django 


In terms of which DBMS to use, sadly I have not dived deep enough into 
various systems. My background is in Oracle/MySQL but it seems like the 
standard is PostgreSQL.

Welcome to the community and good luck on your adventures with Django


On Tuesday, February 9, 2016 at 11:36:12 AM UTC-8, Alan Auckland wrote:
>
> Hi everyone, 
>   I have been doing lots of reading about which way to go 
> for web development and programming. I think I have finally decided to dive 
> into Python with Django. 
> I really like the idea that it is such a versatile language spreading 
> across many areas. 
>
> What resources do you recommend to get started with? 
>
> I am learning this myself but I also have a few to start a business 
> training others and offering them work experience and show others how to 
> get employed and improve their chances of employment.
>
> I have been doing some research and not sure which database is right to 
> use. 
> I really like the idea of learning Cassandra because it is fast and the 
> most reliable DB I have read about, but not sure if its the right choice or 
> if Django can even interact with it. 
>
> On that note as well I have never heard of a web host providing Cassandra. 
>
> My students will be building simple websites for clients  like 2-3 page 
> information sites. 
> Personally I would like to be building more involved sites. 
>
> Where web hosting is concerned I want to keep it as low as possible and 
> could really use some help finding a provider. 
> This gets trickery when I might have students wanting to learn other 
> technologies but I guess if I have to use more than one provider than that 
> is all I can do. 
>  (by this I mean if a student wants to develop in ASP.net or Node.Js) 
>
> I have been thiking a reseller account would be a good solution. I want to 
> charge clients for hosting and offer a reduced rate for the design and 
> development from students. 
> My aim is to make re-occurring revenue from the hosting over a long period 
> as well as support people finding there way into awesome jobs :D 
>
> I am worried that the only solution would be host sites myself but this 
> seems quite daunting and discussion for a whole other topic. 
>
> I have never worked in a real development job. I finished a HND last year, 
> done nothing this year and I am applying to top up to a full degree this 
> year. 
>
> Thank you for reading 
>
> I look forward to hearing from you all. 
>
>  
>

-- 
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/cb19581b-a0ea-4ce2-bdb6-a5affc417c1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Writing your first Django app, part 1 - Can't Follow it

2016-02-09 Thread Bipul Raj
I remember doing the django tutorial long time back, it just works.

The import error means that file polls/urls.py is not there. Check may be
you have left "s" in ulrs. You might have created polls/url.py.


On 10 February 2016 at 04:05,  wrote:

> Hi,
>
> I am running into the same problem as this:
>
> http://stackoverflow.com/questions/30493018/404-error-in-writing-your-first-django-app-tutorial
>
> Now I can just follow the Alasdair's recommendation and delete the
> polls/url.py file, but the tutorial is very clear about having two separate
> urls.py. 
> Is this a mistake in the tutorial?
>
> I even copied and pasted the tutorials code and tried to run it and it
> still gave the same error:
> *ImportError: No module named 'polls.urls'*
>
> Very confusing for a first step tutorial, maybe this could be corrected if
> it is an issue?
>
> Kind Regards
> 
>
> --
> 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/44703fc1-518a-4a25-ae56-4a7b2992860a%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/CAHHn46SB%3Dhsx3pP5BBVVPmBbUb_eoiuzVGd5EwLVV8Djr7yVKw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Writing your first Django app, part 1 - Can't Follow it

2016-02-09 Thread Thiago Reis
I believe it is because your (MySite) is in upper case.

ROOT_URLCONF = 'mysite.urls'

must be:

ROOT_URLCONF = 'MySite.urls'


2016-02-09 23:47 GMT-03:00 Bipul Raj :

> I remember doing the django tutorial long time back, it just works.
>
> The import error means that file polls/urls.py is not there. Check may be
> you have left "s" in ulrs. You might have created polls/url.py.
>
>
> On 10 February 2016 at 04:05,  wrote:
>
>> Hi,
>>
>> I am running into the same problem as this:
>>
>> http://stackoverflow.com/questions/30493018/404-error-in-writing-your-first-django-app-tutorial
>>
>> Now I can just follow the Alasdair's recommendation and delete the
>> polls/url.py file, but the tutorial is very clear about having two separate
>> urls.py. 
>> Is this a mistake in the tutorial?
>>
>> I even copied and pasted the tutorials code and tried to run it and it
>> still gave the same error:
>> *ImportError: No module named 'polls.urls'*
>>
>> Very confusing for a first step tutorial, maybe this could be corrected
>> if it is an issue?
>>
>> Kind Regards
>> 
>>
>> --
>> 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/44703fc1-518a-4a25-ae56-4a7b2992860a%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/CAHHn46SB%3Dhsx3pP5BBVVPmBbUb_eoiuzVGd5EwLVV8Djr7yVKw%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/CAHQaGTBiu5v23vn%2BT3W23eceH-%3D%3DGLJ2nw8jTPXef_YpVj%2B9RQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Writing your first Django app, part 1 - Can't Follow it

2016-02-09 Thread Thiago Reis
* 'Mysite.urls"

2016-02-09 23:54 GMT-03:00 Thiago Reis :

> I believe it is because your (MySite) is in upper case.
>
> ROOT_URLCONF = 'mysite.urls'
>
> must be:
>
> ROOT_URLCONF = 'MySite.urls'
>
>
> 2016-02-09 23:47 GMT-03:00 Bipul Raj :
>
>> I remember doing the django tutorial long time back, it just works.
>>
>> The import error means that file polls/urls.py is not there. Check may be
>> you have left "s" in ulrs. You might have created polls/url.py.
>>
>>
>> On 10 February 2016 at 04:05,  wrote:
>>
>>> Hi,
>>>
>>> I am running into the same problem as this:
>>>
>>> http://stackoverflow.com/questions/30493018/404-error-in-writing-your-first-django-app-tutorial
>>>
>>> Now I can just follow the Alasdair's recommendation and delete the
>>> polls/url.py file, but the tutorial is very clear about having two separate
>>> urls.py. 
>>> Is this a mistake in the tutorial?
>>>
>>> I even copied and pasted the tutorials code and tried to run it and it
>>> still gave the same error:
>>> *ImportError: No module named 'polls.urls'*
>>>
>>> Very confusing for a first step tutorial, maybe this could be corrected
>>> if it is an issue?
>>>
>>> Kind Regards
>>> 
>>>
>>> --
>>> 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/44703fc1-518a-4a25-ae56-4a7b2992860a%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/CAHHn46SB%3Dhsx3pP5BBVVPmBbUb_eoiuzVGd5EwLVV8Djr7yVKw%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/CAHQaGTAG036H1hnX8zYmU939UrOZxj09ksEErY2wR%3Dv18dz3nA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: mathematical function and django connect

2016-02-09 Thread Luis Zárate
I think you want to show  a form with a text input where the user could
insert some input eg. math equation to sent to the server. In the server
you what to get the input and use it in the standard input of your script,
in your script you made what you want (included input validation)  finally
the view sent to template the standard output of your script.


If it is something like that you need to used popen  to call your script or
used a linux pipe to connect programs or other approach if you script is in
Python

El martes, 9 de febrero de 2016, Xristos Xristoou 
escribió:
>
> THNX for response but that toturial not answer on my questions
> Τη Τρίτη, 9 Φεβρουαρίου 2016 - 9:47:30 μ.μ. UTC+2, ο χρήστης Xristos
Xristoou έγραψε:
>>
>> hello,
>>
>> i create some python mathematical function on python idle,
>> i want to create website where the user import value numbers on the
function
>> and take the results from that.
>> question one,how to connect my mathematical function on the django?
>> question two,how to connect input and output from the scipts in the
website ?
>> the second question i ask because input and output from the function is
a dynamic define from the user
>>
>>
> --
> 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/f42b86ac-3fc5-4336-b9f7-dc950d069702%40googlegroups.com
.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
"La utopía sirve para caminar" Fernando Birri

-- 
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/CAG%2B5VyNq-CFWnbLhp%2BCCD4oq527aS7_v-jEq3cNh7AO6O02Vmg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: ./manage.py runserver 0.0.0.0:8080 is not working, No module named django.core.management

2016-02-09 Thread John Travolta


On Tuesday, February 9, 2016 at 7:28:31 PM UTC+1, Daniel Roseman wrote:
>
>
> Django is installed for Python 3.4, but you're running the shell and 
> server in Python 2. Do `python3 manage.py ...`.
> --
> DR
>
>  
>

*thank you very much, it solved my problem. *
now I will make new topic, how to configfure apache to deploy python/django 
application... 

-- 
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/30178b4a-c1e5-4013-9ed0-536b88145a3a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.