CSRF token missing on file upload ajax request

2015-02-08 Thread G Z
hello, I have an ajax request that sends a file to django, it is saying that the csrf token is missing but i copied my other ajax request that are working. I'm sure it has something to do with trying to pass a file to upload. I get a 403 and csrf missing return. base.html

Best Practices Model Design

2015-01-30 Thread G Z
Hello, I'm in the design stages of a site that I'm building. It is going to be a basic social media site for a game I'm designing in unity. I'm not entirely sure how to do some of the things I want to in Django. Thus, my first question is generally best practices question as well as a how do

Re: Best Practices Django Questions

2015-01-30 Thread G Z
class User(models.Model): id = models.AutoField(primary_key=True) username = models.CharField(max_length=4000) password = models.CharField(max_length=4000) email = models.CharField(max_length=4000) phone = models.CharField(max_length=4000) profile_image = models.FileField()

Re: Best Practices Django Questions

2015-01-30 Thread G Z
class *User*(models.Model): id = models.*AutoField*(primary_key=True) username = models.CharField(max_length=4000) password = models.CharField(max_length=4000) email = models.CharField(max_length=4000) phone = models.CharField(max_length=4000) profile_image = models.FileField() about = mo

Best Practices Django Questions

2015-01-30 Thread G Z
Hello, I'm in the design stages of a site that I'm building. It is going to be a basic social media site for a game I'm designing in unity. I'm not entirely sure how to do some of the things I want to in Django. Thus, my first question is generally best practices question as well as a how do I

Re: Django and Ajax, Django not returning posted data.

2014-11-05 Thread G Z
updated my ajax to the following but for somereason it just says something went wrong $(document).ready(function() { $('#get_info').submit(function() { $.ajax({ type: "POST", url: "/vmstatus/", dataType: "json", async:

Re: Django and Ajax, Django not returning posted data.

2014-11-05 Thread G Z
Another note is I try to return posted data and out put it to the html for testing and that doesn't get returned either. -- 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 e

Django and Ajax, Django not returning posted data.

2014-11-05 Thread G Z
So I'm trying to write an ajax script that post data to django without having to leave the page. Currently it is on submit however eventually im going to put it on a timer. Right now the function outputs to the console as a success but no data is returned from django. Here is my ajax $(docu

How do I use a django join to select customer_name for every id that is returned in a result from a summary table?

2014-10-20 Thread G Z
I've been looking into django joins, and I can see how I can select related fields with .select_related but I can't seem to get it to work how I want. I basically have summary tables that are linked to the customers table with customer_id FK's, I want to select the customer name from the custome

Re: Decrypting Encrypted Customer Data from Django Queries Not Working, But Working with Regular DB Queries

2014-10-08 Thread G Z
I'll post some more on this later, I'll post comments and be more descriptive. On Wednesday, October 8, 2014 4:56:27 PM UTC-6, G Z wrote: > > I know exactly what my code is doing, and it works in just python > something django is doing is screwing it up. > > On Wednes

Re: Decrypting Encrypted Customer Data from Django Queries Not Working, But Working with Regular DB Queries

2014-10-08 Thread G Z
rting again from > scratch, comment/document as you go along, and then compare each step with > your working Python code to see where it's breaking. > > Cal > > On Wed, Oct 8, 2014 at 11:29 PM, G Z > > wrote: > >> How is encrypting at the application level wrong?

Re: Decrypting Encrypted Customer Data from Django Queries Not Working, But Working with Regular DB Queries

2014-10-08 Thread G Z
> Cal > > On Wed, Oct 8, 2014 at 11:11 PM, G Z > > wrote: > >> so I have a database of information with encrypted customer names. When I >> use a plain python script to decrypt the names it works correctly and >> decrypts all of the customer names. >> >

Decrypting Encrypted Customer Data from Django Queries Not Working, But Working with Regular DB Queries

2014-10-08 Thread G Z
so I have a database of information with encrypted customer names. When I use a plain python script to decrypt the names it works correctly and decrypts all of the customer names. However, when I used Django it will decrypt only one name and the remaining names will still be encrypted. I encry

Re: Django POST Arrays

2014-08-11 Thread G Z
Thanks so much On Thursday, August 7, 2014 4:38:28 PM UTC-6, Tom Evans wrote: > > On Thu, Aug 7, 2014 at 10:27 PM, G Z > > wrote: > > I'm doing some query and database stuff outside of what django is > capable of > > and I need some help with how I get all the

Django POST Arrays

2014-08-07 Thread G Z
I'm doing some query and database stuff outside of what django is capable of and I need some help with how I get all the values of a POSTED Dictionary list. here is the POST values because im using a multiple select box that are send to django u'licenses': [u'26.0', u'16.0', u'13.0', u'166.0']

Javascript loading while executing backend python query.

2014-08-04 Thread G Z
Hi I'm trying to write a loading script that displays a loading image while the django backend queries i have written are exectuting. This is to say i have some very complicated sql queries i call mannually with python by watching for specific post from the webpage to execute different queries.

Re: How do I get Django to ignore javascript code because its throwing an exception

2014-07-31 Thread G Z
sday, July 30, 2014 6:59:05 PM UTC-4:30, G Z wrote: >> >> so im using the following java script >> >> var cpuChart = document.getElementById('cpu').getContext('2d'); >> new Chart(cpuChart).Line(cpuData,{ >> bezierCurve: false,

How do I get Django to ignore javascript code because its throwing an exception

2014-07-30 Thread G Z
so im using the following java script var cpuChart = document.getElementById('cpu').getContext('2d'); new Chart(cpuChart).Line(cpuData,{ bezierCurve: false, datasetFill : false, legendTemplate : "-legend\"><% for (var i=0; i\"><%if(datasets[i].label){%><%=datasets[

Re: I don't understand whats wrong with the way im passing django list to json

2014-07-29 Thread G Z
etContext("2d"); window.myLine = new Chart(ctx).Line(lineChartData, { responsive: true }); } On Tuesday, July 29, 2014 9:47:40 AM UTC-6, G Z wrote: > > the values will show how, but i ran into another problem while trying to > input the labels, labels need to be strings so

Re: I don't understand whats wrong with the way im passing django list to json

2014-07-29 Thread G Z
the values will show how, but i ran into another problem while trying to input the labels, labels need to be strings so I input them as an array such as the following: ["2014-07-28 14:24:11", "2014-07-28 14:24:11"] I saved it as a simple json in django and pass it to the webbrowser and then con

Re: I don't understand whats wrong with the way im passing django list to json

2014-07-29 Thread G Z
["2014-07-28 14:24:11", "2014-07-28 14:24:11"] On Monday, July 28, 2014 5:10:50 PM UTC-6, G Z wrote: > > so I'm trying to display some vm performance data on javascript charts. It > needs the information as a list, I have tried passing a json list from > d

Re: I don't understand whats wrong with the way im passing django list to json

2014-07-29 Thread G Z
fixed it i was passing strings and not integers var randomScalingFactor = function(){ return Math.round(Math.random()*100)}; var lineChartData = { labels : ["1000","2000","3000","4000","5000","6000","7000", "8000", "9000", "1", "11000", "12000", "13000", "14000", "15000",], datasets : [ { l

Re: I don't understand whats wrong with the way im passing django list to json

2014-07-29 Thread G Z
> > Tom, I have done alot actually, I have put the data into a json array, a list, a tupple, a dictionary. I have tried the following: my data has been passed in every possible way I can think of. What I need to know how to do is convert a python list I pass with django to a javascript list b

I don't understand whats wrong with the way im passing django list to json

2014-07-28 Thread G Z
so I'm trying to display some vm performance data on javascript charts. It needs the information as a list, I have tried passing a json list from django and a django list like below in the javascript i ahve the one they tell me to use and the one im trying the one they tell me to use works obvi

Django/Python-ldap Ldap Question Adding Entries

2014-07-23 Thread G Z
I'm trying to add entries via a form post in django, I have the following code and its really not django specific but it is python-ldap specific. I'm trying to add entries with python ldap. I'm getting a naming convention error. My code is import ldap import ldap.modlist as modlist

Django and Python-Ldap with Active Directory Question

2014-07-17 Thread G Z
I'm using pure python-ldap to authenticate because django-auth-ldap doesn't work for some reason no matter how i tried it. settings.py AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'holon.backend.ActiveDirectoryBackend', ) backend.py import ldap from portal.

Re: Django Admin DB Error only when trying to delete an inserted record delete.

2014-07-17 Thread G Z
Thanks, I am unable to solve this issue but im running it down. On Thursday, July 17, 2014 10:46:08 AM UTC-6, Michiel Overtoom wrote: > > > On Jul 16, 2014, at 23:14, G Z wrote: > > > So I'm still running in to issues using a prexisting database, ive > worked ou

Re: Django Admin DB Error only when trying to delete an inserted record delete.

2014-07-16 Thread G Z
> > upon further investigation I found that inspectdb on the production > database only will output a models.py for the django tables, I need it to > output it for the entire schema like it did on the development database, > to prevent unessecary changes the premissions of the django user are r

Django Template Dir Question

2014-07-16 Thread G Z
My project structure goes *holon* * -holon* -settings.py -etc * -portal** -App name* * -static* css / images *-templates* -main site template files views.py urls.py etc * -templates* base.html

Re: Django Models PrimaryKey not incrimenting I dont understand this framework and the documentation is poorly written.

2014-07-16 Thread G Z
Percival/dp/1449364829/ > > Hope this helps > Frank > > > > Am 16.07.14 19:08, schrieb G Z: > > so I added a db trigger in oracle and it still said the same thing when > ever I tried to save the new addition. Also whenever I try to go to an > existing vm the manytomany f

Re: Django Models PrimaryKey not incrimenting I dont understand this framework and the documentation is poorly written.

2014-07-16 Thread G Z
so I added a db trigger in oracle and it still said the same thing when ever I tried to save the new addition. Also whenever I try to go to an existing vm the manytomany field throws an exception that table or view doesn't exist but when I goto add new it doesnt and the correct field is display

Re: Django Models PrimaryKey not incrimenting I dont understand this framework and the documentation is poorly written.

2014-07-15 Thread G Z
http://www.oracle.com/technetwork/articles/dsl/vasiliev-django-100257.html the guide I followed from oracle. On Tuesday, July 15, 2014 4:16:54 PM UTC-6, G Z wrote: > > Tom, > > It fails with both autofield and bigintergerfield > > class License(models.Model): >license_

Re: Django Models PrimaryKey not incrimenting I dont understand this framework and the documentation is poorly written.

2014-07-15 Thread G Z
insert NULL into ("DEV"."VM_LICENSES"."VM_LICENSE_ID") On Tuesday, July 15, 2014 4:09:29 PM UTC-6, Tom Evans wrote: > > On Tue, Jul 15, 2014 at 10:23 PM, G Z > > wrote: > > So I have a database that we are using to collect vm statistics. It

Re: Django Models PrimaryKey not incrimenting I dont understand this framework and the documentation is poorly written.

2014-07-15 Thread G Z
I can update items just not add them always the same error cannot insert null for the primary key -- 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-use

Django Models PrimaryKey not incrimenting I dont understand this framework and the documentation is poorly written.

2014-07-15 Thread G Z
So I have a database that we are using to collect vm statistics. It is always running and writing to a django database. I built my models file to resemble the db. However I have run into quite a few issues. I was wondering if anyone else has run into these issues and found out how to solve them.

Re: Django ManytoMany Relationships

2014-07-15 Thread G Z
Admin.py class vm_license_admin(admin.ModelAdmin): list_display = ('vm',) search_fields = ('vm__vm_name',) ordering = ('vm',) filter_horizontal = ('license',) admin.site.register(Vm_license, vm_license_admin) class License(models.Model): license_id = models.BigIntegerFie

Re: Django ManytoMany Relationships

2014-07-15 Thread G Z
y join table in the > database. If you are using an unmanaged database then you will need to > create the intermediary table yourself. See the ManyToMany field reference > <https://docs.djangoproject.com/en/dev/ref/models/fields/#manytomanyfield> > > On Tuesday, July 15, 2014

Django ManytoMany Relationships

2014-07-15 Thread G Z
I will start by saying I have an existing database, for the purpose of my question it has three tables: Vm Vm_licenses Licenses This database is per-existing before we decided to make a django web-portal. Basically licenses is a da

Re: Admin Page Customization Questions

2014-07-15 Thread G Z
Ive also tried class License(models.Model): license_id = models.BigIntegerField(primary_key = True, editable = False, db_column = 'license_id') license_authority = models.ForeignKey(License_authoritie, on_delete = models.PROTECT) product = models.CharField(max_length = 20) class

Admin Page Customization Questions

2014-07-15 Thread G Z
I have a few questions, is it possible to template the admin page? second I'm trying to customize some of the individuals pages for my particular issue I have a table named vm_licenses and a licenses table, I have my models set up l

how do i return an int as the returned object for admin panel

2014-07-14 Thread G Z
how do I fix this? class Vm_licenses(models.Model): vm_license_id = models.BigIntegerField(primary_key = True, editable = False, db_column = 'vm_license_id') license= models.ForeignKey(License, on_delete = models.PROTECT) vm= models.ForeignKey(Vm, on_delete = models.PROTECT) class

Django Models Issue with Oracle

2014-07-14 Thread G Z
I'm getting the following error while trying to access my licenses page from the admin panel. I have no idea why im getting the error. ORA-00904: "LICENSES"."CODE": invalid identifier Here is a describe of my current table: desc licenses Name

Re: Django Database Switching Issue

2014-07-14 Thread G Z
I solved it thanks for all your help though. On Monday, July 14, 2014 9:44:31 AM UTC-6, G Z wrote: > > Thomas, >> > > We are using an oracle database setup, we have a development database and > a production database, the production database is for billing. > The dat

Re: Django Database Switching Issue

2014-07-14 Thread G Z
> > Thomas, > We are using an oracle database setup, we have a development database and a production database, the production database is for billing. The databases have the sane TNS resolver name of DB1. To test that it was using the correct settings.py file I removed the database information

Re: Django Database Switching Issue

2014-07-11 Thread G Z
1/14 9:27 AM, G Z wrote: > > So I tracked down an issue, whenever I change my database from > > development to production which have the same exact schema > > it still uses the data from development although my settings.py file > > is set to the production database and it

Django Database Switching Issue

2014-07-11 Thread G Z
So I tracked down an issue, whenever I change my database from development to production which have the same exact schema it still uses the data from development although my settings.py file is set to the production database and it even swtiches the user I have to log in with to the one associat

Advanced Query / Django Idiocy Question

2014-07-10 Thread G Z
Hello, I'm running a very complicated query against oracle to return some data. I'm running it manually because django can't natively do what I am doing from what I have read. I run the query but django doesn't get any values in return. I recently switched from my dev database to my production

Re: How do I Iterate database object querysets

2014-06-24 Thread G Z
> > for lis in Licenses.objects.values('code'): > for post_value in insert_data: > if lis in post_value: > license_tag += insert_data[lis] + ',' > so im trying that now but the problem is django is causing issues when iteratin

Re: How do I Iterate database object querysets

2014-06-24 Thread G Z
> > > according to what ive found the following should work but it doesn't > for lis in licenses: if lis.Licenses in insert_data: license_tag += insert_data[lis] + ',' -- You received this message because you are subscribed to the Google Groups "Djan

How do I Iterate database object querysets

2014-06-24 Thread G Z
I am posting data from a page with a dynamic set of licenses, I'm using the license_name as they key for the post values, then im building a string from the posted values. However I can't figure out how to iterate through the database object set. There is no other way for what im doing because i

Referencing Django List Objects From Query Question

2014-06-24 Thread G Z
How do I call django objects from a query for example licenses = Licenses.objects.all() how I get my licenses, then im trying to loop through licenses for every object from licenses that exist in a post save something to vc. if insert == 'yes': insert_data = request.POST.copy()

Re: Django Post Issue

2014-06-20 Thread G Z
solved it item.customer_id was a int post needed to be passed as an int.. On Friday, June 20, 2014 12:14:18 PM UTC-6, G Z wrote: > > Thanks lol its one of those days, I notice i was calling the options the > name instead of the select. > > > this might be a django ism but after

Re: Django Post Issue

2014-06-20 Thread G Z
t; {%endfor%} > {%endif%} > {% endfor %} > > > > > {%endif%} > {% endfor %} > > > > Logout > {% else %} > You are not authenticated. > Login > {% endif %} On Friday, June 20, 2014 12:00:37 PM

Django Post Issue

2014-06-20 Thread G Z
I'm trying to post customer_id while generating a combo box with a loop from a database query. I have the combo box generating and such, but the posted data does not return the customer id. It returns something weird. > {% csrf_token %} > > {% for item in customer %} > {{ > item.customer_name

Re: Django Dying upon loop

2014-06-20 Thread G Z
shouldn't this work? After doing some more research into making django queries faster and more efficient I came across, http://tech.yipit.com/2013/01/20/making-django-orm-queries-faster/ I'm using thier method from what I understand you can selec_related to a primary key field and query like suc

Re: Django Dying upon loop

2014-06-20 Thread G Z
id] = data context = Context({'customer': query_results, 'vm_group': vm_group, 'vms': vms, 'customers':customers, }) return render(request, 'portal.html', context) On Friday, June 20, 2014 9:

Re: Django Dying upon loop

2014-06-20 Thread G Z
Sad part is I can do it in python well, I just can't seem to grasp the way django works i keep reading the damn documentation but I cant see any good examples relating to what I have to do. On Friday, June 20, 2014 5:10:10 AM UTC-6, Tom Evans wrote: > > On Fri, Jun 20, 2014 at 12

Django Dying upon loop

2014-06-19 Thread G Z
my django server dies whenever i login and access the following function: what is a better way to do what im doing. I need to loop through all of the vm_groups by customer id, and then loop through all of the vms and associate them with each other. The code below is what i have but its not worki

Advanced SQL Question

2014-06-19 Thread G Z
I have a multi-level database that uses concatenated foreign keys as primary keys for tables. For example we have three tables VMS VM_LICENSE LICENSES VMS has name license_id <- foreign key vm_id <-primary key vm_licenses has two concatenated fkeys to for a primary key of: licenses_id fkey

Django Forms.py issue with Model.py fields

2014-06-19 Thread G Z
I'm trying to write my forms.py class for editing customers but I'm getting some strange issues where it says the field is unknown but im typing it exactly how it is in the model. Forms.Py from portal.models import UserProfile, Customer > from django.contrib.auth.models import User > from djang

Re: Django View Questions

2014-06-19 Thread G Z
thansk I solved it.. On Thursday, June 19, 2014 11:02:21 AM UTC-6, G Z wrote: > > so I have a problem when ever I go to /manage/ it takes me to index and im > not sure why. > > Urls.py > url(r'^', views.IndexView.as_view(), name='index'), > url(r

Re: Django View Questions

2014-06-19 Thread G Z
I chagned it further and it is still not working from django.shortcuts import get_object_or_404, render from django.http import HttpResponseRedirect from django.contrib.auth import authenticate, login from django.contrib.auth.decorators import login_required from django.contrib.auth import logo

Re: Django View Questions

2014-06-19 Thread G Z
url(r'^$', views.IndexView.as_view(), name='index'), url(r'^register/$', views.register, name='register'), # ADD NEW PATTERN! is my new urls from django.shortcuts import get_object_or_404, render from django.http import HttpResponseRedirect from django.contrib.auth import authenticate,

Re: Django View Questions

2014-06-19 Thread G Z
if i comment out the urls for #url(r'^$', views.IndexView.as_view(), name='index'), it will give me an error that it cant find /manage Page not found (404)Request Method:GETRequest URL:http://127.0.0.1:8000/ Using the URLconf defined in holon.urls, Django tried these URL patterns, in this orde

Django View Questions

2014-06-19 Thread G Z
so I have a problem when ever I go to /manage/ it takes me to index and im not sure why. Urls.py url(r'^', views.IndexView.as_view(), name='index'), url(r'^manage/$', views.ManageView.as_view(), name='manage'), Views.py from django.shortcuts import get_object_or_404, render from django.http i

Re: Multiple Model Form Generation

2014-05-16 Thread G Z
I tried it it doesn't work because they keys don't associate when you click save. On Friday, May 16, 2014 2:25:06 PM UTC-6, G Z wrote: > > Does that work if they all have forignekey associations with each other? > > On Thursday, May 15, 2014 4:12:34 PM UTC-6, Brendan Edward

Re: Multiple Model Form Generation

2014-05-16 Thread G Z
Does that work if they all have forignekey associations with each other? On Thursday, May 15, 2014 4:12:34 PM UTC-6, Brendan Edwards wrote: > > Why not just do this? (Sorry for the crappy indentation.. tab doesn't work >> on here for some reason) >> >> models.py: >> >> >>> class SignUpForm(form

Importing Existing Oracle Databases

2014-05-16 Thread G Z
Hello, I've been looking online how to build a model in models.py of an existing outside database. We developed and application in python, and I need to import its data from an oracle database. However I tried this before by establishing the fields in models.py to what the database says and run

Re: Multiple Model Form Generation

2014-05-15 Thread G Z
> > so I changed it a bit after doing some more research however formb, and > formc don't display, if I change the 'formb' to 'form' it will overwrite > the first one and only display the second one. > This is how i read the forignekey associate between multiple forms to be. > from django.sho

Multiple Model Form Generation

2014-05-15 Thread G Z
I want to call three models into one form on my page but it doens't like the way that i am doing it. Any help would be awesome if i call them idividually it just displaces the last one i call. from django import forms from .models import Customer, Vms, Vmspecs class SignUpForm(forms.ModelForm

Re: csrf question

2014-05-15 Thread G Z
solved it from django.shortcuts import render from django.http import HttpResponse from vmware.models import Customer from django.shortcuts import render_to_response from vmware.models import Vms from .forms import SignUpForm from vmware.models import Vmspecs from django.views.decorators.csrf imp

Re: csrf question

2014-05-15 Thread G Z
documentation and its not working. I tried what you suggested removing the declaration no luck. On Thursday, May 15, 2014 8:12:33 AM UTC-6, donarb wrote: > > On Wednesday, May 14, 2014 11:35:46 PM UTC-7, G Z wrote: >> >> So I read the documentation on passing csrf tokens, how

Re: Django Form Question, Last Post Wasn't Formatted Correctly So I Deleted and Made a New One.

2014-05-14 Thread G Z
ender_to_response('index.html', ctx) > > On Wednesday, May 14, 2014 3:22:22 PM UTC-7, G Z wrote: >> >> def index(request): >> form = SignUpForm(request.POST or None) >> if form.is_valid(): >> save_it = form.save(co

csrf question

2014-05-14 Thread G Z
So I read the documentation on passing csrf tokens, however its giving me an issue i think its because im trying to pass it as a dictonary variable with my form and customers. This is from the documentation from django.views.decorators.csrf import csrf_protectfrom django.shortcuts import rende

Re: How do I post into database the input form form fields

2014-05-14 Thread G Z
https://www.youtube.com/watch?v=f0uZqPNijCw but im having issues displaying form.. On Wednesday, May 14, 2014 2:25:09 AM UTC-6, x_marine wrote: > > Hi, > > I have been working on a project that works with prefilled form fields in > html. > > I wonder how this can integrated into Django Models

Re: Django Form Question, Last Post Wasn't Formatted Correctly So I Deleted and Made a New One.

2014-05-14 Thread G Z
(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs) File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py" in render_to_string 171. context_instance.pop() Exception Type: TypeError at / Exception Value: pop expected at least 1 arguments, got 0 O

Re: Django Form Question, Last Post Wasn't Formatted Correctly So I Deleted and Made a New One.

2014-05-14 Thread G Z
> > how do i do that? > -- 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-u

Django Form Question, Last Post Wasn't Formatted Correctly So I Deleted and Made a New One.

2014-05-13 Thread G Z
> > Below is my code. I am trying to generate a customer signup form from the > Customer model in the models.py file. > Below I have created forms.py which is the script that will generate the form data based on what is in the models.py file. Then in views. I call that forms.py file to run and d

Re: Adding Forms with ModelForm and Writing Data

2014-05-13 Thread G Z
> > so I changed my code into 3 parts. If I understood the documentation right > this should create a form based on the Customer model in models.py and > display it on my index.html > *forms.py* from django import forms from .models import Customer class SignUpForm(forms.ModelForm):

Adding Forms with ModelForm and Writing Data

2014-05-13 Thread G Z
I'm trying to follow the documentation on using forms to save data tot he database. vmware is my app name. Nothing is showing up on my index page though. I'm not sure why can anyone help me the documentation isn't clear it bounces everywhere between two different methods without really defining

Re: Django Template Based If Statement Issue

2014-05-12 Thread G Z
> > ok its still not putting out the vm data i get Grant - google.com - 7029855378 - zuk...@gmail.com - 2332 oakland st - - {% for customer in customers %} {{ customer.NAME }} - {{ customer.WEBSITE }} - {{customer.PHONE}} - {{ customer.EMAIL }} - {{ customer.

Re: Django Template Based If Statement Issue

2014-05-12 Thread G Z
Evans wrote: > > On Mon, May 12, 2014 at 10:47 PM, G Z > > wrote: > > I'm just trying to associate each vm tied to the customers id and > display > > the vms under the customer that are associated with his id. > > > > Normally, you would have some

Re: Django Template Based If Statement Issue

2014-05-12 Thread G Z
also thank you so much for your help. On Monday, May 12, 2014 4:00:27 PM UTC-6, Tom Evans wrote: > > On Mon, May 12, 2014 at 10:47 PM, G Z > > wrote: > > I'm just trying to associate each vm tied to the customers id and > display > > the vms under the customer

Re: Django Template Based If Statement Issue

2014-05-12 Thread G Z
but i didn't quite understand waht the documentation was sayign On Monday, May 12, 2014 3:02:34 PM UTC-6, G Z wrote: > > Views.py > > > from django.shortcuts import render > from django.http import HttpResponse > from vmware.models import Customer >

Re: Django Template Based If Statement Issue

2014-05-12 Thread G Z
I'm just trying to associate each vm tied to the customers id and display the vms under the customer that are associated with his id. On Monday, May 12, 2014 3:02:34 PM UTC-6, G Z wrote: > > Views.py > > > from django.shortcuts import render > from django.http imp

Django Template Based If Statement Issue

2014-05-12 Thread G Z
Views.py from django.shortcuts import render from django.http import HttpResponse from vmware.models import Customer from django.shortcuts import render_to_response from vmware.models import Vms def index(request): customers = Customer.objects.all vms = Vms.objects.all

Re: Python Nested For Looping MultiTable Association Question

2014-05-08 Thread G Z
outside the if statement the data appears.. -- 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, sen

Re: Python Nested For Looping MultiTable Association Question

2014-05-08 Thread G Z
{% for e in customers %} {% for d in vms %} {% if e.id = d.CUSTOMERID %} {{ e.id }} - {{ e.NAME }} - {{ d.VMNAME }} {% endif %} {% endfor %} {% endfor %} why doesn't this work.? -- You rec

Re: Python Nested For Looping MultiTable Association Question

2014-05-07 Thread G Z
by the way if someone could help me understand what the docs are saying about doing this in views that would be awesome. On Wednesday, May 7, 2014 11:35:21 AM UTC-6, G Z wrote: > > I'm new to django so im assuming there is an easier way to do this but in > my html template im tr

Re: Python Nested For Looping MultiTable Association Question

2014-05-07 Thread G Z
ok so I added == to my if statement and independently verified that the values were displaying and are correct. So I was wrong though .id is not .CUSTOMERID because I returned self.name for the customer model it needs to match the strings so i have {% for e in customers %}

Re: Django Linking Multiple Mysql tables with unique identifiers

2014-05-07 Thread G Z
Thanks that worked. On Tuesday, May 6, 2014 11:34:51 AM UTC-6, G Z wrote: > > So I'm trying to set up my django app and I want to link multiple tables > each with a unique key identifier. To test this i have the following > models. py > > from django.db import models &

Re: Python Nested For Looping MultiTable Association Question

2014-05-07 Thread G Z
I read that but didn't quite get how to return the values the way I want.. On Wednesday, May 7, 2014 11:35:21 AM UTC-6, G Z wrote: > > I'm new to django so im assuming there is an easier way to do this but in > my html template im trying to do the following > > I have

Re: Python Nested For Looping MultiTable Association Question

2014-05-07 Thread G Z
out of my stupidity i refined it a bit {% for e in customers %} {% for d in vms %} {% if e.id = d.CUSTOMERID %} {{ e.id }} - {{ e.NAME }} - {{ d.VMNAME }} {% endif %} {% e

Re: Python Nested For Looping MultiTable Association Question

2014-05-07 Thread G Z
I don't know why this isn't working.. from django.shortcuts import render from django.http import HttpResponse from vmware.models import Customer from django.shortcuts import render_to_response from vmware.models import Vms def index(request): customers = Customer.objects.all vms

Python Nested For Looping MultiTable Association Question

2014-05-07 Thread G Z
I'm new to django so im assuming there is an easier way to do this but in my html template im trying to do the following I have a customer that has vmids associated with that and i want to match up every vm in the table vms by id to the vmids tag associated with the customer and display each on

Re: Django Linking Multiple Mysql tables with unique identifiers

2014-05-07 Thread G Z
Anyone? On Tuesday, May 6, 2014 11:34:51 AM UTC-6, G Z wrote: > > So I'm trying to set up my django app and I want to link multiple tables > each with a unique key identifier. To test this i have the following > models. py > > from django.db import models > > # Cre

Re: Detail View Question

2014-05-07 Thread G Z
Thanks so much that worked. On Tuesday, May 6, 2014 5:21:35 PM UTC-6, G Z wrote: > > So I'm using DetailView to associate a Customer ID with customer > information but due to my lack of knowledge im not entirely sure what the > issue is. It will go to the page but it won&

Re: Detail View Question

2014-05-06 Thread G Z
repost easier to read So I'm using DetailView to associate a Customer ID with customer information but due to my lack of knowledge im not entirely sure what the issue is. It will go to the page but it won't load the unique customer data. The data exist at domain/customers/ however when you cl

Detail View Question

2014-05-06 Thread G Z
So I'm using DetailView to associate a Customer ID with customer information but due to my lack of knowledge im not entirely sure what the issue is. It will go to the page but it won't load the unique customer data. The data exist at domain/customers/ however when you click the link which takes

Re: regex error?

2014-05-06 Thread G Z
ive also tried url(r'^customers/([0-9])/$', DetailView.as_view( model = Customer, template_name="customer.html")), -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group

  1   2   >