Giter Club home page Giter Club logo

django-ads's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

django-ads's Issues

blank page for add ads page (Grappelli style admin)

Hello,
Sorry for my english.
I've installed this app, all pages appear but add ads page display a blank page. I use Grappelli to style my admin. Without Grappelli (standard admin), i can use this page.
my specifictions: django 1.10 and Grappelli 2.9.1
best regards

Make IP address header configurable

Sometimes the X-Forwarded-For header isn't the one that contains the real user's IP address. For example, if you're behind a CloudFlare proxy, the header you want to use is CF-Connecting-IP.

It would be useful if this app had a setting that could specify which request.META key it used; defaulting to HTTP_X_FORWARDED_FOR as it's set up with now.

Ads are not being displayed.

I have done everything written on the About.

I have not created render_ad_zones.html and also i have not installed jQuery yet.
What should I do next to achieve the results?

How to I DRF `render_ads_zone` instead of traditional Django way?

How do I get this logic available to DRF instead of the tradition django way?

def render_ads_zone(context, zone):

    # Retrieve random ad for the zone based on weight
    ad = Ad.objects.random_ad(zone)

    if ad is not None:
        request = context['request']
        if request.session.session_key:
            impression, created = Impression.objects.get_or_create(
                ad=ad,
                session_id=request.session.session_key,
                defaults={
                    'impression_date': timezone.now(),
                    'source_ip': get_client_ip(request),
                })
    context.update({
        'ad': ad,
        'google_adsense_client': settings.ADS_GOOGLE_ADSENSE_CLIENT,
        'zone': settings.ADS_ZONES.get(zone, None)
    })
    return context

ReferenceError: Urls is not defined in ads.js

Been trying to solve this issue for some hours without success. I getting an error at Line 7 in ads.js file. The Urls is undefined. What could be the workaround here?
var url = Urls['ads:ad-impression']();

Impressions and clicks are only recorded when the user has a session

Oftentimes, anonymous users won't have a session. In that scenario, ads that are shown to them and ads that they click on won't be recorded. Django's SESSION_SAVE_EVERY_REQUEST setting won't help with this either. The render_ads_zone template tag and the AdClickView view both have this line:

if request.session.session_key:

That line could be replaced with something like this:

request.session['django-ads'] = True
request.session.save()

You could also have the app support both behaviors (if you wanted to) with a setting like ADS_SESSION_KEY. If it's a string, use the behavior I proposed above. If it's None, use the current behavior. Its default value could be 'django-ads'.

Thoughts?

Create A Setting To Turn Off Database Tracking

Not everyone wants each and every click of an ad to be added to the database. Enabling database tracking for every click introduces spam clicking issues where a person or a bot could spam click an ad over and over again and fill up the database rapidly with excessive data.

Plus the ad networks should already track that data. There is no need to store it in the database.

Some people might prefer only tracking certain database columns about a click and not every single proposed database column. Add some customization as to what columns in the database the user desires to be tracked also.

Since IP address is tracked by default, that is not necessarily a good thing from a legal standpoint as PII and GDPR privacy laws come into play. The IP address should be encrypted to prevent this or have an option to be disabled.

Image not displaying

Hi guys,

I am new to django ads. I have created a project called mysite and inside that project I have created an app called advertisements.

See the link below.

work

In my template, the link is working fine. However, the image is not loaded.
The console says Not Found: /advertisement/iphone.jpeg

Can anyone help me?

This package only work with Google AdSense?

@razisayyed @ataylor32 Is possible use this package for work without Google AdSense?, I added some Advertisers, Categories, and Ads using Django admin interface but I can see the ads in my custom templates because the {% load ads_tags %} tag require Google AdSense for use it.

Feature Request: Auto Thumbnails generation

Currently, we need to define the sizes of an image in the settings and then upload images that adhere to these dimensions. This means, we need to generate and upload several different files. Instead, wouldn't it be better to upload one image only and then auto generate all the sizes from the settings? Then I only need to take care of the aspect ratio of the image (1:1, 1:2, etc.) and the rest is automated.

What do you think? I can contribute if you like, I would like to heavily use this plugin for several clients of mine with multiple Django Websites.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.