Re: If any one have experience with Django treebeard package

2018-07-08 Thread 'Kristofer Pettijohn' via Django users
object.add_child(...) From: "pranay reddy" To: "django-users" Sent: Friday, July 6, 2018 6:12:44 AM Subject: If any one have experience with Django treebeard package Plz expalin how to add child for sibling Sent via the [ http://play.google.com/store/apps/details?id=com.blackberry.hub

Re: Doubts about static files

2017-08-30 Thread 'Kristofer Pettijohn' via Django users
Point Apache at static_root. Django apps you install may also include static files, and "collectstatic" gathers all of those together and puts them in one place (under STATIC_ROOT). From: "sarfaraz ahmed" To: "Django users" Sent: Wednesday, August 30, 2017 8:58:05 AM Subject: Doubts abou

Re: Stripe Not Returning Token (test mode)

2016-06-18 Thread Kristofer Pettijohn
your form? I read somewhere on stackoverflow that Stripe Checkout wouldn't accept the csrf token? Thanks again, Kristofen. On Fri, Jun 17, 2016 at 4:49 PM, Kristofer Pettijohn < kristo...@cybernetik.net > wrote: This is how I did it. This is using Stripe Checkout. forms.py ... (

Re: Stripe Not Returning Token (test mode)

2016-06-17 Thread Kristofer Pettijohn
This is how I did it. This is using Stripe Checkout. forms.py ... (you can omit the address pieces if you don't need them) class StripeForm(forms.Form): stripeToken = forms.CharField(max_length=80) stripeBillingName = forms.CharField(max_length=80, required=False) stripeBillingAddressLine1 =

Re: Django 1.9.5 Cookies. how can I set and display them?

2016-05-05 Thread Kristofer Pettijohn
I recommend looking at the Django documentation. You set cookies via request.session.set(). And you typically do not modify the response value returned from HttpResponse() unless you are doing more advanced things. For example (straight from the docs): def post_comment(request, new_comment):

Re: url redirect with kwargs no NoReverseMatch

2016-04-05 Thread Kristofer Pettijohn
You need to name your URLs: https://docs.djangoproject.com/es/1.9/topics/http/urls/#naming-url-patterns urlpatterns = [ url(r'^doll/$', views.doll_describer), url(r'^yourdolldata/(?P\d+)/$', views.yourDollData, name='yourDollData' ), url(r'^connexion/$', views.connexion), url(r'^logout/$',

Re: Django + Nginx + X-Accel-Redirect

2016-03-31 Thread Kristofer Pettijohn
Try changing file_url to be relative: file_url = '/media/users/avatar.png' Also check the nginx error log to make sure the path is being constructed properly by nginx. From: "Neto" To: "Django users" Sent: Thursday, March 31, 2016 11:04:07 AM Subject: Django + Nginx + X-Accel-Redirect

Re: Migrating older 1.4 project to 1.9

2016-03-30 Thread Kristofer Pettijohn
I have also upgraded a few apps this way, from 1.5 to 1.9. Keep your eyes on the release notes for each version for big changes. It also helps to have good test cases written so that you can run them upon each upgrade. From: "Gergely Polonkai" To: "Django users" Sent: Wednesday, March 30,

Re: What am I supposed to do if I want a Wizard?

2015-12-09 Thread Kristofer Pettijohn
stro" To: django-users@googlegroups.com Sent: Wednesday, December 9, 2015 4:30:08 PM Subject: Re: What am I supposed to do if I want a Wizard? Thank you, Kristofer. It's interesting. I'm looking right now. It seems complex, but I will investigate, although I would prefer a m

Re: What am I supposed to do if I want a Wizard?

2015-12-09 Thread Kristofer Pettijohn
I sdid my own form wizard for a project I worked on. For a good example, you can look at Oscar Ecommerce in github, and look at their checkout app within the code. That may inspire you with some ideas on how to implement such a behavior. From: "Martin Torre Castro" To: "Django users" Sent

Re: Login in all pages

2015-02-05 Thread Kristofer Pettijohn
I think the login decorator may give you what you are trying to do in a much easier way: https://docs.djangoproject.com/en/1.7/topics/auth/default/#limiting-access-to-logged-in-users Unless I am not understanding your issue. From: "Juan Diego Gonzalez" To: django-users@googlegroups.com S

Re: Why using admin.py in apps?

2015-01-25 Thread Kristofer Pettijohn
Your admin.py is specific to each app, on how you want the models for your app to show up (or not show up) in the admin page. Each app's admin.py will be unique to the models specific in that app. The tutorial in the Django documentation shows a good example. From: "Aliane Abdelouahab" To

Re: Recommendations for hosting service?

2015-01-06 Thread Kristofer Pettijohn
Also +1 for AWS. You can start out small for free for your first year, and grow to the size of Pinterest over time. All of the other tools they provide are helpful as well: RDS so you don't have to manage your own database, Caching Service, Queuing Service, etc. From: "Fred Stluka" To: djan

Re: Change keys in values dictionary.

2015-01-03 Thread Kristofer Pettijohn
This is a feature request that didn't make it into 1.7: https://code.djangoproject.com/ticket/16735 From: "Lee Hinde" To: django-users@googlegroups.com Sent: Friday, January 2, 2015 7:34:59 PM Subject: Change keys in values dictionary. If I do a query: messages = Recipient.objects.fil

Re: Bulk add foreign keys in admin interface

2013-10-27 Thread Kristofer Pettijohn
thy W. Cook wrote: > > Yes it is possible and quite easy to do. Take a look at > https://docs.djangoproject.com/en/1.6/ref/contrib/admin/actions/ > > Cheers, > Tim > > > On Sat, Oct 26, 2013 at 12:17 AM, Kristofer Pettijohn < > kris...@cybernetik.net > wrote: &g

Bulk add foreign keys in admin interface

2013-10-25 Thread Kristofer Pettijohn
I am using the following type of model setup: class Product(models.Model): name = models.CharField(max_length=40) description = models.TextField(blank=True) active = models.BooleanField(default=True) priority = models.IntegerField(default=100) size_chart = models.ForeignKey(SizeChart) desig

Foreign key to different model types

2013-08-17 Thread Kristofer
Hello, I remember seeing this some time ago, but can't remember what it is called or where it is in the documentation. I am looking for the feature that allows for a field to reference a key in multiple tables. For example, lets say I have several models: User, Address, Message. Each of these

Re: Form validation

2013-01-11 Thread Kristofer
27;m not sure where else I can access the required form steps and also be able to raise a validation error. - Original Message - From: "Babatunde Akinyanmi" To: "Kristofer" , django-users@googlegroups.com Sent: Friday, January 11, 2013 8:05:59 AM Subject: RE

Form validation

2013-01-10 Thread Kristofer
Hello, I am using FormWizard with a 12-step form. On step 6, I want to perform verification on a field but it depends on fields that were entered in steps 2-5. I cannot figure out how to get data from the previous steps in the form validation for step 6. Where is a point in the FormWizard

Re: Admin and ForeignKey

2013-01-09 Thread Kristofer
ginal Message - From: "Kristofer" To: django-users@googlegroups.com Sent: Wednesday, January 9, 2013 12:49:28 AM Subject: Admin and ForeignKey Hello, I have three models, defined like the following (code below simplified): class Shirt(Model): sku = CharField() descript

Admin and ForeignKey

2013-01-08 Thread Kristofer
Hello, I have three models, defined like the following (code below simplified): class Shirt(Model): sku = CharField() description = CharField() class Color(Model) name = CharField() shirt = ForeignKey(Shirt) price = Decimal() class Order(Model) shirt = ForeignKey(Shirt) color = Forei

FormWizard - Sesssions

2013-01-04 Thread Kristofer
Hello, I am using FormWizard with SessionWizardView. The form is working as expected by using the submit or previous buttons, but if the user goes to a different link on the site, and then back to where the form was, the form starts out fresh. I have verified with Developer Tools that the br

Django Praise: vs CakePHP

2013-01-03 Thread Kristofer
I just wanted to drop a little praise to everyone who has contributed to Django over the years. I worked on a project about a year ago, and did it exclusively in CakePHP. I can't go into too many details about what the project is due to privacy concerns, but it revolved around customer self-se

Queries to multiple tables

2012-11-09 Thread Kristofer
Hello, I'm new to Django and trying to learn it by making a simple budget/checkbook application. I apologize for my ignorance, but I couldn't seem to find an answer to this on Google or the Django docs from my searches. I want to create a function that will take a bank account as an id numb

Re: Specific models without a database table

2011-08-21 Thread Kristofer Pettijohn
> That is substantially harder, but could be possible. The main problem is that > the Django ORM will want to write SQL queries when there's a link to the > EmailAccount model. > > Your best bet is probably a proxy model that contains a reference to the > relevant API record (e.g. the email add

Re: Specific models without a database table

2011-08-21 Thread Kristofer Pettijohn
ogether with managed=True. You may still face some issues, however I think this should be possible. Cheers, Filip On 20 srp, 12:51, Malcolm Box wrote: > On 20 August 2011 02:33, Kristofer Pettijohn wrote: > > > Hello, > > > Is it possible to create specific models without a da

Specific models without a database table

2011-08-19 Thread Kristofer Pettijohn
Hello, Is it possible to create specific models without a database table? Basically what I would like to do is create an email account management application that ties into my existing mail server and its API. I would like Django to have a Users model and keep track of users, a Domains model