How to receive json data using HTTP POST request in Django 1.6?

2014-06-09 Thread Alok Singh Mahor
Hi all,

I am trying to receive JSON data using HTTP POST in django 1.6.
I tried using request.POST['data'], request.raw_post_data, request.body but 
none is working for me. 
I have posted question and code at 
http://stackoverflow.com/questions/24068576/how-to-receive-json-data-using-http-post-request-in-django-1-6

please tell me how to achieve this in django 1.6

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f09a72b2-c6a5-4af9-8d41-da585f82d7c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


2 model form with foreign key

2014-06-09 Thread Onur
below is the my 2 models 

Class Profile(models.MODEL):
   
  first_name = models.Charfield()
  last_name = models.Charfield()
  adress = . 

Class Reservation(models.MODEL):
   
   profile = models.ForeignKey(Profile)
   price = models.IntegerField()
   room = models.Charfield()


and I have 2 model form with both models, and my user interface includes 
all of above those fields,

so What kind of structure do I have to use,  multiple inheritence or just 
model form(Reservation),

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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/bb02f48f-47ab-4393-bf5c-11be9c1edfad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Question about moving code to product from local or development server.

2014-06-09 Thread Ilya Kazakevich
Hello,

There are a lot of ways to do that: from simple "rsync" or "checkout 
periodically with cron" (in both cases you need to move your settings to 
environment vars) to engines like Fabric. 
Even books are written: (http://continuousdelivery.com/) 


Ilya Kazakevich,
JetBrains PyCharm (Best Python/Django IDE)
http://www.jetbrains.com/pycharm/
"Develop with pleasure!"


>-Original Message-
>From: django-users@googlegroups.com
>[mailto:django-users@googlegroups.com] On Behalf Of Chen Xu
>Sent: Sunday, June 08, 2014 12:51 AM
>To: django-users@googlegroups.com
>Subject: Question about moving code to product from local or development
>server.
>
>I am building a django website, and wondering what is an easy way to move all 
>of
>my code to production, is there a tool for doing that, or maybe write my own
>script?
>
>
>Thanks
>
>--
>⚡ Chen Xu ⚡
>
>--
>You received this message because you are subscribed to the Google Groups
>"Django users" group.
>To unsubscribe from this group and stop receiving emails from it, send an 
>email to
>django-users+unsubscr...@googlegroups.com.
>To post to this group, send email to django-users@googlegroups.com.
>Visit this group at http://groups.google.com/group/django-users.
>To view this discussion on the web visit
>https://groups.google.com/d/msgid/django-users/CACac-qY8nbj6uiPyvkorvARAq
>Z%2Bej7rAty_CtdkHnz5bXBKBKQ%40mail.gmail.com
>qZ%2Bej7rAty_CtdkHnz5bXBKBKQ%40mail.gmail.com?utm_medium=email&ut
>m_source=footer> .
>For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/056d01cf83db%24869b12a0%2493d137e0%24%40JetBrains.com.
For more options, visit https://groups.google.com/d/optout.


Re: Anyone interested in reviewing code for a hobby project - BookMarker

2014-06-09 Thread shmengie


On Saturday, June 7, 2014 6:07:52 AM UTC-4, Aseem Bansal wrote:

>
> My main concern currently is that this project is turning out to have a 
> lot more jQuery than Python/HTML.  Am I designing this incorrectly? I 
> understand that as my requirements are mostly asynchronous so there is a 
> need for javascript but redundancy like hard-coding URLs for autocomplete 
> in javascript is bothering me. Also am I over-engineering the Javascript?
>
 

Can't say I delved real deep into your efforts.  My comments on your 
observations.

A lot of us like django because there's less code involved.

You can get around hard coding by rendering javascript (or some code 
segments) through the template engine.  

I find the simpler you keep javascript, the easier it is to maintain.  
Maybe HTML7 will encompass a new scripting language. ;)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a10dfc86-ee00-4cb2-b50e-353f0d8f834c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: UserProfile.user" must be a "User" instance. django-registration

2014-06-09 Thread 曾阿牛
I have the same problem.

Nikhil Verma於 2012年7月2日星期一UTC+8下午9時17分03秒寫道:
>
> HI All
>
> I am applying an django-registration in my app. So i create a UserProfile 
> Model and  a ModelForm after clicking on the email link
> the user is redirected to the ModelForm page of UserProfile. I am filling 
> the details and trying to save it, however i am getting the above error.
>
>
> Traceback:-
>
>
> Exception Type: ValueError at /myprofile/completingprofile/
> Exception Value: Cannot assign " object at 0x3487c10>": "UserProfile.user" must be a "User" instance.
>
>
> model
>
> class UserProfile(models.Model):
> user = models.ForeignKey(User, blank=True, null=True, unique=True)
> first_name = models.CharField(max_length=30)
> last_name = models.CharField(max_length=30, blank=True)
> gender = models.CharField(max_length=1, choices=GENDER_CHOICES)
> mobile = models.CharField(max_length=15, blank=True)
> primary_email = models.EmailField(max_length=60, blank=True)
>
> # For professional Account
> institution_name = 
> models.CharField(max_length=100,blank=True,null=True)
>
> street = models.CharField(max_length=75)
> state = models.CharField(max_length=30)
> zip_code = models.IntegerField(max_length=7, blank=True, null=True)
> country = models.CharField(max_length=30, blank=True)
> 
>
> def __unicode(self):
> name = self.first_name + self.last_name
> return name
>
>
> form.py
>
> class UserProfileForm(ModelForm):
> class Meta:
> model = UserProfile
> exclude = ('user',)
> 
> def __init__(self, *args, **kwargs):
> super(UserProfileForm, self).__init__(*args, **kwargs)
>
>
>
> views.py 
>
> def completingprofile(request):
> """
> Creating Profile
> """
> print request
> if request.method == "POST":
> 
> form = UserProfileForm(request.POST)
> if form.is_valid():
> userprofile_obj = UserProfile(
> first_name = form.cleaned_data['first_name'],
> last_name = 
> form.cleaned_data['last_name'],
> gender = form.cleaned_data['gender'],
> mobile = form.cleaned_data['mobile'],
> institution_name = form.cleaned_data['institution_name'],
> street = form.cleaned_data['street'],
> zip_code = form.cleaned_data['zip_code'],
> state = form.cleaned_data['state'],
> country = form.cleaned_data['country'],
> user = request.user,# here i am trying to add user from 
> request who is coming from RegistrationForm from django -registration
># I am getting the error in this above line  
> )
> userprofile_obj.save()
> logger.info("Save profile for user: %s" % request.user)
> 
> return HttpResponseRedirect('/thanks/')
> else:
> form = UserProfileForm()
> return render_to_response("myprofile/profile_page.html", 
> {"form": form },
> context_instance=RequestContext(request)
> )
>  
> How can i save the user field ?
>
>
> Thanks for help in advance
>
> -- 
> Regards
> Nikhil Verma
> +91-958-273-3156
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a116b9c8-09aa-451d-9090-05b2bbcc9a92%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


simplest solution to embed django server into an existing application.

2014-06-09 Thread Gelonida N

Hi,

I know, that ./manage.py runserver is not considered being secure.
In my context this doesn't matter.
What matters in my context is following:
- start a python process
- start at any time later on demand a web server
- this server shall serve django contents and shall have full read
  / write  access to main processes variables

I'd like to start one python process (an existing program I wrote quite 
some time ago and which I can't refactor easily. At the moment it just 
uses some Django ORMs, but serves no http requests).


For debugging reasons I'd like it to be able to start an embedded, 
unsecure web server on demand (can be single threaded. performance is 
not an issue), which has read / write access to the variables of my 
program (so it must not be started in a subprocess)


My first naive approach was starting the "runserver" command of the 
Django management commands.

This doesn't really work though.

Runserver seems to try to reexecute the entire python executable in 
another process. This causes problems as my code tries to access 
mutually exclusive resources (files, listening on sockets, . . . )


Does anyone have a suggestion of how to serve django contents from 
within one executable?


Would twisted be a solution? (serve django wsgi contents for http 
clients in a thread parallel to the main thread)? If yes does anyone 
have an example (only threads serving contents)


Do you have any other ideas / suggestions?

The solution should work for Linux and Windows and not require too many 
excotic packages / binaries to be installed.
(However if somebody knows a solution working only for one of the 
platforms I'd still be interested)


Thanks in advance for your ideas.



--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ln4okr%24nh7%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.


Re: newcomer to django testing

2014-06-09 Thread Andromeda Yelton
You can also add a depends_on statement to your south migrations, if you
really need them to run in a particular order:
http://south.readthedocs.org/en/latest/dependencies.html


On Sun, Jun 8, 2014 at 2:09 PM, monoBOT  wrote:

> Hi Esau.
>
> Funny to see you here ;.D
>
> I checked what you told me and its true ... if I try to create the
> database starting with the comunidad table it  raises the error but when
> starting the migrations with usuario it goes smooth.
>
> Simply changing the app order in the settings.py file fixed the problem ...
>
> Thanks mate
>
>
> 2014-06-08 15:39 GMT+01:00 Esau Rodriguez :
>
> The testing process creates  db itself when using south it migrate all
>> apps with migrations. Could you have a problem with your migrations
>> when run from zero?.
>>
>> Regards
>> Esau Rodriguez.
>>
>>
>>
>> On Sun, Jun 8, 2014 at 10:20 AM, monoBOT  wrote:
>> > Im new on testing ... to be honest its my first django test XD
>> >
>> > Now i wanted to test one of my applications and after the innitial
>> tweaking
>> > of allowing the django user to be able to create databases i get this
>> error:
>> >
>> > The error was: relation "usuario_usuario" does not exist
>> >
>> > Error in migration: comunidad:0001_initial
>> > Traceback (most recent call last):
>> >   File "manage.py", line 10, in 
>> > execute_from_command_line(sys.argv)
>> >   File
>> >
>> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py",
>> > line 399, in execute_from_command_line
>> > utility.execute()
>> >   File
>> >
>> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py",
>> > line 392, in execute
>> > self.fetch_command(subcommand).run_from_argv(self.argv)
>> >   File
>> >
>> "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/test.py",
>> > line 50, in run_from_argv
>> > super(Command, self).run_from_argv(argv)
>> >   File
>> > "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py",
>> > line 242, in run_from_argv
>> > self.execute(*args, **options.__dict__)
>> >   File
>> >
>> "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/test.py",
>> > line 71, in execute
>> > super(Command, self).execute(*args, **options)
>> >   File
>> > "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py",
>> > line 285, in execute
>> > output = self.handle(*args, **options)
>> >   File
>> >
>> "/home/monobot/.local/lib/python2.7/site-packages/south/management/commands/test.py",
>> > line 8, in handle
>> > super(Command, self).handle(*args, **kwargs)
>> >   File
>> >
>> "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/test.py",
>> > line 88, in handle
>> > failures = test_runner.run_tests(test_labels)
>> >   File "/usr/local/lib/python2.7/dist-packages/django/test/runner.py",
>> line
>> > 145, in run_tests
>> > old_config = self.setup_databases()
>> >   File "/usr/local/lib/python2.7/dist-packages/django/test/runner.py",
>> line
>> > 107, in setup_databases
>> > return setup_databases(self.verbosity, self.interactive, **kwargs)
>> >   File "/usr/local/lib/python2.7/dist-packages/django/test/runner.py",
>> line
>> > 279, in setup_databases
>> > verbosity, autoclobber=not interactive)
>> >   File
>> >
>> "/home/monobot/.local/lib/python2.7/site-packages/south/hacks/django_1_0.py",
>> > line 104, in wrapper
>> > return f(*args, **kwargs)
>> >   File
>> > "/usr/local/lib/python2.7/dist-packages/django/db/backends/creation.py",
>> > line 339, in create_test_db
>> > load_initial_data=False)
>> >   File
>> >
>> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py",
>> > line 159, in call_command
>> > return klass.execute(*args, **defaults)
>> >   File
>> > "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py",
>> > line 285, in execute
>> > output = self.handle(*args, **options)
>> >   File
>> > "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py",
>> > line 415, in handle
>> > return self.handle_noargs(**options)
>> >   File
>> >
>> "/home/monobot/.local/lib/python2.7/site-packages/south/management/commands/syncdb.py",
>> > line 103, in handle_noargs
>> > management.call_command('migrate', **options)
>> >   File
>> >
>> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py",
>> > line 159, in call_command
>> > return klass.execute(*args, **defaults)
>> >   File
>> > "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py",
>> > line 285, in execute
>> > output = self.handle(*args, **options)
>> >   File
>> >
>> "/home/monobot/.local/lib/python2.7/site-packages/south/management/commands/migrate.py",
>> > line 111, in handle
>> > ignore_ghosts = ignore_ghosts,
>> >   File
>> >
>> "/home/monobot/.local/lib/python2.7/site-packages/south/migration/__init__.py",
>> > line 220, in migrate_app
>> > success = migrator.migrate_many(target, wor

Re: HELP on unittest.loader.ModuleImportFailure

2014-06-09 Thread Kimitaka Nakazawa
Thank you again for your advice!
It worked:)

Kim


On Mon, Jun 9, 2014 at 1:42 PM, Kelvin Wong  wrote:

> Open this file
>
> /Users/kim/Desktop/Python/python3/superlists/lists/tests.py
>
> On line 3 change
>
> from superlists.lists.views import home_page
>
> to
>
> from lists.views import home_page
>
> For the future, check your paths with the following
>
> import sys; print(sys.path)
>
> K
>
>
>
> On Sunday, June 8, 2014 9:31:03 PM UTC-7, Kim wrote:
>
>> Thank you very much for the reply!
>>
>> Going through your suggestion below,
>> at ">>> from lists.tests import *” part, I got an error which is below.
>> Traceback (most recent call last):
>>   File "", line 1, in 
>>   File "/Users/kim/Desktop/Python/python3/superlists/lists/tests.py",
>> line 3, in 
>> from superlists.lists.views import home_page
>> ImportError: No module named lists.views
>>
>> The code of the manage.py file is:
>> #!/usr/bin/env python
>> import os
>> import sys
>>
>> if __name__ == "__main__":
>> os.environ.setdefault("DJANGO_SETTINGS_MODULE",
>> "superlists.settings")
>>
>> from django.core.management import execute_from_command_line
>>
>> execute_from_command_line(sys.argv)
>>
>> Kind regards,
>> Kim
>>
>>
>> On 2014年6月9日 at 12:11:44, Kelvin Wong (wong...@gmail.com) wrote:
>>
>>  Find out which versions you are using
>>
>> $ python --version
>> Python 2.7.6
>>
>> $ django-admin.py version
>> 1.4.10
>>
>> Try importing the lists app from the shell
>>
>> $ python manage.py shell
>>
>> Python 2.7.6 (default, Jan 13 2014, 04:26:18)
>> [GCC 4.2.1 (Apple Inc. build 5577)] on darwin
>> Type "help", "copyright", "credits" or "license" for more information.
>> (InteractiveConsole)
>> >>> import lists
>> >>> lists.__file__
>> '/users/you/superlists/lists/__init__.py'
>> >>> from lists.tests import *
>> >>>
>>
>> If you see all that, run the lists app explicitly by label
>>
>> $ python manage.py test lists
>>
>> If that doesn't work, maybe there is something weird in your manage.py
>> messing the paths. Paste it.
>>
>> K
>>
>>
>> On Sunday, June 8, 2014 7:43:43 PM UTC-7, Kim wrote:
>>>
>>> Hi Kelvin,
>>>
>>> Thank you very much for your reply!
>>> I tried your codes above but I still get the same error...
>>>
>>> Kind regards,
>>> Kim
>>>
>>>
>>> On Mon, Jun 9, 2014 at 3:33 AM, Kelvin Wong  wrote:
>>>
  You need to be in the first superlists directory. You have a
 db created so you must have run syncdb at some point. Go back to that
 folder:

 $ pwd
 /home/you/superlists

 $ ls
 __init__.py   db.sqlite3superlistslistsmanage.py

 $ ls lists/tests.py
 lists/tests.py

 $ python manage.py test

 Creating test database for alias 'default'...
  ...etc...



 On Saturday, June 7, 2014 2:00:39 AM UTC-7, Kim wrote:
>
> Hi,
>
> I started learning Django and am using "Test Driven Web Development
> with Python" book.
>
>  On page 21, the book mentions to test using lists/tests.py.
> The book uses the code:
> $ python3 manage.py test
> to run the test.
>
> However, the manage.py file sits in the upper superlists folder and
> the tests.py sits in lists folder.
> I keep getting an error message saying "ImportError: No module named
> lists.tests”.
>
> Could someone help me figure this out?
>
>  My Django project directory looks like below.
>
> superlists
>db.sqlite3
>   functional_test.py
>   manage.py
>lists
> __init__.py
> admin.py
> models.py
> tests.py
> views.py
>   superlists
> __init__.py
> settings.py
> urls.py
> wsgi.py
> __init__.py
>
>  The error message is below:
>
>  $ python manage.py test
> Creating test database for alias 'default'...
> E
>  
> ==
> ERROR: superlists.lists.tests (unittest.loader.ModuleImportFailure)
>  
> --
> ImportError: Failed to import test module: superlists.lists.tests
> Traceback (most recent call last):
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py",
> line 254, in _find_tests
> module = self._get_module_from_name(name)
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py",
> line 232, in _get_module_from_name
> __import__(name)
> ImportError: No module named lists.tests
>
>
>  
> --
> Ran 1 test in 0.000s
>
> FAILED (errors=1)
> Destroying test database for alias 'default'...
>
   --
 You received this message because you are subscribed to the Google
 Groups "Django users" group.
 To

Re: Running a test from other folder using manage.py

2014-06-09 Thread Kimitaka Nakazawa
Hi Jimish,

Thank you for the advice.
I figured that
$ python manage.py test.views
worked for me:)

Kind regards,
Kim



On Mon, Jun 9, 2014 at 1:11 PM, Jimish Parekh  wrote:

> Hi,
> Try running
> python manage.py test lists.tests
>
> and see if tests are running or not.
>
> Thanks,
>
>
> On Sunday, June 8, 2014 6:18:45 PM UTC+5:30, Kim wrote:
>>
>> Hi everyone,
>>
>> I have a question on unit tests.
>> I have manage.py file placed in the upper superlists folder and the
>> tests.py placed in lists folder.
>> I keep getting an error message saying "ImportError: No module named
>> lists.tests”.
>>
>> Would anyone know how to access a test file from other folder using
>> manage.py?
>>
>> My Django project directory looks like below.
>>
>> superlists
>>   db.sqlite3
>>   functional_test.py
>>   manage.py
>>   lists
>> __init__.py
>> admin.py
>> models.py
>> tests.py
>> views.py
>>   superlists
>> __init__.py
>> settings.py
>> urls.py
>> wsgi.py
>> __init__.py
>>
>> The error message is below:
>>
>> $ python manage.py test
>> Creating test database for alias 'default'...
>> E
>> ==
>> ERROR: superlists.lists.tests (unittest.loader.ModuleImportFailure)
>> --
>> ImportError: Failed to import test module: superlists.lists.tests
>> Traceback (most recent call last):
>>   File 
>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py",
>> line 254, in _find_tests
>> module = self._get_module_from_name(name)
>>   File 
>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py",
>> line 232, in _get_module_from_name
>> __import__(name)
>> ImportError: No module named lists.tests
>>
>>
>> --
>> Ran 1 test in 0.000s
>>
>> FAILED (errors=1)
>> Destroying test database for alias 'default'...
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/8624ab0f-c7c8-4e14-8397-06bba9e896e0%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAN6%3DZ4K0CCpUQY6d2qKcm9hTbhpVL42F%3D8TNnBmSVWa7Y1Hz_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Can't get MySQLdb

2014-06-09 Thread Alan Sawyer
Please excuse me if this is a dumb question, but I've been stuck on this 
for about 3 hours, and getting a bit frustrated
I am a noob to Django/Python.   I am trying to get this setup on Windows 7 
laptop.

I installed Python 3.4 but have also tried 3.3
I then installed Pip
I then installed Django 1.6.5 though have also tried 1.6

I also installed the MySQL/Python 1.2.2 connector, though I had to use the 
Generic .py version because the Windows one is not a zip like it states in 
the documentation, but an msi and it doesn't seem to work.

I generated an application, and changed the settings.py to point to my 
local MySQL server.

I can create a test.py that just connects to my database and that seems to 
work.

Now I already have quite a extensive database that I want to use in DJango, 
so I am trying
python manage.py inspectdb
but it is telling me that I don't have a module called mysqldb

I just want to get it going so I don't care if I have the latest versions 
of everything but I must be missing something in the instructions or 
something because I'm sure I'm not the only person in the world wanting to 
do this.

Thanks for any help anyone is willing to give.

A Sawyer

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/df9b452b-5767-4916-b7bc-861fe9e9438e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Can't get MySQLdb

2014-06-09 Thread Kelvin Wong
You better check that the MySQL connector actually runs on Py3. I recall 
reading that it does not run on Py3.

I don't use MySQL with Django though. Maybe someone else familiar has 
better info.

Try to import it from the shell.

K

On Monday, June 9, 2014 5:38:13 PM UTC-7, Alan Sawyer wrote:
>
> Please excuse me if this is a dumb question, but I've been stuck on this 
> for about 3 hours, and getting a bit frustrated
> I am a noob to Django/Python.   I am trying to get this setup on Windows 7 
> laptop.
>
> I installed Python 3.4 but have also tried 3.3
> I then installed Pip
> I then installed Django 1.6.5 though have also tried 1.6
>
> I also installed the MySQL/Python 1.2.2 connector, though I had to use the 
> Generic .py version because the Windows one is not a zip like it states in 
> the documentation, but an msi and it doesn't seem to work.
>
> I generated an application, and changed the settings.py to point to my 
> local MySQL server.
>
> I can create a test.py that just connects to my database and that seems to 
> work.
>
> Now I already have quite a extensive database that I want to use in 
> DJango, so I am trying
> python manage.py inspectdb
> but it is telling me that I don't have a module called mysqldb
>
> I just want to get it going so I don't care if I have the latest versions 
> of everything but I must be missing something in the instructions or 
> something because I'm sure I'm not the only person in the world wanting to 
> do this.
>
> Thanks for any help anyone is willing to give.
>
> A Sawyer
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/48ed7944-66fb-4541-9d73-8e8ffb698746%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Can't get MySQLdb

2014-06-09 Thread Jorge Andrés Vergara Ebratt
MySQLdb module doesn't work in Django 3.X since you installed MySQL
connector for Python, or at least I think you did, you need to read on
their documentation to see what you need to do to make it work with Django


2014-06-09 20:57 GMT-05:00 Kelvin Wong :

> You better check that the MySQL connector actually runs on Py3. I recall
> reading that it does not run on Py3.
>
> I don't use MySQL with Django though. Maybe someone else familiar has
> better info.
>
> Try to import it from the shell.
>
> K
>
> On Monday, June 9, 2014 5:38:13 PM UTC-7, Alan Sawyer wrote:
>>
>> Please excuse me if this is a dumb question, but I've been stuck on this
>> for about 3 hours, and getting a bit frustrated
>> I am a noob to Django/Python.   I am trying to get this setup on Windows
>> 7 laptop.
>>
>> I installed Python 3.4 but have also tried 3.3
>> I then installed Pip
>> I then installed Django 1.6.5 though have also tried 1.6
>>
>> I also installed the MySQL/Python 1.2.2 connector, though I had to use
>> the Generic .py version because the Windows one is not a zip like it states
>> in the documentation, but an msi and it doesn't seem to work.
>>
>> I generated an application, and changed the settings.py to point to my
>> local MySQL server.
>>
>> I can create a test.py that just connects to my database and that seems
>> to work.
>>
>> Now I already have quite a extensive database that I want to use in
>> DJango, so I am trying
>> python manage.py inspectdb
>> but it is telling me that I don't have a module called mysqldb
>>
>> I just want to get it going so I don't care if I have the latest versions
>> of everything but I must be missing something in the instructions or
>> something because I'm sure I'm not the only person in the world wanting to
>> do this.
>>
>> Thanks for any help anyone is willing to give.
>>
>> A Sawyer
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/48ed7944-66fb-4541-9d73-8e8ffb698746%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*Jorge Andres Vergara Ebratt*
*#SoftwareDeveloper (Or at least trying to be)*
*@javebratt*
*facebook.com/javebratt *

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAAeX05EpFttmtT1Eg2LAHqM0UJ%2Bx-%2BjMUna0tq1rBdf8y8e0-w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.