Deprecations not listed within release notes

2018-01-15 Thread Murat Sert
There are some deprecations such as the custom_sql_for_model and couple of 
other methods within django.core.management.sql file which isn't listed on 
any of the release notes 1.8/1.9/1.11 or deprecation timeline.

Does anyone know if there methods are deprecated or moved elsewhere?

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/aba23083-90dc-4204-9316-aacc5ae50b4c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RequestContext instance passed to simpletag ?

2018-01-18 Thread Murat Sert
Hey,

I'm working on upgrading to Django 1.11 and have encountered an issue with 
simple_tags making use of context. I need to access the context within the 
tag so declare the decorator as follows.

@register.simple_tag(takes_context=True)


However when I print the type of context at this stage it is an instance of 
RequestContext. Is this expected behaviour? Because if you wanted todo a 
render_to_string at the end of the template tag, it'll throw an "unexpected 
type" error as context as required as a dict but not an instance of 
RequestContext

my return statement

renderedMessage = render_to_string(template, context)
return mark_safe(renderedMessage)


Regards

Murat

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3f45cfb7-5028-46ea-8004-d340dbd6b995%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Reporting unwanted behaviours

2018-01-18 Thread Murat Sert
Hi,

I don't think a package is neccesary for this (or at least I haven't 
researched it) but from a very abstract perspective, inside the posts have 
a boolean reported field, then you can render a button next to each post 
and then when users click on it, you mark it as it is being reported. Then 
implement the neccesary admin logic. Thats it.

Regards

Murat

On Thursday, January 18, 2018 at 7:25:30 AM UTC, Kubilay Yazoğlu wrote:
>
> Hi. I want to implement a reporting system in which users report a post 
> simply by clicking the report button and later on, admins check it whether 
> the post is really against the policy of the website. However, when I make 
> a research about Django Reporting Systems, the results are not related to 
> this. I was not able to express myself clearly.
>
> So, is there any package I can use? Any tutorials I can follow? Anything 
> about this?
>

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2c5952aa-5126-40e3-9807-67986b7e9d26%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Preventing apps installing duplicate models

2018-02-06 Thread Murat Sert
Hi,

I'm working on a project upgrade from Django 1.8 to 1.11. They've used a 
custom registration app which is inheriting from Django Registration Redux 
package. 
Both packages are listed on installed_apps list. All works fine however 
when I try to run tests, where it creates test tables back to back, it 
errors at the following lines:
```

Creating table profile_preferences
Creating table registration_registrationprofile
Creating table registration_registrationprofile
django.db.utils.ProgrammingError: relation 
"registration_registrationprofile" already exists
```

This is because both Apps are listed within the installed_apps list. Is 
there a way around this? 

Removing the django-registration-redux from installed_apps causes 
```RuntimeError: Model class registration.models.RegistrationProfile 
doesn't declare an explicit app_label and isn't in an application in 
INSTALLED_APPS.``` error.


Regards

Murat

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f9774a9a-cc7e-444d-b7d3-432192d3b5df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.