Hi Pankaj,
I tested the code at it works perfectly. Thanks again!
I have one question out of curiosity (I don't need this for this
project). When a ticketitem is deleted, def save_formset is called, but
no instance is made, hence an error message "instance referenced before
assignment"
What
Could someone please point out my mistake?
def clean_out(self):
child_lst = list(Child.objects.filter(master=self.master,
tags=self.mark))
for child in child_lst:
child.delete()
child_lst = list(Child.objects.f
Yes, I've (a long time ago though so package may be much better now) but
it doesn't give exactly what I need.
Afaik object-permission works reverse what I need - it adds spesific
permissions to groups/users to single object. But I need to check
(mostly through foreign keys and/or spatial relat
hi,
i use point 1, not include the migration.
when first time deploy just init migration.
if db schema change just do the schemamigration and migrate command in
production when deploy the change. if you include in in prod, how about south
db content? how you sync it with production site?
why yo
I also have a javascript file, but I'm not quite sure what to out in
it..
function gpio_submit(){
$("#gpio_results").load("/control_page");
return false;
}
$(document).ready(function () {
$("#gpio_form").submit(gpio_submit);
});
On Monday, February 4, 2013 11:12:27 PM UTC-5, 7
I'm controlling the GPIO pins on a raspberryPi that is running a Django web
app. I have a form with only one button that is "On" or "off", it writes
this to a database. The Button's value has to display the current status
"On" or"off".
So I need to be able to update the value of the button in th
If the targets are all within your Django project, then you write a view
which parses out the subdomain, resolves the correct view function, and
then passes the request on to that view. Something like:
from django.core.urlresolvers import resolve
def rewrite(request):
subdomain = request.META[
Have you had a look at this 3rd-party package?
http://pypi.python.org/pypi/django-object-permissions
_Nik
On 2/4/2013 4:59 AM, Jani Tiainen wrote:
> Hi all,
>
> I've in need of implementing (rather complex) object level permissions.
>
> I've difficulties to determine how to proceed.
>
> Let's ass
I don't see the point of #1 either. It would work well for your first
deployment to production, but what happens when you change the database
schema after that? You can run initial migrations, because many of the
tables already exists. Its the reason South exists in the first place.
So I agree wit
Thank you, I can't tell you how long I struggled with this.
On Monday, February 4, 2013 1:48:37 PM UTC-5, frocco wrote:
>
> I am getting NoReverseMatch at /my_account/
> what is wrong with my urls?
> Thanks
>
> Reverse for 'order_info' with arguments '()' and keyword arguments '{}' not
> found.
>
(r'^my_account/$', include('accounts.urls')),
here you should remove the $ sign because it closes the expression there;
if you want my_account/blahblah like urls, you shouldn't use the dollar
sign like:
(r'^my_account/', include('accounts.urls')),
On Mon, Feb 4, 2013 at 8:49 PM, frocco wrote:
On 4/02/2013 8:07pm, m1chael wrote:
I'll admit that i'm a bit old-school and most people are going to
cringe at seeing this,
I would set a DB trigger with the raw logic
I hadn't thought of that but I think it would be my last resort. I'd
like to keep all the logic in one place. The answer has
Anyone? Please?
El viernes, 1 de febrero de 2013 19:43:24 UTC-3, Pedro J. Aramburu escribió:
>
> Dear Djangonauts,
> I'm in a bit of a pickle here and I would appreciate your help. I have a
> model which needs multiple dates. I thought on serializing them onto a
> TextField but it isn't pretty a
Thank you
On Sunday, February 3, 2013 1:04:15 PM UTC-5, frocco wrote:
>
> Hello,
>
> In my settings.py
> import django.conf.global_settings as DEFAULT_SETTINGS
> TEMPLATE_CONTEXT_PROCESSORS = DEFAULT_SETTINGS.TEMPLATE_CONTEXT_PROCESSORS
> + (
> 'utils.context_processors.eStore',
> )
>
> in my
My template has Edit Billing/Shipping
Information
On Monday, February 4, 2013 1:48:37 PM UTC-5, frocco wrote:
>
> I am getting NoReverseMatch at /my_account/
> what is wrong with my urls?
> Thanks
>
> Reverse for 'order_info' with arguments '()' and keyword arguments '{}' not
> found.
>
> main u
I am getting NoReverseMatch at /my_account/
what is wrong with my urls?
Thanks
Reverse for 'order_info' with arguments '()' and keyword arguments '{}' not
found.
main urls.py
(r'^my_account/$', include('accounts.urls')),
accounts/urls.py
urlpatterns = patterns('accounts.views',
(r'^$', '
I apologize in advance if there is an obvious answer this. I'm totally new
to Django and still trying to figure things out.
We have a large set of data that will come in through Django - error
reports from our product.
What I'd like to have in the admin is that rather than showing all the
erro
Yes, save_formset() has only those instances whose fields were changed.
Sincerely,
Pankaj Singh
http://about.me/psjinx
On Mon, Feb 4, 2013 at 10:46 PM, Rob van Dam wrote:
> Hi Pankaj,
>
> Thank you so much You have saved my day :-) I will be able to test it
> tomorrow, and I will let you kn
I've read two distinct points on the matter:
1) Don't push migrations to production. Instead, delete all migrations and
run a single "--initial" migration, and push that to production. That way
you keep production clean and free of the clutter from past schema mistakes
and changes.
2) Push all mi
Please I would like to know if it's advisable to push South migration
folder in development environment to git repo before cloning it from
repo to production server. Or one should delete the South migration
folder and push to git repo. Hope you get my point?
--
You received this message because
On Sun, 2013-02-03 at 10:04 -0800, frocco wrote:
> from catalog.models import Category
It is probably this line. Maybe there is no __init__.py file in the
catalog directory?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from th
Hi Pankaj,
Thank you so much You have saved my day :-) I will be able to test
it tomorrow, and I will let you know if it worked.
I tested all my previous attempts saving an existing item in Admin. But
when nothing is changed in the admin form, def save_formset is not
called..
Regar
Hey Rob,
I tested following code and it works.
models.py
from django.db import models
# Create your models here.
class Ticket(models.Model):
ticketnumber = models.IntegerField()
total_amount = models.DecimalField(max_digits=7, decimal_places=2,
blank=True)
def update_total_am
By setting "initial" on a field, you are not changing the list of available
options. Setting the initial like this determines which of all the
locations are selected when the form is shown for the first time. The
default would be to select the location for the event, but you are
overriding that
Hi Pankaj,
I have tried many things today, but unfortunately I cannot get anything
working :-( Can you give me a bit more information on this issue? Any
hint would be highly appreciated!
I cannot get anything saved in the database. For testing I made this
setup (added ordernumber to the Tick
I return initial on the method on my code,
I forgot to include it in the example.
I just repast to make sure it's clear
class EventCreate(CreateView):
model = Event
def get_initial(self):
initial = super(EventCreate, self).get_initial()
initial['loca
Hi this is example the fabfile.py the projects is mezzanine is CMS. this is
a complete example to deploys automatically django projects use
nginx,gunicorn,supervisord
https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/project_template/fabfile.py
cheers
On Sun, Feb 3, 2013 at 3:31 AM,
I've got the same problem guys, did you figure it out?
On Wednesday, May 2, 2012 6:10:08 AM UTC-3, Simon Bächler wrote:
>
> Yes, exactly the same here. Even creating the table in setUp doesn't help.
>
> Regards
> Simon
>
>
>> Did anybody experience something similar?
>>
>> Cheers,
>> Flo
>
>
--
You need to return initial from the method.
--
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
Dear all,
I'm using generic edit view to create my form, building the form from a
ModelForm.
Take a look of this quick example code:
class Event(models.Model)
location = models.ForeignKey(Location)
class EventCreate(CreateView):
model = Event
def get_initial(
I agree - it looks great. What are the options for integration into the
admin? It would be very useful for users to be able to edit single items
in the change list.
On Friday, 1 February 2013 16:17:39 UTC+2, h3 wrote:
>
> > Looks pretty cool, and maybe this is just my naivety at work, but how
Hi all,
I've in need of implementing (rather complex) object level permissions.
I've difficulties to determine how to proceed.
Let's assume that I've following models:
class Building(...):
name = models.TextField(max_length=100)
class Apartment(...):
name = models.TextField(ma
On Sat, Feb 2, 2013, nYmo wrote:
>I'm new to django and also python but have already some programming
>experience. I'm currently creating my first application in django and get
>stucked because I'm looking for the best way to resize uploaded images.
>I'm already so far that I can upload/delete/
I'll admit that i'm a bit old-school and most people are going to
cringe at seeing this,
I would set a DB trigger with the raw logic
On Mon, Feb 4, 2013 at 2:14 AM, Mike Dewhirst wrote:
> This is the error ... Select a valid choice. That choice is not one of the
> available choices.
>
> I wa
34 matches
Mail list logo