I got it to work but with a different approach by not passing arguments:

<a href="{% url 'rrs_class_lists_summary' %}{{ faculty_name.1 }}/" 
> target="_blank">{{ faculty_name.0 }}
>

    url(r'^class_lists_summary/$', 
> rrs_views.requires_login(rrs_views.class_lists_summary), 
> name="rrs_class_lists_summary"),
>
>     url(r'^class_lists_summary/(?P<faculty_id>[-\w]+)/$', 
> rrs_views.requires_login(rrs_views.class_lists_faculty), 
> name="rrs_class_lists_summary"),
>

Does this make any sense? I would like to use the first one since it's much 
cleaner.

On Monday, May 8, 2017 at 5:53:54 PM UTC+8, miguel vfx wrote:
>
> Hi,
>
> It used to work but after my recent upload, it stopped. Does anyone 
> encountered this kind of error before?
>
> It's working fine in my local machine using runserver but not in the 
> production server. I'm basically drag and dropping files. Then renaming the 
>
>> os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'sym.settings') in views. 
>> I only have that in views.py.
>
>
> After that, I restart the app in supervisorctl. 
>
> The production server is using gunicorn, nginx. The Django version is 
> 1.10.5 with python 3.5. My local machine is using the same django version 
> (I just updated it) but with python 3.4.
>
> Error page:
>
> Exception Type:
>> NoReverseMatch
>> Exception Value:
>> Reverse for 'rrs_class_lists_faculty' with arguments '()' and keyword 
>> arguments '{'faculty_id': ''}' not found. 1 pattern(s) tried: 
>> ['rrs/class_lists_faculty/(?P<faculty_id>[-\\w]+)/$']
>>
>
> <td class="col-xs-12">{{ forloop.counter }}. <a href="{% url 
>> 'rrs_class_lists_faculty' faculty_id=faculty_name.1 %}" 
>> target="_blank">{{ faculty_name.0 }}</a></td>  
>>
>
>
>>    1. 
>>    
>>     return render(request, 'rrs_class_list_summary.html', {'errorLS': 
>> errorLS,
>>    
>>    2. 
>>    
>>                                                               'feedbackLS': 
>> feedbackLS,
>>    
>>    
>>
>>    1. 
>>    
>>                                                               
>> 'faculty_link_name_list': faculty_link_name_list,
>>    
>>    ...
>>
>>
>>    1. 
>>    
>>                                                               })
>>    
>>    
>> urls.py
>  
>
>>      url(r'^class_lists_faculty/(?P<faculty_id>[-\w]+)/$', 
>> rrs_views.requires_login(rrs_views.class_lists_faculty), 
>> name="rrs_class_lists_faculty"),
>
>
> views.py
>
>> def class_lists_faculty(request, faculty_id=''):
>
>
> I have been stuck on this for half a day now. My biggest trouble is its 
> working fine in runserver which really leaves me clueless on what's 
> happening on the web server. I would really appreciate any help. Thank you 
> in advance. 
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/619b3527-0e30-4fae-ba6c-0d273d336c6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to