Re: "sudo is not recognized in install process" ,what to do?, thanks

2013-10-19 Thread Serge G. Spaolonzi
Hi,

It sounds like an issue related to the operative system.  Could you
give us more info about the target OS?
If you are using Linux, you need to install the package 'sudo' and
then add your user to the sudoers list.


Regards


On Sat, Oct 19, 2013 at 11:25 AM, נחום קשב <nachum@gmail.com> wrote:
> --
> 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/dc43b846-00be-46e0-b530-6d224410fff2%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.



-- 
Serge G. Spaolonzi
Cobalys Systems
http://www.cobalys.com

-- 
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/CA%2BrwjWWY1ZFTkr5jRTkm8s-eU2me30MxESpFUK9H2pQMTe-25w%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Testing: @override_settings(AUTH_USER_MODEL='auth.User') no working.

2013-09-30 Thread Serge G. Spaolonzi
Thanks, it worked.
Changing @override_settings(AUTH_USER_MODEL='auth.User') for
@override_settings(AUTH_USER_MODEL='auth.CustomUser') made the trick.

On Sun, Sep 29, 2013 at 9:09 PM, Russell Keith-Magee
<russ...@keith-magee.com> wrote:
>
> On Mon, Sep 30, 2013 at 7:27 AM, Serge G. Spaolonzi <se...@cobalys.com>
> wrote:
>>
>> Hi,
>>
>> I am failing to override the AUTH_USER_MODEL settings for a unittest, it
>> throws:
>>
>> "Manager isn't available; User has been swapped for 'None'"
>>
>> Is it possible to override AUTH_USER_MODEL in the unittest?
>> My goal is to use the default user model provided by django for the test
>> only.
>
>
> Yes, it is possible. That's why the approach is documented:
>
> https://docs.djangoproject.com/en/dev/topics/auth/customizing/#custom-users-and-testing-fixtures
>
> If you're getting an error, It sounds like something else is going wrong in
> your test suite -- my guess would be that you haven't got the auth app in
> INSTALLED_APPS. However, it's impossible to say for sure without seeing more
> code.
>
> Yours,
> Russ Magee %-)
>
> --
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.



-- 
Serge G. Spaolonzi
Cobalys Systems
http://www.cobalys.com

-- 
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/CA%2BrwjWXc-k166BhY5%3DRRM9LR21MFTyf9KqDMSozKErohbMEchw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Testing: @override_settings(AUTH_USER_MODEL='auth.User') no working.

2013-09-29 Thread Serge G. Spaolonzi
Hi,

I am failing to override the AUTH_USER_MODEL settings for a unittest, it throws:

"Manager isn't available; User has been swapped for 'None'"

Is it possible to override AUTH_USER_MODEL in the unittest?
My goal is to use the default user model provided by django for the test only.

Thanks

-- 
Serge G. Spaolonzi
Cobalys Systems
http://www.cobalys.com

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How do I change a global setting from inside middleware?

2013-06-23 Thread Serge G. Spaolonzi
Django settings cant be changed on the fly.
>From the official documentation:
> You shouldn’t alter settings in your applications at runtime. For
example, don’t do this in a view:

I think the solution for your problem is to set or update
 'grappelli_admin_title'  context variable from the middleware or from a
custom context processor.

Looking at Grappellis code it seems this is the relevant code for your
problem:
grappelli/templates/admin/base.html
{% if grappelli_admin_title %}{{
grappelli_admin_title }}{% else %}{% get_admin_title %}{% endif %}


Using context processors is the best practice for this kind of problems.
For example:

def admin_title(request):
"""
Adds media-related context variables to the context.
"""
user_company_name = request.user.company_name
return {'grappelli_admin_title': user_company_name, }


Regards



On Sun, Jun 23, 2013 at 3:47 PM, Richard E. Cooke <rcooke1...@gmail.com>wrote:

> I'm using Grappelli to spruce up my Admin interface.
>
> I would like to customize the site name (and web page tittle).
>
> I have this in my project settings.py file:
>
> # http://django-grappelli.readthedocs.org/en/latest/customization.html
> GRAPPELLI_ADMIN_TITLE = "The Default Company"
>
>
> And in my middle ware I try to change it to match the company name of the
> connecting user:
> (This code snipped is abbreviated, don't try and copy and paste it into a
> file and run it!)
>
> from django.conf import settings
> def process_request(self, request):
> settings.GRAPPELLI_ADMIN_TITLE = request.user.myuser.site.name
>
> But it seems to be a crap shoot if the title gets changed to the right
> value, or changed at all!
>
> More shared memory consequences?
>
> I could not find a "best practice" for this.  So, I suspect there is a
> "better way" I'm hoping somebody can enlighten me.
>
> Thanks in advance,
> Rich.
>
>  --
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Serge G. Spaolonzi
Cobalys Systems
http://www.cobalys.com

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Custom manytomany widget in admin site: How to get the objects instead of their keys?

2013-06-23 Thread Serge G. Spaolonzi
I have a custom m2m widget for the admin site. I need to display the names
of the related objects but for the moment I only get the ids of the objects.

Is it possible to get the related objects instead the keys?
How is it implemented in the default widget and the horizontal_filter?
(I took a look to the  code but I got lost)

This is the code for the render method, values only contain a list with the
keys and I need to access the name attribute of the objects.

> def render(self, name, value, attrs=None):
> if value is None:
> value = 'n'
> final_attrs = self.build_attrs(attrs, type=self.input_type,
name=name)
> if value != '':
> final_attrs['value'] = ', '.join(v for v in value])
> return format_html('<input{0} />', flatatt(final_attrs))


Thanks

-- 
Serge G. Spaolonzi
Cobalys Systems
http://www.cobalys.com

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Urls on the fly

2013-03-08 Thread Serge G. Spaolonzi
I am looking the way to create urls on the fly.
This is a simplified version of the code I am using:

def get_urls():
url_list = []
for code in external_code_list:
url_list.append(
url(r'^%s/$' % code,
view
)
)
urlpatterns = patterns('', url_list)
return urlpatterns


urlpatterns = get_urls()

It throws "url() takes at least 2 arguments (2 given)"

Any idea?

Thanks

-- 
Serge G. Spaolonzi
Cobalys Systems
http://www.cobalys.com

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Templates: best way to access object attributes described in a external list.

2013-03-05 Thread Serge G. Spaolonzi
On Mon, Mar 4, 2013 at 12:01 PM, Bill Freeman <ke1g...@gmail.com> wrote:

> Are you saying that you need control over which of an item's attributes
> are shown and which are not and/or the order in which attributes are shown,
> or are you saying that the way python/django converts the attributes to
> strings does not meet your requirements, or both?
>

> Your approach can certainly handle both, provided those who will be
> maintaining it will have no trouble understanding it.
>


I am making a generic view for showing a list of objects of the same kind,
the view takes the list of objects and a tuple with the attributes to be
shown.
Python/django fits my requirements but I am looking the most efficient way
to do it. The inner loop is expensive.

Regards

-- 
Serge G. Spaolonzi
Cobalys Systems
http://www.cobalys.com

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: urls.py not loading changes

2013-03-03 Thread Serge G. Spaolonzi
Maybe the server is loading an old .pyc file. try to delete the urls.pyc
file and restart the server.

On Sun, Mar 3, 2013 at 11:16 AM, Asier Hernández Juanes <
asiertxo...@gmail.com> wrote:

> Hi everyone,
>
> i have a remote Linux server with a Django application running in a nginx
> server but when I make a change in urls.py like adding a new urlpattern the
> server is not applying the changes. I have restarted nginx server but the
> new url is not loading.
>
> Does anyone know what may be the problem?
>
> Thanks a lot!
>
> --
> 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?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Serge G. Spaolonzi
Cobalys Systems
http://www.cobalys.com

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Templates: best way to access object attributes described in a external list.

2013-03-03 Thread Serge G. Spaolonzi
I am looking for best way to access object attributes described in a
external list.
The user case is to display a list of objects for different classes showing
only some attributes, every list will contain only objects of the same
kind, all the functionality repeats except the attributes to be displayed
that vary according to the list.
In the view I have a factory that retrieves the different
objects transparently.

The two solutions I have now are:

1) Iterate through attributes:

items: is a list of items of the same kind
item_display_field: is a list of field to be displayed
getattribute: is a custom filter

{% for item in items %}
> {% for field in item_display_field %}
> {{ item | getattribute:field }}
> {% endfor  %}
> 
> {% endfor  %}


2) Faster but less DRY is to keep the view factory but specify different
templates according the class, I will have to repeat the code but win
the processor time used to iterate through attributes.

Is there a better way to do it in Django templates?

Thanks

-- 
Serge G. Spaolonzi
Cobalys Systems
http://www.cobalys.com

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Custom Http404 like exception

2013-02-18 Thread Serge G. Spaolonzi
Thanks, It worked.

On Mon, Feb 18, 2013 at 1:00 PM, Tom Evans <tevans...@googlemail.com> wrote:

> On Mon, Feb 18, 2013 at 2:41 PM, Serge G. Spaolonzi <se...@cobalys.com>
> wrote:
> > Thanks Pankaj,  In this case I could not use an HttpResponse because the
> > helper method I am developing doesn't return a respose it returns a dict
> or
> > raises an exception if the user is not authenticated.
> > For example:
> >
> > def get_server_time(request):
> >   time_dictionary = helper_method()
> >   #Rest of the view here
> >
> > def helper_method():
> >  if user.is_authenticated():
> > return {'server_time': server_time()}
> >  else:
> > raise HttpCustomException(redirect='this_login_for_this_method')
> >
> > The goal is to return the dictionary or redirect the user to a specific
> > login screen (there would be several login screens).
> > The idea is to encapsulate all this functionality in the helper method so
> > the views dont have to implement the authentication part or write a
> > try/catch/redirect in all the views.
> >
>
> Hi Serge
>
> If an unhandled exception is raised from view code, then before
> generating a default error response, Django will first call any
> middleware that has a process_exception method, and if a response is
> returned from any of them, will use that response rather than proceed
> with it's standard error reporting.
>
> Therefore, you can simply define some middleware to handle project
> specific exceptions in a similar manner to Http404.
>
> Cheers
>
> Tom
>
> --
> 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?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>


-- 
Serge G. Spaolonzi
Cobalys Systems
http://www.cobalys.com

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Custom Http404 like exception

2013-02-18 Thread Serge G. Spaolonzi
Thanks Pankaj,  In this case I could not use an HttpResponse because the
helper method I am developing doesn't return a respose it returns a dict or
raises an exception if the user is not authenticated.
For example:

def get_server_time(request):
  time_dictionary = helper_method()
  #Rest of the view here

def helper_method():
 if user.is_authenticated():
return {'server_time': server_time()}
 else:
raise HttpCustomException(redirect='this_login_for_this_method')

The goal is to return the dictionary or redirect the user to a specific
login screen (there would be several login screens).
The idea is to encapsulate all this functionality in the helper method so
the views dont have to implement the authentication part or write a
try/catch/redirect in all the views.

> get_response() method of django.core.handlers.base.BaseHandler handles
> Http404 and sets status code here -
>
https://github.com/django/django/blob/stable/1.4.x/django/core/handlers/base.py#L138-L155

This is what I wanted to know, but it seem i couldnt be able to reproduce
because it checks specifically for an exception of the kind Http404. I
think I will have to attach to a custom middleware and catch/redirect the
exceptions/views from there

btw this is for a Oauth client library.

Thanks

On Mon, Feb 18, 2013 at 11:52 AM, Pankaj Singh <ps.j...@gmail.com> wrote:
> Hey Serge,
>
> Here is a brief description of how status code is set in request response
> cycle of Django.
>
> Http404 inherits from Exception defined here -
>
https://github.com/django/django/blob/1.4.3/django/http/__init__.py#L132-L133
>
> get_response() method of django.core.handlers.base.BaseHandler handles
> Http404 and sets status code here -
>
https://github.com/django/django/blob/stable/1.4.x/django/core/handlers/base.py#L138-L155
>
> django.core.handlers.base.BaseHandler has some code for setting
status_code
> to 403 and 500 as well.
>
>> I want to make the same but with for a 401 code and a custom redirection
>> according to the resource to be accessed.
>
>
> There is really simple way to do this.
>
>
> class HttpResponseUnauthorizedRequest(HttpResponse):
>
> status_code = 401
>
>
> You can use this class similar to HttpResponse
>
>
> def protected_view(request):
> ## handle authorization
> ## if not authorized then return above response
> return HttpResponseUnauthorizedRequest("Authorazation is required")
>
>
> There are similar classes for different status code as well -
>
https://github.com/django/django/blob/stable/1.4.x/django/http/__init__.py#L751-L770
>
> Similar implementation by django-tastypie -
>
https://github.com/toastdriven/django-tastypie/blob/master/tastypie/http.py
>
> So you have set status code, now what
>
> process_response() method of django.middleware.common.CommonMiddleware
> checks if status code is 404 and sends an email to admins for broken urls
-
>
https://github.com/django/django/blob/stable/1.4.x/django/middleware/common.py#L94-L109
>
> You can see status_code based processing of response in other middlewares
as
> well, e.g. cache, http and csrf.
>
> Finally request handlers set status code is response header -
>
> 1. django.core.handlers.wsgi.WSGIHandler sets status code in response
header
> -
>
https://github.com/django/django/blob/stable/1.4.x/django/core/handlers/wsgi.py#L245-L253
>
> 2. If you are using modpython then status_code in header is set by
> django.core.handlers.modpython.ModPythonHandler -
>
https://github.com/django/django/blob/stable/1.4.x/django/core/handlers/wsgi.py#L245-L253
>
> This response is served by Webserver.
>
> Sincerely,
> Pankaj Singh
> http://about.me/psjinx
>
>
> On Mon, Feb 18, 2013 at 6:15 PM, Serge G. Spaolonzi <se...@cobalys.com>
> wrote:
>>
>> Hi,
>>
>> How does the Http404 exception works internally?
>> I want to make the same but with for a 401 code and a custom
>> redirection according to the resource to be accessed.
>> I have thought about using a middleware to archive this but I am not
>> sure if it is standard way used by 'django.http.Http404'.
>>
>> Thanks
>>
>> --
>> Serge G. Spaolonzi
>> Cobalys Systems
>> http://www.cobalys.com
>>
>> --
>> 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?hl=en.
>> For more options, visit https://group

Custom Http404 like exception

2013-02-18 Thread Serge G. Spaolonzi
Hi,

How does the Http404 exception works internally?
I want to make the same but with for a 401 code and a custom
redirection according to the resource to be accessed.
I have thought about using a middleware to archive this but I am not
sure if it is standard way used by 'django.http.Http404'.

Thanks

--
Serge G. Spaolonzi
Cobalys Systems
http://www.cobalys.com

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: How can I find and clean an user's session from an user's id?

2013-01-21 Thread Serge G. Spaolonzi
Thanks.

On Mon, Jan 21, 2013 at 10:10 PM, Nikolas Stevenson-Molnar <
nik.mol...@consbio.org> wrote:

> I took a quick peek at the sessions implementation and it doesn't look
> like this is possible just using the sessions framework (since it only
> stores Session -> User and not User -> Session). You could subclass one
> of the existing session backends and store this information yourself
> (look at django.contrib.sessions.backends). Keep in mind that sessions
> are not always associated with users. You'll also need to look at the
> auth module to see how it stores user id in the session, then watch for
> that in your session backend's __setattr__ method.
>
> _Nik
>
> On 1/21/2013 2:35 PM, Serge G. Spaolonzi wrote:
> > I am looking the way to selective clear determinate user sessions from
> > the server. It has to be done from outside the user's session or request.
> > The complete user case is:
> > 1) Django process receives a ping with the id of the user to clear the
> > session
> > 2) Django process searchs the session for that user and cleans it.
> >
> > How can I find an user's session from an user's id?
> > What would be the most efficient way to archive this?
> >
> > Thanks
> >
> > --
> > Serge G. Spaolonzi
> > Cobalys Systems
> > http://www.cobalys.com
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Django users" group.
> > To post to this group, send email to django-users@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> > http://groups.google.com/group/django-users?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Serge G. Spaolonzi
Cobalys Systems
http://www.cobalys.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



How can I find and clean an user's session from an user's id?

2013-01-21 Thread Serge G. Spaolonzi
I am looking the way to selective clear determinate user sessions from the
server. It has to be done from outside the user's session or request.
The complete user case is:
1) Django process receives a ping with the id of the user to clear the
session
2) Django process searchs the session for that user and cleans it.

How can I find an user's session from an user's id?
What would be the most efficient way to archive this?

Thanks

-- 
Serge G. Spaolonzi
Cobalys Systems
http://www.cobalys.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Using different ports in views?

2012-09-01 Thread Serge G. Spaolonzi
Django's internal webserver is worth for development proposes only. In
production environments you should use apache/wsgi or another server.
Facing a similar situation i would create different projects for each
port that share the same database. From the development server you can
run each project in different ports, from apache/wsgi you can create a
different virtualhost from each port.

Regards

On Fri, Aug 31, 2012 at 8:49 PM, Robert Steckroth
<robertsteckr...@gmail.com> wrote:
> Hello gang, I would like to have some of my django views send the
> response to a different ports.
> Is it possible to specify which port to use in the views?
> --
> Bust0ut, Surgemcgee: Systems Engineer ---
> surgemcgee.com
> BudTVNetwork.com
> RadioWeedShow.com
> "Bringing entertainment to Unix"
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Serge G. Spaolonzi
Cobalys Systems
http://www.cobalys.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: NoReverseMatch Error

2012-08-14 Thread Serge G. Spaolonzi
Try removing the quotes from 'polls.views.vote':



Regards

-- 
Serge G. Spaolonzi
Cobalys Systems
http://www.cobalys.com


On Mon, Aug 13, 2012 at 11:46 PM, Syam Palakurthy
<syampalakur...@gmail.com>wrote:

> Hi - I could not find any explanation that fixed the problem, until I ran
> across this person's abridged Django tutorial:
> http://tony.abou-assaleh.net/web-development/stripped-down-django-tutorial
>
> It's basically a line in the details template, which should be:
>
> 
>
>
> Instead of:
>
> 
>
>
> I'm not sure why this fixed the issue, but it did for me.  I'd love an
> explanation if anyone has one.
>
> Thanks,
> Syam
>
> On Thursday, June 9, 2011 12:28:30 AM UTC-7, bh.hoseini wrote:
>>
>> hi there,
>> this is my views.py that doesn't have any problem:
>>
>> from django.shortcuts import get_object_or_404, render_to_response
>> from django.core.urlresolvers import reverse
>> .
>> .
>> .
>> return HttpResponseRedirect(reverse('**polls.views.results',
>> args=(p.id,)))
>>
>> def results(request, poll_id):
>> p = get_object_or_404(Poll, pk=poll_id)
>> return render_to_response('(...)/**polls/results.html', {'poll': p})
>> --**--**
>> --**--
>> but when i edit my urls.py like this:
>>
>> #...
>> urlpatterns = patterns('',
>> (r'^$',
>> ListView.as_view(
>> queryset=Poll.objects.order_**by('-pub_date')[:5],
>> context_object_name='latest_**poll_list',
>> template_name='(...)polls/**index.html')),
>> (r'^(?P\d+)/$',
>> DetailView.as_view(
>> model=Poll,
>> template_name='(...)polls/**detail.html')),
>> url(r'^(?P\d+)/results/$',
>> DetailView.as_view(
>> model=Poll,
>> template_name='(...)polls/**results.html'),
>> name='poll_results'),
>> (r'^(?P\d+)/vote/$', 'polls.views.vote'),
>> --**--**
>> --**
>> and open my browser with the link (http://localhost:8000/polls/**
>> id=1/vote <http://localhost:8000/polls/id=1/vote>), I'd face this error:
>> can anybody help please?
>>
>> Reverse for 'polls.views.results' with arguments '(id=1,)' and keyword 
>> arguments '{}' not found.
>>
>> can anybody help?
>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/2MW2j_RVlfYJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Open Source skin for Django Admin released.

2012-08-10 Thread Serge G. Spaolonzi
Sorry, I forgot to include the link:
http://cobalys.github.com/adminmax/

On Fri, Aug 10, 2012 at 1:09 PM, Serge G. Spaolonzi <se...@cobalys.com>wrote:

> Hi,
> I would like to share this skin (open source) with other Django
> developers.  This skin is non intrusive, it does not touch any file of the
> django installation, it works by linking the new CSS files in the
> settings.py file.
>
> My plan for adminmax is to extend and change some of the django admin
> functions and someday release an alternative to django admin contrib.
>
> All feedback is welcome.
>
> Thanks
> Serge
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/3IfGjOEXalcJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Serge G. Spaolonzi
Cobalys Systems
http://www.cobalys.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Open Source skin for Django Admin released.

2012-08-10 Thread Serge G. Spaolonzi
Hi, 
I would like to share this skin (open source) with other Django developers. 
 This skin is non intrusive, it does not touch any file of the django 
installation, it works by linking the new CSS files in the settings.py file.

My plan for adminmax is to extend and change some of the django admin 
functions and someday release an alternative to django admin contrib.

All feedback is welcome.

Thanks
Serge

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/3IfGjOEXalcJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.